From c1ff16345e05eb537e2525a1c23800645e5ee80c Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 30 Aug 2024 15:08:26 +0800 Subject: [PATCH] =?UTF-8?q?'=E6=96=B0=E5=A2=9E=E9=98=9F=E5=91=98=E6=97=A0?= =?UTF-8?q?=E5=8D=95=E4=BD=8D=E5=90=8D=E7=A7=B0=E6=8A=A5=E9=94=99=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=A9=BA=E7=99=BD'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- p__Competitions__Detail.4771074d.async.js | 4 +- p__Competitions__Entered.fb2933f7.async.js | 4660 + umi.ea859dd4.js | 141271 +++++++++++++++ vendors~monaco-editor.61923039.async.js | 266 +- ...l~p__Competitions__Index.5a6e1448.async.js | 4 +- 6 files changed, 146069 insertions(+), 138 deletions(-) create mode 100644 p__Competitions__Entered.fb2933f7.async.js create mode 100644 umi.ea859dd4.js diff --git a/index.html b/index.html index 4731cac61..8b934fe5d 100644 --- a/index.html +++ b/index.html @@ -69,6 +69,6 @@ gtag('config', 'UA-198293321-1'); --> - + diff --git a/p__Competitions__Detail.4771074d.async.js b/p__Competitions__Detail.4771074d.async.js index faba96039..37e85c98a 100644 --- a/p__Competitions__Detail.4771074d.async.js +++ b/p__Competitions__Detail.4771074d.async.js @@ -33779,9 +33779,9 @@ var verifyLogin_ShixunStatusModel = function ShixunStatusModel(dispatch) { /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/hooks/useBreakpoint.js because of ./node_modules/antd/es/list/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/hooks/useBreakpoint.js because of ./node_modules/antd/es/table/Table.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/index.js because of ./src/pages/Competitions/Detail/Competitionbonus.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/index.js because of ./src/pages/Competitions/Detail/components/WorkSubmit/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-pagination/es/locale/en_US.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-pagination/es/locale/zh_CN.js */ diff --git a/p__Competitions__Entered.fb2933f7.async.js b/p__Competitions__Entered.fb2933f7.async.js new file mode 100644 index 000000000..06a82b5b3 --- /dev/null +++ b/p__Competitions__Entered.fb2933f7.async.js @@ -0,0 +1,4660 @@ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[11],{ + +/***/ "/ezw": +/*!************************************************************!*\ + !*** ./node_modules/antd/es/skeleton/index.js + 8 modules ***! + \************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/toConsumableArray.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/typeof.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/omit.js/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js +var defineProperty = __webpack_require__("lSNA"); +var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js +var helpers_extends = __webpack_require__("pVnL"); +var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/typeof.js +var helpers_typeof = __webpack_require__("cDf5"); +var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof); + +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__("q1tI"); + +// EXTERNAL MODULE: ./node_modules/classnames/index.js +var classnames = __webpack_require__("TSYQ"); +var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); + +// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Title.js + + +/* eslint-disable jsx-a11y/heading-has-content */ + + + +var Title_Title = function Title(_ref) { + var prefixCls = _ref.prefixCls, + className = _ref.className, + width = _ref.width, + style = _ref.style; + return /*#__PURE__*/react["createElement"]("h3", { + className: classnames_default()(prefixCls, className), + style: extends_default()({ + width: width + }, style) + }); +}; + +/* harmony default export */ var skeleton_Title = (Title_Title); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toConsumableArray.js +var toConsumableArray = __webpack_require__("RIqP"); +var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray); + +// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Paragraph.js + + + + +var Paragraph_Paragraph = function Paragraph(props) { + var getWidth = function getWidth(index) { + var width = props.width, + _props$rows = props.rows, + rows = _props$rows === void 0 ? 2 : _props$rows; + + if (Array.isArray(width)) { + return width[index]; + } // last paragraph + + + if (rows - 1 === index) { + return width; + } + + return undefined; + }; + + var prefixCls = props.prefixCls, + className = props.className, + style = props.style, + rows = props.rows; + + var rowList = toConsumableArray_default()(Array(rows)).map(function (_, index) { + return ( + /*#__PURE__*/ + // eslint-disable-next-line react/no-array-index-key + react["createElement"]("li", { + key: index, + style: { + width: getWidth(index) + } + }) + ); + }); + + return /*#__PURE__*/react["createElement"]("ul", { + className: classnames_default()(prefixCls, className), + style: style + }, rowList); +}; + +/* harmony default export */ var skeleton_Paragraph = (Paragraph_Paragraph); +// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js + 1 modules +var context = __webpack_require__("H84U"); + +// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Element.js + + + + + +var Element_Element = function Element(props) { + var _classNames, _classNames2; + + var prefixCls = props.prefixCls, + className = props.className, + style = props.style, + size = props.size, + shape = props.shape; + var sizeCls = classnames_default()((_classNames = {}, defineProperty_default()(_classNames, "".concat(prefixCls, "-lg"), size === 'large'), defineProperty_default()(_classNames, "".concat(prefixCls, "-sm"), size === 'small'), _classNames)); + var shapeCls = classnames_default()((_classNames2 = {}, defineProperty_default()(_classNames2, "".concat(prefixCls, "-circle"), shape === 'circle'), defineProperty_default()(_classNames2, "".concat(prefixCls, "-square"), shape === 'square'), defineProperty_default()(_classNames2, "".concat(prefixCls, "-round"), shape === 'round'), _classNames2)); + var sizeStyle = typeof size === 'number' ? { + width: size, + height: size, + lineHeight: "".concat(size, "px") + } : {}; + return /*#__PURE__*/react["createElement"]("span", { + className: classnames_default()(prefixCls, className, sizeCls, shapeCls), + style: extends_default()(extends_default()({}, sizeStyle), style) + }); +}; + +/* harmony default export */ var skeleton_Element = (Element_Element); +// EXTERNAL MODULE: ./node_modules/omit.js/es/index.js +var es = __webpack_require__("BGR+"); + +// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Avatar.js + + + + + + + + +var Avatar_SkeletonAvatar = function SkeletonAvatar(props) { + var renderSkeletonAvatar = function renderSkeletonAvatar(_ref) { + var getPrefixCls = _ref.getPrefixCls; + var customizePrefixCls = props.prefixCls, + className = props.className, + active = props.active; + var prefixCls = getPrefixCls('skeleton', customizePrefixCls); + var otherProps = Object(es["a" /* default */])(props, ['prefixCls']); + var cls = classnames_default()(prefixCls, className, "".concat(prefixCls, "-element"), defineProperty_default()({}, "".concat(prefixCls, "-active"), active)); + return /*#__PURE__*/react["createElement"]("div", { + className: cls + }, /*#__PURE__*/react["createElement"](skeleton_Element, extends_default()({ + prefixCls: "".concat(prefixCls, "-avatar") + }, otherProps))); + }; + + return /*#__PURE__*/react["createElement"](context["a" /* ConfigConsumer */], null, renderSkeletonAvatar); +}; + +Avatar_SkeletonAvatar.defaultProps = { + size: 'default', + shape: 'circle' +}; +/* harmony default export */ var Avatar = (Avatar_SkeletonAvatar); +// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Button.js + + + + + + + + +var Button_SkeletonButton = function SkeletonButton(props) { + var renderSkeletonButton = function renderSkeletonButton(_ref) { + var getPrefixCls = _ref.getPrefixCls; + var customizePrefixCls = props.prefixCls, + className = props.className, + active = props.active; + var prefixCls = getPrefixCls('skeleton', customizePrefixCls); + var otherProps = Object(es["a" /* default */])(props, ['prefixCls']); + var cls = classnames_default()(prefixCls, className, "".concat(prefixCls, "-element"), defineProperty_default()({}, "".concat(prefixCls, "-active"), active)); + return /*#__PURE__*/react["createElement"]("div", { + className: cls + }, /*#__PURE__*/react["createElement"](skeleton_Element, extends_default()({ + prefixCls: "".concat(prefixCls, "-button") + }, otherProps))); + }; + + return /*#__PURE__*/react["createElement"](context["a" /* ConfigConsumer */], null, renderSkeletonButton); +}; + +Button_SkeletonButton.defaultProps = { + size: 'default' +}; +/* harmony default export */ var Button = (Button_SkeletonButton); +// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Input.js + + + + + + + + +var Input_SkeletonInput = function SkeletonInput(props) { + var renderSkeletonInput = function renderSkeletonInput(_ref) { + var getPrefixCls = _ref.getPrefixCls; + var customizePrefixCls = props.prefixCls, + className = props.className, + active = props.active; + var prefixCls = getPrefixCls('skeleton', customizePrefixCls); + var otherProps = Object(es["a" /* default */])(props, ['prefixCls']); + var cls = classnames_default()(prefixCls, className, "".concat(prefixCls, "-element"), defineProperty_default()({}, "".concat(prefixCls, "-active"), active)); + return /*#__PURE__*/react["createElement"]("div", { + className: cls + }, /*#__PURE__*/react["createElement"](skeleton_Element, extends_default()({ + prefixCls: "".concat(prefixCls, "-input") + }, otherProps))); + }; + + return /*#__PURE__*/react["createElement"](context["a" /* ConfigConsumer */], null, renderSkeletonInput); +}; + +Input_SkeletonInput.defaultProps = { + size: 'default' +}; +/* harmony default export */ var Input = (Input_SkeletonInput); +// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Image.js + + + +var path = 'M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z'; + +var Image_SkeletonImage = function SkeletonImage(props) { + var renderSkeletonImage = function renderSkeletonImage(_ref) { + var getPrefixCls = _ref.getPrefixCls; + var customizePrefixCls = props.prefixCls, + className = props.className, + style = props.style; + var prefixCls = getPrefixCls('skeleton', customizePrefixCls); + var cls = classnames_default()(prefixCls, className, "".concat(prefixCls, "-element")); + return /*#__PURE__*/react["createElement"]("div", { + className: cls + }, /*#__PURE__*/react["createElement"]("div", { + className: classnames_default()("".concat(prefixCls, "-image"), className), + style: style + }, /*#__PURE__*/react["createElement"]("svg", { + viewBox: "0 0 1098 1024", + xmlns: "http://www.w3.org/2000/svg", + className: "".concat(prefixCls, "-image-svg") + }, /*#__PURE__*/react["createElement"]("path", { + d: path, + className: "".concat(prefixCls, "-image-path") + })))); + }; + + return /*#__PURE__*/react["createElement"](context["a" /* ConfigConsumer */], null, renderSkeletonImage); +}; + +/* harmony default export */ var Image = (Image_SkeletonImage); +// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Skeleton.js + + + + + + + + + + + + + + +function getComponentProps(prop) { + if (prop && typeof_default()(prop) === 'object') { + return prop; + } + + return {}; +} + +function getAvatarBasicProps(hasTitle, hasParagraph) { + if (hasTitle && !hasParagraph) { + // Square avatar + return { + size: 'large', + shape: 'square' + }; + } + + return { + size: 'large', + shape: 'circle' + }; +} + +function getTitleBasicProps(hasAvatar, hasParagraph) { + if (!hasAvatar && hasParagraph) { + return { + width: '38%' + }; + } + + if (hasAvatar && hasParagraph) { + return { + width: '50%' + }; + } + + return {}; +} + +function getParagraphBasicProps(hasAvatar, hasTitle) { + var basicProps = {}; // Width + + if (!hasAvatar || !hasTitle) { + basicProps.width = '61%'; + } // Rows + + + if (!hasAvatar && hasTitle) { + basicProps.rows = 3; + } else { + basicProps.rows = 2; + } + + return basicProps; +} + +var Skeleton_Skeleton = function Skeleton(props) { + var renderSkeleton = function renderSkeleton(_ref) { + var getPrefixCls = _ref.getPrefixCls, + direction = _ref.direction; + var customizePrefixCls = props.prefixCls, + loading = props.loading, + className = props.className, + children = props.children, + avatar = props.avatar, + title = props.title, + paragraph = props.paragraph, + active = props.active, + round = props.round; + var prefixCls = getPrefixCls('skeleton', customizePrefixCls); + + if (loading || !('loading' in props)) { + var _classNames; + + var hasAvatar = !!avatar; + var hasTitle = !!title; + var hasParagraph = !!paragraph; // Avatar + + var avatarNode; + + if (hasAvatar) { + var avatarProps = extends_default()(extends_default()({ + prefixCls: "".concat(prefixCls, "-avatar") + }, getAvatarBasicProps(hasTitle, hasParagraph)), getComponentProps(avatar)); // We direct use SkeletonElement as avatar in skeleton internal. + + + avatarNode = /*#__PURE__*/react["createElement"]("div", { + className: "".concat(prefixCls, "-header") + }, /*#__PURE__*/react["createElement"](skeleton_Element, avatarProps)); + } + + var contentNode; + + if (hasTitle || hasParagraph) { + // Title + var $title; + + if (hasTitle) { + var titleProps = extends_default()(extends_default()({ + prefixCls: "".concat(prefixCls, "-title") + }, getTitleBasicProps(hasAvatar, hasParagraph)), getComponentProps(title)); + + $title = /*#__PURE__*/react["createElement"](skeleton_Title, titleProps); + } // Paragraph + + + var paragraphNode; + + if (hasParagraph) { + var paragraphProps = extends_default()(extends_default()({ + prefixCls: "".concat(prefixCls, "-paragraph") + }, getParagraphBasicProps(hasAvatar, hasTitle)), getComponentProps(paragraph)); + + paragraphNode = /*#__PURE__*/react["createElement"](skeleton_Paragraph, paragraphProps); + } + + contentNode = /*#__PURE__*/react["createElement"]("div", { + className: "".concat(prefixCls, "-content") + }, $title, paragraphNode); + } + + var cls = classnames_default()(prefixCls, className, (_classNames = {}, defineProperty_default()(_classNames, "".concat(prefixCls, "-with-avatar"), hasAvatar), defineProperty_default()(_classNames, "".concat(prefixCls, "-active"), active), defineProperty_default()(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), defineProperty_default()(_classNames, "".concat(prefixCls, "-round"), round), _classNames)); + return /*#__PURE__*/react["createElement"]("div", { + className: cls + }, avatarNode, contentNode); + } + + return children; + }; + + return /*#__PURE__*/react["createElement"](context["a" /* ConfigConsumer */], null, renderSkeleton); +}; + +Skeleton_Skeleton.defaultProps = { + avatar: false, + title: true, + paragraph: true +}; +Skeleton_Skeleton.Button = Button; +Skeleton_Skeleton.Avatar = Avatar; +Skeleton_Skeleton.Input = Input; +Skeleton_Skeleton.Image = Image; +/* harmony default export */ var skeleton_Skeleton = (Skeleton_Skeleton); +// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/index.js + +/* harmony default export */ var skeleton = __webpack_exports__["a"] = (skeleton_Skeleton); + +/***/ }), + +/***/ "0SVz": +/*!*****************************************************************!*\ + !*** ./src/pages/Competitions/Entered/Enteredmodel/success.png ***! + \*****************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAMRklEQVRoQ9VbeXCV1RX/nft9770sQEggEhAhBJIoWtHijBQXEhWtdsow0achgkXtaLVF7bih1Ua6qFOq1lZUtGXcADEqih0toCYGcEU7FhcMSVgMezaWLO/7vntO577kIWBC3ntZhPvfm3fuued377lnu+cj9OQQUGbZ1JQEJAxkC6MZ9COC5CjQKBHKIEKKCJIABIjgCaSFhJqEsAuMbSRWlZvU+JXY7heJe/vv2hvAnpqJJS09KSL1BLOxLwX9zZlIs1tpHKDOVcCZBJUNQTJIAgAFALEB6nA9EWgQHAAhELcC2EWi1gnL+yG/fKChN9csL2nEHHB35e0W4DFvXhxAYlo62TyZBJcS6HQIUoQkiToB16XA0k5BcAHsZ6CBCKXM9FJz8t7Pto1/ox4UP/D4AAvUSaumD2HhS4RQSMBpAqQSYHUJKD6CkDDVsr/1XQ/uIoTUh5vyX2uMh1XMgIcsvzB5QGDQRADXkaI8AGkEqHgWj2OOA8FOQF5pcb2ntwys3oAzPjWaEPWICfDo5TOOQ4q+yhfiGwV0AojsqFfqCcJ2dSeiZob3pWeHHvEx//ubs5fti5Z9dIAFNPLjYGZiq/9WNiosMgjRzYxWjnjoRARbRcmTruf9a1N+yY5omHQttnE17wfH2bDmWJ6aDCDxKAALtJ+2AI2kZImj6IGNZy3a3BXoIwMW0Nhlhadxf+th2Hy2oI9VuCvp2/8XoIWEl7Kj7t0weVH1kaYdEXDGl9NOTt9Cj3oB5LHdaxY4SlhdkrUKy8tK5N71+S9u6oy6U8DZK4uykESP2C5fwsY4da38XUrUqwRGxQnNIHm+VUJzNp/76vaO1usQxpjPgumB3fZ9YqmrvYAkmvtytOM9CFwDkzzU6HmP7s4v2X846O/hMNETpfa/Wjm+OYAcdywhPQCOaLMnfEvVOznLMGfOIeHooYAFlFU2Y7zP1s9DkBtWkmNwCCAk+MQFpldPWlSJAzb9MEAZ5Ren95fUR2zCFQz0bVDRkxsrAoI0uz57Hin5U+WEhXsj7L87QYEaturSKQPE/wSIMiIxfE/K0ce8RBRtZuKiyomLPzQ7YNY/APiE1YXD+otvgQhPZkhfxca9uwcCV0QvbPKc27ZesLTuO8AStEaupan9mvyPa+Lj5Ji8uR3sXfhM+VuXdVF1Xskac8phaGPKg+nss5/wtdJUKFhHn6kSD6DdbZAkHTFEfCJoFYWndKL7++ozSvYYzabclYXjya9eYYURR9/higehlcx4GLbBTbcrVudFD9rkGFivbW9K1cSSSkovDfZLs+wbQHQPBAN691LFwl0gRAzIGq34xqoVS74ys7POL8y3oZ4nYGgM3GpZ8c0btumXKWtlcIQdsOeD6EKSPkvkjyBrW4yoWImGfKUVrq86Z+H7ESubU3bFxaTUAoAyogYsEtKKX2hObJ5NueVXniWQFwjIjJpBbxJSW9hgu4FqloTbvq6vfQOXl2iz5KjVwVwf248RkBe9SrddfFH4fD/2F1LOqmk3ktAcAIN7E0e0vJVW8GyvxkneU+zbMWZh5SX/CJm5J35QmKkd/EWRmgrAFy2/CB1DtjVJ6AbKLi98XIFmANQvViY9SR9WZAEsx651/Pqh+kDl4/UTPgpHSCeVFwwFEu7VwEwyBYh4Bkm9gOcawMsVVH48uxbPup3NMcGvYtpnO/b8Fpa5VRc9v8vQDng/mDaccbOwbxYDqd1Ys0kgiymnfNoXBBr7gyYK5niFQ0x4kYF7qya9+K0BduryC5Mb+6Vdm+jhLiLV3XDXBdE7lPNe0Q4iDOnGznV/qkArzf9xSN9SlV9ishtg7Xjf6fszL3OU/wEPNLK7iwiBSfAp5ZYX7TGa012G8c43ggD0CVzv+orzlnzeZlOL1fA1lRelaP03gcrW1GOx3zfdBexCpA5kzE3YysdoPcNR0NdM8uvKs198r93XUtaaK8+wNM23wOZFoyeDv+0GcAOAgbGfkDgCvMnCT1hQnhBdR8DPgfDrYDTDoN0oJHds0NtfR36Z1+Zrp+cmsDeP2wxpj2ZtImg0gE1QHrMPFkGNJ7qgunTJp7gPkls+I1OU/h0xCkFI7goxMW3TQn9wYT+7Kf8Z82KIE0sLM9myHiRIQeza0tWK4bpHHeWUF20h4IQoyA8hEWB7OLn+ThVhwlRfwDcbwHQI+nesjEZDuY4Jj+hW77HqySXGhmBkecHQfpJ4jybMZJjXx14ZWyh31ZXrIHJy7G5JPAHKxaJbN6xY9L/I2+2Y0oLhZCfcrjz5BRGlREoJ5pIrJiitmpzE0NNaWQ9unLB4p4E1YlVRqp9xs4/oJoGk9k61xdR9aJ3xw+8QcG6MsWn79ovHoDUE3FFxzqK1kXfb3BWFw5DEvwX7rgUjFUrCPsEfIifQgpLGge7d1eeUbDFMzGtkar/0a0TjboFk9NLJGtPnCqSMssunLVCgK2IwNoertobgEyi5vWK790Ek0M/8OJhBVmBWYK9cR8KDRbHWPvvtpJ3WTZ8XPFcR8bVZrVnBRAnc7wl329ce8RKINGnCYspeXXSbYrkLoLR4b40Amgn/tTTu+GaXWx4BnfFZMH1gg+9GJfpXCti1Jy352m9/vGBteJ1iqMxJl0722/6/K6hsk/3Gu34080RQ51nyJ8oumzZZES0AYXg0EzujMcm6cmidSNPsb85veBvU5mbGlgYzmNVllqU2h45vXFGZ/ZbJfuiU1YXjFSfMd+CezmDqudiiYwkZ2MIKMyl7VUEWif85Ak3srOkk2o1QrmKxnfW7h7XcXbdn25uR1/nhLwUTa9J3uxFfO3j1lNw0Tn7MBzvfg+6tNokDYgtEhFDu2jKTMkunDvSphNmK1Kx47/FBnEGiTD14gybnnspUfh2nlJjunAMjs7QwM9nyPaghBQKOMTKLdusPoxM0CemH2G8/FC7ijV5TlGcxTNVjWJws26aZWyiA7Sm4yqv0bBQ7Si8N91oVQ2WdHRyu/OpOv/LN1MLRRmTdEik8WWSry16hKdWGDcXItdOHBpr5OQDn9UiDSuR1nmSTAA+TjZXs8ggimgaoAoIM6O07G9klgUlO+C3Xab524wXLdoYBj/0i6HcarOmW0NzuWOtOjqJeSBpIKIlE0oRMk1ofDkItW3LThnUVL+P6T90DrmDUOwUj/XZgEYgm9HTQ3ofwDl/KlHnLxPauqphYsjVy68JE49de52vZs/9KVvgrWxjUq06xD3YgnLAKdnramVVZR69GYoNDcOWuLhzmWfS0v4V+yhaUCQWOSeBs6mNKO4nWK+B9s6rOWhqujx1ywuFfxVAZwcsnDdph/VNbGMUWddwN2gcnFO8S5mAtzSLgiv397Ktqzlj0SaSI/33AJpj/fEZyWq31G0tbd7qBltRw7fQYOmcxGZnITviair0hzjPtkd2B/etQY3NXXDNM2Xw/lDeNif3HAt629JOhXDS39g88ZbfU/7ki/43awzWl0ys6uGpczuCak58kLzCJ7ZA62kEbe2N77FqOfn3fgOTbN/3kmQ57tTq3SQI6qWzmmaTtedrfchqO8q4AEvG0QqnDfPPmSUu+7swGdNF6WKxOfndLnmeH5gowjuio7cZzBPKu68edGycsXndw107UKn2A8KWgNXowTfDZ1n0COheCo+1O74NgmWO5f9x4VknFwRa5o1OOzs0WQ+XkXZoDlTCbwFMBldJmvX/IYUratENInmWfmlc5YWFNNNJEB7id0wmrpwzz+6yr7dakX5LIcPOMG3ZZMXGJRqxDaaS9V5giFUFCsxb9FdmY5zoJr23KfybqzwFiFjX9i7x+g+qOnwjB9UI8yXwCgN6MT8z7uMlhyXQFWC6Dd4jSL4dEnt48iKsOz7e72s6YAYcZSrE6aVXVECeAKcrj6UrDlHlTeiXpMIorKkRAfUtiQ5lH8pzd5O+7jzwO3sExGy4OeLUpQ8nBz/ykzDPLqW0Pc5LU7XKRaSoj7NMWN8Cz3gu0Wktr03d/tOP0t+r6/jOew/QmszQvQazhqTbpcUqQb+pjJDIKZD4XoASI+AEytasONcpUPQnhwn4ryPRVqQbl4TOwXuWkyAdOvVOz9fxTG0CHdsZ2pb7xW+loORdDjbigKMXnuYOU7T+RmE8xHQtC4f6vdAIGCSghbObaQnQHkAYBTAi4SxHWM+v1LQmBL1VItpKuadiUXxZ+d+qp8X+IbkDVhOtalgAAAABJRU5ErkJggg==" + +/***/ }), + +/***/ "4i/N": +/*!******************************************************************************!*\ + !*** ./node_modules/@ant-design/icons/es/icons/CloseOutlined.js + 1 modules ***! + \******************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/components/AntdIcon.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("VTBJ"); + +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__("q1tI"); + +// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/CloseOutlined.js +// This icon file is generated automatically. +var CloseOutlined_CloseOutlined = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" } }] }, "name": "close", "theme": "outlined" }; +/* harmony default export */ var asn_CloseOutlined = (CloseOutlined_CloseOutlined); + +// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 4 modules +var AntdIcon = __webpack_require__("6VBw"); + +// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/CloseOutlined.js + +// GENERATE BY ./scripts/generate.ts +// DON NOT EDIT IT MANUALLY + + + +var icons_CloseOutlined_CloseOutlined = function CloseOutlined(props, ref) { + return /*#__PURE__*/react["createElement"](AntdIcon["a" /* default */], Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, props), {}, { + ref: ref, + icon: asn_CloseOutlined + })); +}; +var RefIcon = /*#__PURE__*/react["forwardRef"](icons_CloseOutlined_CloseOutlined); +if (false) {} +/* harmony default export */ var icons_CloseOutlined = __webpack_exports__["a"] = (RefIcon); + +/***/ }), + +/***/ "61Iv": +/*!*************************************************!*\ + !*** ./src/pages/Competitions/Entered/xmtz.png ***! + \*************************************************/ +/*! 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/xmtz.e88619e3.png"; + +/***/ }), + +/***/ "6VBw": +/*!******************************************************************************!*\ + !*** ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 4 modules ***! + \******************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/colors/dist/index.esm.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/@ant-design/icons/lib/utils.js (referenced with cjs require)) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/camelCase.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/dynamicCSS.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("VTBJ"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules +var slicedToArray = __webpack_require__("ODXe"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js +var defineProperty = __webpack_require__("rePB"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +var objectWithoutProperties = __webpack_require__("Ff2n"); + +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__("q1tI"); +var react_default = /*#__PURE__*/__webpack_require__.n(react); + +// EXTERNAL MODULE: ./node_modules/classnames/index.js +var classnames = __webpack_require__("TSYQ"); +var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); + +// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/components/Context.js + +var IconContext = /*#__PURE__*/Object(react["createContext"])({}); +/* harmony default export */ var Context = (IconContext); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js +var esm_typeof = __webpack_require__("U8pU"); + +// EXTERNAL MODULE: ./node_modules/@ant-design/colors/dist/index.esm.js + 4 modules +var index_esm = __webpack_require__("AJpP"); + +// EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js +var warning = __webpack_require__("Kwbf"); + +// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/dynamicCSS.js +var dynamicCSS = __webpack_require__("BU3w"); + +// EXTERNAL MODULE: ./node_modules/lodash/camelCase.js +var camelCase = __webpack_require__("u6S6"); +var camelCase_default = /*#__PURE__*/__webpack_require__.n(camelCase); + +// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/utils.js + + + + + + + + +function utils_warning(valid, message) { + Object(warning["a" /* default */])(valid, "[@ant-design/icons] ".concat(message)); +} +function isIconDefinition(target) { + return Object(esm_typeof["a" /* default */])(target) === 'object' && typeof target.name === 'string' && typeof target.theme === 'string' && (Object(esm_typeof["a" /* default */])(target.icon) === 'object' || typeof target.icon === 'function'); +} +function normalizeAttrs() { + var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + return Object.keys(attrs).reduce(function (acc, key) { + var val = attrs[key]; + switch (key) { + case 'class': + acc.className = val; + delete acc.class; + break; + default: + delete acc[key]; + acc[camelCase_default()(key)] = val; + } + return acc; + }, {}); +} +function generate(node, key, rootProps) { + if (!rootProps) { + return /*#__PURE__*/react_default.a.createElement(node.tag, Object(objectSpread2["a" /* default */])({ + key: key + }, normalizeAttrs(node.attrs)), (node.children || []).map(function (child, index) { + return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index)); + })); + } + return /*#__PURE__*/react_default.a.createElement(node.tag, Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({ + key: key + }, normalizeAttrs(node.attrs)), rootProps), (node.children || []).map(function (child, index) { + return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index)); + })); +} +function getSecondaryColor(primaryColor) { + // choose the second color + return Object(index_esm["generate"])(primaryColor)[0]; +} +function normalizeTwoToneColors(twoToneColor) { + if (!twoToneColor) { + return []; + } + return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor]; +} +// These props make sure that the SVG behaviours like general text. +// Reference: https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4 +var svgBaseProps = { + width: '1em', + height: '1em', + fill: 'currentColor', + 'aria-hidden': 'true', + focusable: 'false' +}; +var iconStyles = "\n.anticon {\n display: inline-flex;\n alignItems: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n"; +var utils_useInsertStyles = function useInsertStyles() { + var styleStr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : iconStyles; + var _useContext = Object(react["useContext"])(Context), + csp = _useContext.csp; + Object(react["useEffect"])(function () { + Object(dynamicCSS["b" /* updateCSS */])(styleStr, '@ant-design-icons', { + prepend: true, + csp: csp + }); + }, []); +}; +// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/components/IconBase.js + + +var _excluded = ["icon", "className", "onClick", "style", "primaryColor", "secondaryColor"]; + +var twoToneColorPalette = { + primaryColor: '#333', + secondaryColor: '#E6E6E6', + calculated: false +}; +function setTwoToneColors(_ref) { + var primaryColor = _ref.primaryColor, + secondaryColor = _ref.secondaryColor; + twoToneColorPalette.primaryColor = primaryColor; + twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor); + twoToneColorPalette.calculated = !!secondaryColor; +} +function getTwoToneColors() { + return Object(objectSpread2["a" /* default */])({}, twoToneColorPalette); +} +var IconBase_IconBase = function IconBase(props) { + var icon = props.icon, + className = props.className, + onClick = props.onClick, + style = props.style, + primaryColor = props.primaryColor, + secondaryColor = props.secondaryColor, + restProps = Object(objectWithoutProperties["a" /* default */])(props, _excluded); + var colors = twoToneColorPalette; + if (primaryColor) { + colors = { + primaryColor: primaryColor, + secondaryColor: secondaryColor || getSecondaryColor(primaryColor) + }; + } + utils_useInsertStyles(); + utils_warning(isIconDefinition(icon), "icon should be icon definiton, but got ".concat(icon)); + if (!isIconDefinition(icon)) { + return null; + } + var target = icon; + if (target && typeof target.icon === 'function') { + target = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, target), {}, { + icon: target.icon(colors.primaryColor, colors.secondaryColor) + }); + } + return generate(target.icon, "svg-".concat(target.name), Object(objectSpread2["a" /* default */])({ + className: className, + onClick: onClick, + style: style, + 'data-icon': target.name, + width: '1em', + height: '1em', + fill: 'currentColor', + 'aria-hidden': 'true' + }, restProps)); +}; +IconBase_IconBase.displayName = 'IconReact'; +IconBase_IconBase.getTwoToneColors = getTwoToneColors; +IconBase_IconBase.setTwoToneColors = setTwoToneColors; +/* harmony default export */ var components_IconBase = (IconBase_IconBase); +// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/components/twoTonePrimaryColor.js + + + +function setTwoToneColor(twoToneColor) { + var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor), + _normalizeTwoToneColo2 = Object(slicedToArray["a" /* default */])(_normalizeTwoToneColo, 2), + primaryColor = _normalizeTwoToneColo2[0], + secondaryColor = _normalizeTwoToneColo2[1]; + return components_IconBase.setTwoToneColors({ + primaryColor: primaryColor, + secondaryColor: secondaryColor + }); +} +function getTwoToneColor() { + var colors = components_IconBase.getTwoToneColors(); + if (!colors.calculated) { + return colors.primaryColor; + } + return [colors.primaryColor, colors.secondaryColor]; +} +// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + + + + +var AntdIcon_excluded = ["className", "icon", "spin", "rotate", "tabIndex", "onClick", "twoToneColor"]; + + + + + + +// Initial setting +// should move it to antd main repo? +setTwoToneColor('#1890ff'); +var Icon = /*#__PURE__*/react["forwardRef"](function (props, ref) { + var className = props.className, + icon = props.icon, + spin = props.spin, + rotate = props.rotate, + tabIndex = props.tabIndex, + onClick = props.onClick, + twoToneColor = props.twoToneColor, + restProps = Object(objectWithoutProperties["a" /* default */])(props, AntdIcon_excluded); + var _React$useContext = react["useContext"](Context), + _React$useContext$pre = _React$useContext.prefixCls, + prefixCls = _React$useContext$pre === void 0 ? 'anticon' : _React$useContext$pre, + rootClassName = _React$useContext.rootClassName; + var classString = classnames_default()(rootClassName, prefixCls, Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-").concat(icon.name), !!icon.name), "".concat(prefixCls, "-spin"), !!spin || icon.name === 'loading'), className); + var iconTabIndex = tabIndex; + if (iconTabIndex === undefined && onClick) { + iconTabIndex = -1; + } + var svgStyle = rotate ? { + msTransform: "rotate(".concat(rotate, "deg)"), + transform: "rotate(".concat(rotate, "deg)") + } : undefined; + var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor), + _normalizeTwoToneColo2 = Object(slicedToArray["a" /* default */])(_normalizeTwoToneColo, 2), + primaryColor = _normalizeTwoToneColo2[0], + secondaryColor = _normalizeTwoToneColo2[1]; + return /*#__PURE__*/react["createElement"]("span", Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({ + role: "img", + "aria-label": icon.name + }, restProps), {}, { + ref: ref, + tabIndex: iconTabIndex, + onClick: onClick, + className: classString + }), /*#__PURE__*/react["createElement"](components_IconBase, { + icon: icon, + primaryColor: primaryColor, + secondaryColor: secondaryColor, + style: svgStyle + })); +}); +Icon.displayName = 'AntdIcon'; +Icon.getTwoToneColor = getTwoToneColor; +Icon.setTwoToneColor = setTwoToneColor; +/* harmony default export */ var AntdIcon = __webpack_exports__["a"] = (Icon); + +/***/ }), + +/***/ "AOa7": +/*!**********************************************************!*\ + !*** ./node_modules/antd/es/breadcrumb/style/index.less ***! + \**********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), + +/***/ "DyWB": +/*!**************************************!*\ + !*** ./src/assets/images/QQCode.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/QQCode.bb741827.jpg"; + +/***/ }), + +/***/ "Hm3h": +/*!***************************************************************!*\ + !*** ./src/pages/Competitions/Entered/index.tsx + 16 modules ***! + \***************************************************************/ +/*! exports provided: default */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/components/AntdIcon.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/CloseOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./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/asyncToGenerator.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 ./src/.umi-production/core/umiExports.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/AuthenticationModel/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Entered/Enteredmodel/Addteams.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Entered/Enteredmodel/JoinModel.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/components/PhoneModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/breadcrumb/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/breadcrumb/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/empty/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/empty/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/menu/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/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/skeleton/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/skeleton/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/js-base64/base64.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Entered/index.less?modules (<- Module is not an ECMAScript module) */ +/*! 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 ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Entered/Enteredmodel/success.png (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Entered/dmpz.png (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Entered/sjjx.png (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Entered/xmcx.png (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Entered/xmtz.png (<- 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/modal/style/index.js +var style = __webpack_require__("2qtc"); + +// EXTERNAL MODULE: ./node_modules/antd/es/modal/index.js + 14 modules +var modal = __webpack_require__("kLXV"); + +// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js +var button_style = __webpack_require__("+L6B"); + +// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js +var es_button = __webpack_require__("2/Rp"); + +// EXTERNAL MODULE: ./node_modules/antd/es/skeleton/style/index.js +var skeleton_style = __webpack_require__("cWXX"); + +// EXTERNAL MODULE: ./node_modules/antd/es/skeleton/index.js + 8 modules +var skeleton = __webpack_require__("/ezw"); + +// 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 + 7 modules +var pagination = __webpack_require__("NUBc"); + +// EXTERNAL MODULE: ./node_modules/antd/es/breadcrumb/style/index.js +var breadcrumb_style = __webpack_require__("sPJy"); + +// EXTERNAL MODULE: ./node_modules/antd/es/breadcrumb/index.js + 3 modules +var breadcrumb = __webpack_require__("bE4q"); + +// EXTERNAL MODULE: ./node_modules/antd/es/message/style/index.js +var message_style = __webpack_require__("miYZ"); + +// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 1 modules +var message = __webpack_require__("tsqr"); + +// 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/objectWithoutProperties.js + 1 modules +var objectWithoutProperties = __webpack_require__("PpiC"); + +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__("q1tI"); +var react_default = /*#__PURE__*/__webpack_require__.n(react); + +// 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/.umi-production/core/umiExports.ts + 19 modules +var umiExports = __webpack_require__("9kvl"); + +// EXTERNAL MODULE: ./src/pages/Competitions/Entered/index.less?modules +var Enteredmodules = __webpack_require__("ipgu"); +var Enteredmodules_default = /*#__PURE__*/__webpack_require__.n(Enteredmodules); + +// CONCATENATED MODULE: ./src/pages/Competitions/Entered/Assembly/Assembly.tsx + + + +//报名首页 + +function Assembly(_ref) { + var setIsAddmodel = _ref.setIsAddmodel, + setJoin = _ref.setJoin, + HeaderDetail = _ref.HeaderDetail, + user = _ref.user, + dispatch = _ref.dispatch; + return /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.backgroundimg + }, /*#__PURE__*/react_default.a.createElement("p", { + className: Enteredmodules_default.a.countsize + }, "\u6B22\u8FCE\u62A5\u540D\u53C2\u52A0\u672C\u9879\u8D5B\u4E8B\uFF01\u5E73\u53F0\u5168\u9762\u652F\u6301\u5404\u7C7B\u7ADE\u8D5B\u7684\u5728\u7EBF\u8FD0\u884C\u7BA1\u7406\uFF0C"), /*#__PURE__*/react_default.a.createElement("p", { + className: Enteredmodules_default.a.countsize + }, "\u5927\u6570\u636E\u3001\u4EBA\u5DE5\u667A\u80FD\u3001\u5404\u7C7B\u82AF\u7247\u67B6\u6784\u7B49\u7ADE\u8D5B\u4EFB\u52A1\u5747\u53EF\u5728\u7EBF\u8FD0\u884C\u3001\u90E8\u7F72\u548C\u8BC4\u6D4B\u3002"), /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.buttoncoent + }, /*#__PURE__*/react_default.a.createElement("span", { + onClick: function onClick() { + var _user$userInfo; + if ((HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.is_authentication) && !(user === null || user === void 0 ? void 0 : (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.authentication)) { + dispatch({ + type: 'shixunsDetail/setActionTabs', + payload: { + key: 'Banner-Auth' + } + }); + return; + } + setJoin(true); + }, + className: Enteredmodules_default.a.addteams + }, "\u52A0\u5165\u6218\u961F"), /*#__PURE__*/react_default.a.createElement("span", { + onClick: function onClick() { + var _user$userInfo2; + if ((HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.is_authentication) && !(user === null || user === void 0 ? void 0 : (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.authentication)) { + dispatch({ + type: 'shixunsDetail/setActionTabs', + payload: { + key: 'Banner-Auth' + } + }); + return; + } + setIsAddmodel(true); + }, + className: Enteredmodules_default.a.createteams + }, "\u521B\u5EFA\u6218\u961F"))); +} +/* harmony default export */ var Assembly_Assembly = (Assembly); +// EXTERNAL MODULE: ./src/pages/Competitions/Entered/Enteredmodel/Addteams.tsx +var Addteams = __webpack_require__("qHvr"); + +// CONCATENATED MODULE: ./src/pages/Competitions/Entered/Assembly/TeamsNota.tsx +//没有数据时显示 + + +function Nulldata(_ref) { + var setIsAddmodel = _ref.setIsAddmodel, + setJoin = _ref.setJoin, + HeaderDetail = _ref.HeaderDetail, + user = _ref.user, + dispatch = _ref.dispatch; + return /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.nullnodata + }, /*#__PURE__*/react_default.a.createElement("img", { + src: __webpack_require__(/*! @/assets/images/Noentry.jpg */ "w3kr") + }), /*#__PURE__*/react_default.a.createElement("p", { + style: { + fontSize: '16px', + color: '#333333' + }, + className: "bootomtext" + }, "\u60A8\u5F53\u524D\u672A\u62A5\u540D\uFF0C\u8BF7\u5148", /*#__PURE__*/react_default.a.createElement("span", { + onClick: function onClick() { + var _user$userInfo; + if ((HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.is_authentication) && !(user === null || user === void 0 ? void 0 : (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.authentication)) { + dispatch({ + type: 'shixunsDetail/setActionTabs', + payload: { + key: 'Banner-Auth' + } + }); + return; + } + setJoin(true); + }, + style: { + color: '#1890FF', + cursor: "pointer" + } + }, "\u52A0\u5165\u6218\u961F"), "\u6216", /*#__PURE__*/react_default.a.createElement("span", { + onClick: function onClick() { + var _user$userInfo2; + if ((HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.is_authentication) && !(user === null || user === void 0 ? void 0 : (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.authentication)) { + dispatch({ + type: 'shixunsDetail/setActionTabs', + payload: { + key: 'Banner-Auth' + } + }); + return; + } + setIsAddmodel(true); + }, + style: { + color: '#1890FF', + cursor: "pointer" + } + }, "\u521B\u5EFA\u6218\u961F"), "\uFF0C"), /*#__PURE__*/react_default.a.createElement("p", { + style: { + fontSize: '16px', + color: '#333333' + } + }, "\u52A0\u5165/\u521B\u5EFA\u6218\u961F\u540E\u5C06\u81EA\u52A8\u62A5\u540D")); +} +/* harmony default export */ var TeamsNota = (Nulldata); +// 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 + 9 modules +var input = __webpack_require__("5rEg"); + +// CONCATENATED MODULE: ./src/pages/Competitions/Entered/Assembly/SelectTeam.tsx + + + +//搜索 + + +var Search = input["a" /* default */].Search; +function SelectTeam(_ref) { + var Count = _ref.Count, + Members_count = _ref.Members_count, + selectlist = _ref.selectlist, + setIsselect = _ref.setIsselect; + var _useState = Object(react["useState"])(''), + _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), + keywords = _useState2[0], + setKeyWords = _useState2[1]; + return /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.searchhead + }, /*#__PURE__*/react_default.a.createElement("p", { + className: Enteredmodules_default.a.selectleft + }, "\u6218\u961F\u603B\u6570\uFF1A", /*#__PURE__*/react_default.a.createElement("span", { + style: { + color: "#459BE5", + fontSize: "16px" + } + }, Count), /*#__PURE__*/react_default.a.createElement("span", { + style: { + marginLeft: "5px", + marginRight: "15px" + } + }, "\u4E2A"), " \u53C2\u8D5B\u603B\u4EBA\u6570\uFF1A", /*#__PURE__*/react_default.a.createElement("span", { + style: { + color: "#459BE5" + } + }, Members_count), /*#__PURE__*/react_default.a.createElement("span", { + style: { + marginLeft: '5px' + } + }, "\u4EBA")), /*#__PURE__*/react_default.a.createElement(Search, { + className: Enteredmodules_default.a.packinputs, + value: keywords, + placeholder: "\u8BF7\u8F93\u5165\u6218\u961F\u540D\u79F0\u641C\u7D22", + allowClear: true, + onChange: function onChange(e) { + setKeyWords(e.target.value); + }, + onSearch: function onSearch(value) { + setIsselect(true); + selectlist(keywords); + } + // onPressEnter={} + })); +} +/* harmony default export */ var Assembly_SelectTeam = (SelectTeam); +// EXTERNAL MODULE: ./node_modules/antd/es/dropdown/style/index.js +var dropdown_style = __webpack_require__("qVdP"); + +// EXTERNAL MODULE: ./node_modules/antd/es/dropdown/index.js +var dropdown = __webpack_require__("jsC+"); + +// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js +var tooltip_style = __webpack_require__("5Dmo"); + +// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 17 modules +var tooltip = __webpack_require__("3S7+"); + +// EXTERNAL MODULE: ./node_modules/antd/es/menu/style/index.js +var menu_style = __webpack_require__("lUTK"); + +// EXTERNAL MODULE: ./node_modules/antd/es/menu/index.js + 16 modules +var menu = __webpack_require__("BvKs"); + +// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules +var env = __webpack_require__("m3rI"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("VTBJ"); + +// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/FormOutlined.js +// This icon file is generated automatically. +var FormOutlined_FormOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z" } }, { "tag": "path", "attrs": { "d": "M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z" } }] }, "name": "form", "theme": "outlined" }; +/* harmony default export */ var asn_FormOutlined = (FormOutlined_FormOutlined); + +// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 4 modules +var AntdIcon = __webpack_require__("6VBw"); + +// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/FormOutlined.js + +// GENERATE BY ./scripts/generate.ts +// DON NOT EDIT IT MANUALLY + + + +var icons_FormOutlined_FormOutlined = function FormOutlined(props, ref) { + return /*#__PURE__*/react["createElement"](AntdIcon["a" /* default */], Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, props), {}, { + ref: ref, + icon: asn_FormOutlined + })); +}; +var RefIcon = /*#__PURE__*/react["forwardRef"](icons_FormOutlined_FormOutlined); +if (false) {} +/* harmony default export */ var icons_FormOutlined = (RefIcon); +// CONCATENATED MODULE: ./src/pages/Competitions/Entered/Assembly/ManagedTeams.tsx + + + + + + + + +//管理的战队 + + + + + +function managed(_ref) { + var item = _ref.item, + identifier = _ref.identifier, + isTipsshow = _ref.isTipsshow, + type = _ref.type, + setIslookModel = _ref.setIslookModel, + setTeam = _ref.setTeam, + setMembers = _ref.setMembers, + mode = _ref.mode, + kylinIdFlag = _ref.kylinIdFlag; + function jsCopy() { + var aa = "copy_invite_code".concat(item.id); + var e = document.getElementById(aa); + e.select(); + document.execCommand("Copy"); + message["b" /* default */].success("复制成功"); + } + function isSetting() { + setTeam(item); + if (type === 1) { + setMembers(true); + } else { + setIslookModel(true); + } + } + var mentItem = function mentItem() { + return /*#__PURE__*/react_default.a.createElement(menu["a" /* default */], null, /*#__PURE__*/react_default.a.createElement(menu["a" /* default */].Item, { + onClick: function onClick() { + return isTipsshow(type, item.id); + } + }, type === 1 ? '删除战队' : '退出战队')); + }; + return /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.ManagedTeams + }, /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.width18 + }, item && item.team_log ? /*#__PURE__*/react_default.a.createElement("img", { + className: Enteredmodules_default.a.imageradius, + src: env["a" /* default */].IMG_SERVER + "/".concat(item.team_log) + }) : /*#__PURE__*/react_default.a.createElement("span", { + className: Enteredmodules_default.a.spanradius + }, item.name.length > 2 ? item.name.substring(0, 2) : item.name), /*#__PURE__*/react_default.a.createElement("span", { + className: Enteredmodules_default.a.nametitle, + title: item.name + }, item.name ? item.name.length > 6 ? item.name.substring(0, 6) + '...' : item.name : '--'), type === 1 ? /*#__PURE__*/react_default.a.createElement(react_router_dom["a" /* Link */], { + to: "/competitions/index/".concat(identifier, "/UpdateTeanname/").concat(item.id) + }, /*#__PURE__*/react_default.a.createElement(tooltip["a" /* default */], { + overlayStyle: { + zIndex: 1 + }, + defaultVisible: true, + placement: "top", + visible: item && item.auto_create, + autoAdjustOverflow: false, + title: "请修改战队名称" + }, /*#__PURE__*/react_default.a.createElement(icons_FormOutlined, { + style: { + marginLeft: '5px' + } + }))) : null), /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.width15, + style: { + justifyContent: 'center' + } + }, /*#__PURE__*/react_default.a.createElement("img", { + className: Enteredmodules_default.a.loaderimg, + src: env["a" /* default */].IMG_SERVER + "/images/" + "".concat(item.creator.image_url) + }), /*#__PURE__*/react_default.a.createElement("span", { + style: { + marginLeft: '13px' + }, + title: item.creator.name + }, item.creator.name.length > 3 ? item.creator.name.substring(0, 3) + '...' : item.creator.name)), /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.width15, + style: { + width: '10%' + } + }, /*#__PURE__*/react_default.a.createElement("span", { + title: item.school_name + }, item.school_name ? item.school_name.length > 6 ? item.school_name.substring(0, 6) + '...' : item.school_name : '--')), /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.width18, + style: { + width: '20%' + } + }, "\u521B\u5EFA\u65F6\u95F4\uFF1A", /*#__PURE__*/react_default.a.createElement("span", { + title: item.created_at + }, item.created_at || '--')), /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.width15 + }, "\u9080\u8BF7\u7801\uFF1A", /*#__PURE__*/react_default.a.createElement("span", { + title: item.invite_code + }, item.invite_code || '--'), /*#__PURE__*/react_default.a.createElement("i", { + className: "iconfont icon-fuzhi font-14", + onClick: jsCopy, + style: { + display: "inline-block", + color: '#1890FF', + marginLeft: "5px", + marginRight: "10px", + cursor: 'pointer' + } + }), /*#__PURE__*/react_default.a.createElement("input", { + id: "copy_invite_code" + item.id, + value: item.invite_code || '--', + onChange: function onChange(e) {}, + style: { + opacity: '0', + position: 'absolute', + bottom: "15px" + } + })), /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.width15, + style: { + justifyContent: 'flex-end' + } + }, /*#__PURE__*/react_default.a.createElement("span", null, "\u6218\u961F\u6210\u5458\uFF1A", /*#__PURE__*/react_default.a.createElement("span", null, item.team_members ? item.team_members.length : '--')), type === 2 || !kylinIdFlag ? /*#__PURE__*/react_default.a.createElement("span", { + onClick: function onClick() { + return isSetting(); + }, + style: { + color: '#1890FF', + marginLeft: '10px', + cursor: 'pointer' + } + }, type === 1 ? '设置' : '查看') : "", item && item.active || type === 2 ? /*#__PURE__*/react_default.a.createElement("span", { + className: Enteredmodules_default.a.borderjingao, + style: { + visibility: 'hidden' + } + }) : /*#__PURE__*/react_default.a.createElement(tooltip["a" /* default */], { + placement: "top", + title: "请设置战队成员" + }, /*#__PURE__*/react_default.a.createElement("span", { + className: Enteredmodules_default.a.borderjingao + }, "!"))), mode === 3 && /*#__PURE__*/react_default.a.createElement(react_router_dom["a" /* Link */], { + to: "/competitions/index/".concat(identifier, "/teamDetail/").concat(item.id), + style: { + color: "#1890FF", + fontSize: '14px', + marginLeft: '30px', + cursor: 'pointer', + width: '6%' + } + }, "\u6218\u961F\u8BE6\u60C5"), /*#__PURE__*/react_default.a.createElement(dropdown["a" /* default */], { + overlay: mentItem + }, /*#__PURE__*/react_default.a.createElement("i", { + style: { + marginLeft: '30px' + }, + className: "iconfont icon-sandian" + }))); +} +/* harmony default export */ var Assembly_ManagedTeams = (managed); +// CONCATENATED MODULE: ./src/pages/Competitions/Entered/Assembly/AllTeams.tsx +//管理的战队 + + + + +function AllTeams(_ref) { + var item = _ref.item, + setIslookModel = _ref.setIslookModel, + setTeam = _ref.setTeam, + mode = _ref.mode; + var _useParams = Object(react_router["l" /* useParams */])(), + identifier = _useParams.identifier; + return /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.ManagedTeams + }, /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.width20 + }, item && item.team_log ? /*#__PURE__*/react_default.a.createElement("img", { + className: Enteredmodules_default.a.imageradius, + src: env["a" /* default */].IMG_SERVER + "/".concat(item.team_log) + }) : /*#__PURE__*/react_default.a.createElement("span", { + className: Enteredmodules_default.a.spanradius + }, item.name.length > 2 ? item.name.substring(0, 2) : item.name), /*#__PURE__*/react_default.a.createElement("span", { + title: item.name, + className: Enteredmodules_default.a.nametitle + }, item.name ? item.name.length > 6 ? item.name.substring(0, 6) + '...' : item.name : '--')), /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.width20 + }, /*#__PURE__*/react_default.a.createElement("img", { + className: Enteredmodules_default.a.loaderimg, + src: env["a" /* default */].IMG_SERVER + "/images/" + "".concat(item.creator.image_url) + }), /*#__PURE__*/react_default.a.createElement("span", { + title: item.creator.name, + style: { + marginLeft: '13px' + } + }, item.creator.name.length > 3 ? item.creator.name.substring(0, 3) + '...' : item.creator.name)), /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.width20 + }, /*#__PURE__*/react_default.a.createElement("span", { + title: item.school_name + }, item.school_name ? item.school_name.length > 6 ? item.school_name.substring(0, 6) + '...' : item.school_name : '--')), /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.width20 + }, "\u521B\u5EFA\u65F6\u95F4\uFF1A", /*#__PURE__*/react_default.a.createElement("span", null, item.created_at || '--')), /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.width20, + style: { + justifyContent: 'flex-end' + } + }, /*#__PURE__*/react_default.a.createElement("span", null, "\u6218\u961F\u6210\u5458\uFF1A", /*#__PURE__*/react_default.a.createElement("span", null, item.team_members ? item.team_members.length : '--')), /*#__PURE__*/react_default.a.createElement("span", { + onClick: function onClick() { + setIslookModel(true); + setTeam(item); + }, + style: { + color: '#1890FF', + marginLeft: '15px', + cursor: 'pointer' + } + }, "\u67E5\u770B")), mode === 3 && /*#__PURE__*/react_default.a.createElement(react_router_dom["a" /* Link */], { + to: "/competitions/index/".concat(identifier, "/teamDetail/").concat(item.id), + style: { + color: "#1890FF", + fontSize: '14px', + marginLeft: '30px', + cursor: 'pointer', + width: '10%' + } + }, "\u6218\u961F\u8BE6\u60C5")); +} +/* harmony default export */ var Assembly_AllTeams = (AllTeams); +// CONCATENATED MODULE: ./src/pages/Competitions/Entered/Enteredmodel/LookItem.tsx + + + +function LookItem(_ref) { + var teamitem = _ref.teamitem; + return /*#__PURE__*/react_default.a.createElement("div", null, /*#__PURE__*/react_default.a.createElement("div", { + style: { + display: 'flex', + alignItems: 'center', + flexDirection: 'initial', + height: '37px', + background: '#fff', + marginTop: '3px', + padding: '0px 15px' + } + }, /*#__PURE__*/react_default.a.createElement("span", { + style: { + flex: '1' + } + }, /*#__PURE__*/react_default.a.createElement("img", { + className: Enteredmodules_default.a.loaderimg, + src: env["a" /* default */].IMG_SERVER + "/images/" + "".concat(teamitem.image_url) + })), /*#__PURE__*/react_default.a.createElement("span", { + style: { + flex: '1' + } + }, teamitem && teamitem.name.length > 6 ? teamitem.name.substring(0, 6) + '...' : teamitem.name), /*#__PURE__*/react_default.a.createElement("span", { + style: { + flex: '2' + } + }, teamitem && teamitem.phone || '- -'), /*#__PURE__*/react_default.a.createElement("span", { + style: { + flex: '2' + } + }, teamitem && teamitem.school_name.length > 6 ? teamitem.school_name.substring(0, 6) + '...' : teamitem.school_name || '- - '), /*#__PURE__*/react_default.a.createElement("span", { + style: { + flex: '1' + } + }, teamitem && teamitem.identity || '- -'), /*#__PURE__*/react_default.a.createElement("span", { + style: { + flex: '2' + }, + className: "task-hide" + }, teamitem && teamitem.student_id || '- -'), /*#__PURE__*/react_default.a.createElement("span", { + style: { + flex: '2', + color: teamitem && teamitem.role === "leader" ? '#1890FF' : '#2ABD8C', + fontSize: '14px' + } + }, teamitem && teamitem.role === "leader" ? '队长' : '队员', /*#__PURE__*/react_default.a.createElement("span", { + style: { + color: '#F3730C' + } + }, teamitem && teamitem.creator ? '(创建者)' : '')))); +} +/* harmony default export */ var Enteredmodel_LookItem = (LookItem); +// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/CloseOutlined.js + 1 modules +var CloseOutlined = __webpack_require__("4i/N"); + +// CONCATENATED MODULE: ./src/pages/Competitions/Entered/Enteredmodel/LookTeamsModel.tsx + + +//查看战队 + + + +function LookTeam(_ref) { + var islookmodel = _ref.islookmodel, + mydatas = _ref.mydatas, + setIslookModel = _ref.setIslookModel; + return /*#__PURE__*/react_default.a.createElement(modal["a" /* default */], { + centered: true, + title: /*#__PURE__*/react_default.a.createElement("div", { + style: { + alignItems: 'center', + display: 'flex' + } + }, /*#__PURE__*/react_default.a.createElement("div", { + style: { + textAlign: 'left', + flex: '1' + } + }, mydatas.name), /*#__PURE__*/react_default.a.createElement(CloseOutlined["a" /* default */], { + onClick: function onClick() { + return setIslookModel(false); + }, + style: { + cursor: 'porint' + } + })), + visible: islookmodel, + closable: false, + destroyOnClose: true, + footer: null, + width: 900 + }, /*#__PURE__*/react_default.a.createElement("div", null, /*#__PURE__*/react_default.a.createElement("div", { + style: { + display: 'flex', + alignItems: 'center', + flexDirection: 'initial', + height: '37px', + background: '#FAFAFA', + padding: '0px 15px' + } + }, /*#__PURE__*/react_default.a.createElement("span", { + style: { + flex: '1' + } + }, "\u5934\u50CF"), /*#__PURE__*/react_default.a.createElement("span", { + style: { + flex: '1' + } + }, "\u59D3\u540D"), /*#__PURE__*/react_default.a.createElement("span", { + style: { + flex: '2' + } + }, "\u624B\u673A"), /*#__PURE__*/react_default.a.createElement("span", { + style: { + flex: '2' + } + }, "\u5B66\u6821/\u5355\u4F4D"), /*#__PURE__*/react_default.a.createElement("span", { + style: { + flex: '1' + } + }, "\u804C\u4E1A"), /*#__PURE__*/react_default.a.createElement("span", { + style: { + flex: '2' + } + }, "\u5B66\u53F7"), /*#__PURE__*/react_default.a.createElement("span", { + style: { + flex: '2' + } + }, "\u89D2\u8272"))), mydatas && mydatas.team_members && mydatas.team_members.map(function (item, index) { + return /*#__PURE__*/react_default.a.createElement(Enteredmodel_LookItem, { + key: index, + teamitem: item + }); + })); +} +/* harmony default export */ var LookTeamsModel = (LookTeam); +// CONCATENATED MODULE: ./src/pages/Competitions/Entered/Enteredmodel/TipsModel.tsx + + +//提示语 + + +//状态 登录1 删除2 +function Tips(_ref) { + var title = _ref.title, + content = _ref.content, + Tipsmodel = _ref.Tipsmodel, + setTipsmodel = _ref.setTipsmodel, + TipsSubmit = _ref.TipsSubmit, + TipsType = _ref.TipsType; + return /*#__PURE__*/react_default.a.createElement(modal["a" /* default */], { + centered: true, + title: /*#__PURE__*/react_default.a.createElement("div", { + style: { + alignItems: 'center', + display: 'flex' + } + }, /*#__PURE__*/react_default.a.createElement("div", { + style: { + textAlign: 'left', + flex: '1' + } + }, title), /*#__PURE__*/react_default.a.createElement(CloseOutlined["a" /* default */], { + onClick: function onClick() { + return setTipsmodel(false); + }, + style: { + cursor: 'porint' + } + })), + visible: Tipsmodel, + closable: false, + destroyOnClose: true, + onCancel: function onCancel() { + return setTipsmodel(false); + }, + onOk: function onOk() { + return TipsSubmit(TipsType); + } + }, content); +} +/* harmony default export */ var TipsModel = (Tips); +// EXTERNAL MODULE: ./src/pages/Competitions/Entered/Enteredmodel/JoinModel.tsx +var JoinModel = __webpack_require__("UfjD"); + +// CONCATENATED MODULE: ./src/pages/Competitions/Entered/Enteredmodel/TeammemberTItle.tsx + + +function Teammember() { + return /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.teammember + }, /*#__PURE__*/react_default.a.createElement("span", { + className: Enteredmodules_default.a.flex1 + }, "\u5934\u50CF"), /*#__PURE__*/react_default.a.createElement("span", { + className: Enteredmodules_default.a.flex1 + }, "\u59D3\u540D"), /*#__PURE__*/react_default.a.createElement("span", { + className: Enteredmodules_default.a.flex2 + }, "\u624B\u673A"), /*#__PURE__*/react_default.a.createElement("span", { + className: Enteredmodules_default.a.flex2 + }, "Email"), /*#__PURE__*/react_default.a.createElement("span", { + className: Enteredmodules_default.a.flex2 + }, "\u5B66\u6821/\u5355\u4F4D"), /*#__PURE__*/react_default.a.createElement("span", { + className: Enteredmodules_default.a.flex1 + }, "\u804C\u4E1A"), /*#__PURE__*/react_default.a.createElement("span", { + className: Enteredmodules_default.a.flex2 + }, "\u5B66\u53F7"), /*#__PURE__*/react_default.a.createElement("span", { + className: Enteredmodules_default.a.flex2 + }, "\u89D2\u8272"), /*#__PURE__*/react_default.a.createElement("span", { + className: Enteredmodules_default.a.flex1, + style: { + textAlign: 'center' + } + }, "\u64CD\u4F5C")); +} +/* harmony default export */ var TeammemberTItle = (Teammember); +// CONCATENATED MODULE: ./src/pages/Competitions/Entered/Enteredmodel/Teammembers.tsx + + + + + +function Teammembers_Teammember(_ref) { + var _teamitem$image_url; + var teamitem = _ref.teamitem, + index = _ref.index, + setTeams = _ref.setTeams, + Teams = _ref.Teams, + setLoaderid = _ref.setLoaderid; + var menuitem = function menuitem() { + return /*#__PURE__*/react_default.a.createElement(menu["a" /* default */], { + onClick: function onClick() { + setleader(); + } + }, /*#__PURE__*/react_default.a.createElement(menu["a" /* default */].Item, { + key: "0" + }, /*#__PURE__*/react_default.a.createElement("div", null, /*#__PURE__*/react_default.a.createElement("a", null, "\u8BBE\u7F6E\u4E3A\u961F\u957F"), /*#__PURE__*/react_default.a.createElement("p", null, "\u6743\u9650\uFF1A"), /*#__PURE__*/react_default.a.createElement("span", null, "\u7F16\u8F91\u6218\u961F\u3001\u8BBE\u7F6E\u6218\u961F\u6210\u5458\u3001 "), /*#__PURE__*/react_default.a.createElement("p", null, "\u8F6C\u79FB\u961F\u957F\u3001\u5220\u9664\u6218\u961F")))); + }; + function setleader() { + var data = Teams; + var leaderindex = Teams && Teams.findIndex(function (item) { + return item.role === 'leader'; + }); + data[index].role = 'leader'; + data[leaderindex].role = data && data[leaderindex].is_teacher ? 'teacher' : 'member'; + //排序 规则为 队长永远只第一位 创建者只第二位 + var datas = data.sort(function (item, item1) { + return item.creator ? -1 : 1; + }).sort(function (item, item1) { + return item.role === 'leader' ? -1 : 1; + }); + setTeams(datas); + setLoaderid(teamitem.id); + } + function deleteitem() { + var data = Teams && Teams.filter(function (item) { + return item.id != teamitem.id; + }); + setTeams(data); + } + return /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.teammembers + }, /*#__PURE__*/react_default.a.createElement("span", { + className: Enteredmodules_default.a.flex1 + }, /*#__PURE__*/react_default.a.createElement("img", { + className: Enteredmodules_default.a.loaderimg, + src: "".concat(((_teamitem$image_url = teamitem.image_url) === null || _teamitem$image_url === void 0 ? void 0 : _teamitem$image_url.indexOf("http")) > -1 ? teamitem.image_url : env["a" /* default */].IMG_SERVER + "/images/" + teamitem.image_url) + })), /*#__PURE__*/react_default.a.createElement("span", { + className: Enteredmodules_default.a.flex1 + }, teamitem && teamitem.name.length > 6 ? teamitem.name.substring(0, 6) + '...' : teamitem.name), /*#__PURE__*/react_default.a.createElement("span", { + className: Enteredmodules_default.a.flex2 + }, teamitem && teamitem.phone || '- -'), /*#__PURE__*/react_default.a.createElement("span", { + className: Enteredmodules_default.a.flex2 + }, teamitem && teamitem.mail || '- -'), /*#__PURE__*/react_default.a.createElement("span", { + className: Enteredmodules_default.a.flex2 + }, teamitem && teamitem.school_name && teamitem.school_name.length > 6 ? teamitem.school_name.substring(0, 6) + '...' : teamitem.school_name || '- - '), /*#__PURE__*/react_default.a.createElement("span", { + className: Enteredmodules_default.a.flex1 + }, teamitem && teamitem.identity || '- -'), /*#__PURE__*/react_default.a.createElement("span", { + className: "".concat(Enteredmodules_default.a.flex2, " ").concat(Enteredmodules_default.a.task_hide) + }, teamitem && teamitem.student_id || '- -'), /*#__PURE__*/react_default.a.createElement("span", { + className: Enteredmodules_default.a.flex2, + style: { + color: teamitem && teamitem.role === "leader" ? '#1890FF' : '#1890FF', + fontSize: '14px' + } + }, teamitem && teamitem.role === "leader" ? '队长' : '队员', /*#__PURE__*/react_default.a.createElement("span", { + style: { + color: '#F3730C' + } + }, teamitem && teamitem.creator ? '(创建者)' : '')), /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.flex1 + }, /*#__PURE__*/react_default.a.createElement("span", { + style: { + color: '#f73737' + }, + onClick: function onClick() { + return deleteitem(); + }, + className: " ".concat(Enteredmodules_default.a.deleteitem) + }, teamitem && teamitem.role === "leader" || teamitem && teamitem.creator ? '' : '删除'))); +} +/* harmony default export */ var Teammembers = (Teammembers_Teammember); +// EXTERNAL MODULE: ./node_modules/antd/es/empty/style/index.js +var empty_style = __webpack_require__("R9oj"); + +// EXTERNAL MODULE: ./node_modules/antd/es/empty/index.js + 2 modules +var empty = __webpack_require__("ECub"); + +// CONCATENATED MODULE: ./src/pages/Competitions/Entered/Enteredmodel/DownTeacher.tsx + + + + +//教师列表 + + +function Downteacher(_ref) { + var teachers = _ref.teachers, + setTeams = _ref.setTeams, + Teams = _ref.Teams, + HeaderDetail = _ref.HeaderDetail; + var teacher = teachers.map(function (item, index) { + return /*#__PURE__*/react_default.a.createElement("div", { + key: index, + className: Enteredmodules_default.a.teachname, + onMouseDown: function onMouseDown() { + if (!(item === null || item === void 0 ? void 0 : item.authentication) && (HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.is_authentication)) { + message["b" /* default */].info('当前竞赛需要实名认证,该用户未进行实名认证不能参与。'); + return; + } + if (item.enrolled) { + message["b" /* default */].info('该用户已经加入战队'); + return; + } + if ((Teams === null || Teams === void 0 ? void 0 : Teams.filter(function (team) { + return item.id === team.id; + }).length) > 0) { + message["b" /* default */].info('该用户已在战队列表,请不要重复添加'); + return; + } + var teachers = Teams; + teachers.push(item); + setTeams(teachers); + } + }, /*#__PURE__*/react_default.a.createElement("img", { + style: { + marginLeft: '10px', + marginRight: '3px' + }, + className: Enteredmodules_default.a.loaderimg, + src: "".concat(item.image_url) + }), /*#__PURE__*/react_default.a.createElement("span", { + style: { + textAlign: 'left', + width: '20%', + padding: '0px 5px' + } + }, item.name || '- -'), /*#__PURE__*/react_default.a.createElement("span", { + style: { + textAlign: 'left', + width: '18%', + padding: '0px 5px' + } + }, item.phone || '- -'), /*#__PURE__*/react_default.a.createElement("span", { + style: { + textAlign: 'left', + width: '18%', + padding: '0px 5px' + }, + className: Enteredmodules_default.a.task_hide + }, item.identity || '- -'), /*#__PURE__*/react_default.a.createElement("span", { + style: { + textAlign: 'left', + width: '20%', + padding: '0px 5px' + } + }, item.school_name || '- -'), /*#__PURE__*/react_default.a.createElement("span", { + style: { + textAlign: 'left', + width: '24%', + color: item.enrolled ? '#28be6c' : !item.enrolled && item.enrollable === false ? '#F3730C' : '', + padding: '0px 5px', + fontSize: '12px' + } + }, item.enrolled ? '已加入本战队' : !item.enrolled && item.enrollable === false ? '已加入其他战队' : '')); + }); + return /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.teacherdown + }, teachers.length === 0 ? /*#__PURE__*/react_default.a.createElement(empty["a" /* default */], { + description: /*#__PURE__*/react_default.a.createElement("div", null, /*#__PURE__*/react_default.a.createElement("p", null, "\u641C\u7D22\u7ED3\u679C\u4E3A\u7A7A"), /*#__PURE__*/react_default.a.createElement("p", null, "\u6210\u529F\u6CE8\u518C\u540E\u7684\u8D26\u53F7\uFF08\u804C\u4E1A\u4E3A\u8001\u5E08\uFF09"), /*#__PURE__*/react_default.a.createElement("p", null, "\u624D\u80FD\u88AB\u641C\u7D22\u5230\u54E6~")), + image: empty["a" /* default */].PRESENTED_IMAGE_SIMPLE + }) : /*#__PURE__*/react_default.a.createElement("div", null, teacher)); +} +/* harmony default export */ var DownTeacher = (Downteacher); +// CONCATENATED MODULE: ./src/pages/Competitions/Entered/Enteredmodel/DownStudents.tsx + + + + +//教师列表 + + +function DownStudent(_ref) { + var students = _ref.students, + setTeams = _ref.setTeams, + Teams = _ref.Teams, + HeaderDetail = _ref.HeaderDetail; + var teacher = students.map(function (item, index) { + return /*#__PURE__*/react_default.a.createElement("div", { + key: index, + className: Enteredmodules_default.a.teachname, + onMouseDown: function onMouseDown() { + if (!(item === null || item === void 0 ? void 0 : item.authentication) && (HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.is_authentication)) { + message["b" /* default */].info('当前竞赛需要实名认证,该用户未进行实名认证不能参与。'); + return; + } + if (item.enrolled) { + message["b" /* default */].info('该用户已经加入战队'); + return; + } + if ((Teams === null || Teams === void 0 ? void 0 : Teams.filter(function (team) { + return item.id === team.id; + }).length) > 0) { + message["b" /* default */].info('该用户已在战队列表,请不要重复添加'); + return; + } + // console.log('students',Teams,item); + // return + var students = Teams; + students.push(item); + setTeams(students); + } + }, /*#__PURE__*/react_default.a.createElement("img", { + style: { + marginLeft: '10px', + marginRight: '3px' + }, + className: Enteredmodules_default.a.loaderimg, + src: "".concat(item.image_url) + }), /*#__PURE__*/react_default.a.createElement("span", { + style: { + textAlign: 'left', + width: '20%', + padding: '0px 5px' + } + }, item.name || '- -'), /*#__PURE__*/react_default.a.createElement("span", { + style: { + textAlign: 'left', + width: '18%', + padding: '0px 5px' + } + }, item.phone || '- -'), /*#__PURE__*/react_default.a.createElement("span", { + style: { + textAlign: 'left', + width: '18%', + padding: '0px 5px' + }, + className: Enteredmodules_default.a.task_hide + }, item.student_id ? '学号' + item.student_id : '- -'), /*#__PURE__*/react_default.a.createElement("span", { + style: { + textAlign: 'left', + width: '20%', + padding: '0px 5px' + } + }, item.school_name || '- -'), /*#__PURE__*/react_default.a.createElement("span", { + style: { + textAlign: 'left', + width: '24%', + color: item.enrolled ? '#28be6c' : !item.enrolled && item.enrollable === false ? '#F3730C' : '', + padding: '0px 5px', + fontSize: '12px' + } + }, item.enrolled ? '已加入本战队' : !item.enrolled && item.enrollable === false ? '已加入其他战队' : '')); + }); + return /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.teacherdown + }, students.length === 0 ? /*#__PURE__*/react_default.a.createElement(empty["a" /* default */], { + description: /*#__PURE__*/react_default.a.createElement("div", null, /*#__PURE__*/react_default.a.createElement("p", null, "\u641C\u7D22\u7ED3\u679C\u4E3A\u7A7A"), /*#__PURE__*/react_default.a.createElement("p", null, "\u6210\u529F\u6CE8\u518C\u540E\u7684\u8D26\u53F7\uFF08\u804C\u4E1A\u4E3A\u5B66\u751F\uFF09"), /*#__PURE__*/react_default.a.createElement("p", null, "\u624D\u80FD\u88AB\u641C\u7D22\u5230\u54E6~")), + image: empty["a" /* default */].PRESENTED_IMAGE_SIMPLE + }) : /*#__PURE__*/react_default.a.createElement("div", null, teacher)); +} +/* harmony default export */ var DownStudents = (DownStudent); +// EXTERNAL MODULE: ./node_modules/js-base64/base64.js +var base64 = __webpack_require__("J66h"); + +// CONCATENATED MODULE: ./src/pages/Competitions/Entered/Enteredmodel/SetmembersModel.tsx + + + + + + + + + + +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + + + +var SetmembersModel_Search = input["a" /* default */].Search; + + + + + +//设置战队成员 + +function Setmembers(_ref) { + var _StaffDetail$teacher_, _StaffDetail$teacher_2, _StaffDetail$member_s, _StaffDetail$member_s2; + var Membersshow = _ref.Membersshow, + setClose = _ref.setClose, + HeaderDetail = _ref.HeaderDetail, + StaffDetail = _ref.StaffDetail, + setMembers = _ref.setMembers, + dispatch = _ref.dispatch, + identifier = _ref.identifier, + mydatas = _ref.mydatas, + selectlist = _ref.selectlist; + var _useState = Object(react["useState"])(''), + _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), + teachname = _useState2[0], + setTeachname = _useState2[1]; + var _useState3 = Object(react["useState"])(''), + _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2), + studentname = _useState4[0], + setStudentname = _useState4[1]; //搜索老师数据 + var _useState5 = Object(react["useState"])([]), + _useState6 = Object(slicedToArray["a" /* default */])(_useState5, 2), + teachers = _useState6[0], + setTeachers = _useState6[1]; + var _useState7 = Object(react["useState"])(false), + _useState8 = Object(slicedToArray["a" /* default */])(_useState7, 2), + downteacher = _useState8[0], + setDownteacher = _useState8[1]; //搜索学生数据 + var _useState9 = Object(react["useState"])([]), + _useState10 = Object(slicedToArray["a" /* default */])(_useState9, 2), + students = _useState10[0], + setStudents = _useState10[1]; + var _useState11 = Object(react["useState"])(false), + _useState12 = Object(slicedToArray["a" /* default */])(_useState11, 2), + downstudents = _useState12[0], + setDownstudents = _useState12[1]; //战队成员 + var _useState13 = Object(react["useState"])([]), + _useState14 = Object(slicedToArray["a" /* default */])(_useState13, 2), + Teams = _useState14[0], + setTeams = _useState14[1]; //队长id + var _useState15 = Object(react["useState"])([]), + _useState16 = Object(slicedToArray["a" /* default */])(_useState15, 2), + loaderid = _useState16[0], + setLoaderid = _useState16[1]; //提交时学生数量 与老师数量 + var _useState17 = Object(react["useState"])([]), + _useState18 = Object(slicedToArray["a" /* default */])(_useState17, 2), + TeacherNumber = _useState18[0], + setTeacherNumber = _useState18[1]; + var _useState19 = Object(react["useState"])([]), + _useState20 = Object(slicedToArray["a" /* default */])(_useState19, 2), + StudentNumber = _useState20[0], + setStudentNumber = _useState20[1]; //判断是否需要弹出警告 + var _useState21 = Object(react["useState"])(false), + _useState22 = Object(slicedToArray["a" /* default */])(_useState21, 2), + isTwarning = _useState22[0], + setIsTwarning = _useState22[1]; + var _useState23 = Object(react["useState"])(false), + _useState24 = Object(slicedToArray["a" /* default */])(_useState23, 2), + isSwarning = _useState24[0], + setIsSwarning = _useState24[1]; + Object(react["useEffect"])(function () { + //排序 规则为 队长永远只第一位 创建者只第二位 + var datas = mydatas && mydatas.team_members.sort(function (item, item1) { + return item.creator ? -1 : 1; + }).sort(function (item, item1) { + return item.role === 'leader' ? -1 : 1; + }); + setTeams(datas); + }, []); + + //查找学生 + function getStudents() { + return _getStudents.apply(this, arguments); + } //查找老师 + function _getStudents() { + _getStudents = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { + var data; + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return dispatch({ + type: 'competitions/getStudents', + payload: { + identifier: identifier, + keyword: studentname, + team_id: mydatas && mydatas.id, + openkey: base64["Base64"].encode("05e9081ede2e7425db064df44b5fb1897234f44f922443b89597d17b60dc8f3e"), + sign: "cdf0f69b4d5b4293f7914cc1f1f31742" + } + }); + case 2: + data = _context.sent; + if (data) { + setStudents(data.teachers); + } + case 4: + case "end": + return _context.stop(); + } + }, _callee); + })); + return _getStudents.apply(this, arguments); + } + function getteacher() { + return _getteacher.apply(this, arguments); + } //提交数据 + function _getteacher() { + _getteacher = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() { + var data; + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return dispatch({ + type: 'competitions/getTeacher', + payload: { + openkey: base64["Base64"].encode("05e9081ede2e7425db064df44b5fb1897234f44f922443b89597d17b60dc8f3e"), + sign: "cdf0f69b4d5b4293f7914cc1f1f31742", + identifier: identifier, + keyword: teachname, + team_id: mydatas && mydatas.id + } + }); + case 2: + data = _context2.sent; + if (data) { + // console.log(data.teachers); + setTeachers(data.teachers); + } + case 4: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return _getteacher.apply(this, arguments); + } + function submitTeam() { + return _submitTeam.apply(this, arguments); + } + function _submitTeam() { + _submitTeam = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() { + var _StaffDetail$teacher_3, _StaffDetail$member_s3; + var member_ids, teacher_ids, gitlink_users, data; + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + member_ids = []; + teacher_ids = []; + gitlink_users = []; + Teams && Teams.map(function (item, index) { + // if (item.is_teacher) { + // teacher_ids.push(item.id) + // } else { + // member_ids.push(item.id) + // } + gitlink_users.push({ + login: item.login, + lastname: item.lastname, + nickname: item.nickname, + mail: item.mail, + identity: item.identity, + school_name: item.school_name + }); + }); + console.log("addTeam:", gitlink_users); + setTeacherNumber(teacher_ids.length); + setStudentNumber(member_ids.length); + if (!((StaffDetail === null || StaffDetail === void 0 ? void 0 : (_StaffDetail$teacher_3 = StaffDetail.teacher_staff) === null || _StaffDetail$teacher_3 === void 0 ? void 0 : _StaffDetail$teacher_3.maximum) < teacher_ids.length)) { + _context3.next = 10; + break; + } + setIsTwarning(true); + return _context3.abrupt("return"); + case 10: + setIsTwarning(false); + if (!((StaffDetail === null || StaffDetail === void 0 ? void 0 : (_StaffDetail$member_s3 = StaffDetail.member_staff) === null || _StaffDetail$member_s3 === void 0 ? void 0 : _StaffDetail$member_s3.maximum) < member_ids.length)) { + _context3.next = 14; + break; + } + setIsSwarning(true); + return _context3.abrupt("return"); + case 14: + setIsSwarning(false); + _context3.next = 17; + return dispatch({ + type: 'competitions/SubmitTeam', + payload: { + openkey: base64["Base64"].encode("05e9081ede2e7425db064df44b5fb1897234f44f922443b89597d17b60dc8f3e"), + sign: "cdf0f69b4d5b4293f7914cc1f1f31742", + identifier: identifier, + teamid: mydatas && mydatas.id, + member_ids: member_ids, + teacher_ids: teacher_ids, + leader: loaderid, + gitlink_users: gitlink_users + } + }); + case 17: + data = _context3.sent; + if (data && data.status === 0) { + // console.log(data.teachers); + message["b" /* default */].info('修改成功'); + setMembers(false); + selectlist(''); + } + case 19: + case "end": + return _context3.stop(); + } + }, _callee3); + })); + return _submitTeam.apply(this, arguments); + } + return /*#__PURE__*/react_default.a.createElement(modal["a" /* default */], { + centered: true, + title: /*#__PURE__*/react_default.a.createElement("div", { + style: { + alignItems: 'center', + display: 'flex' + } + }, /*#__PURE__*/react_default.a.createElement("div", { + style: { + textAlign: 'left', + flex: '1' + } + }, "\u8BBE\u7F6E\u6218\u961F\u6210\u5458"), /*#__PURE__*/react_default.a.createElement(CloseOutlined["a" /* default */], { + onClick: function onClick() { + return setMembers(false); + }, + style: { + cursor: 'porint' + } + })), + visible: Membersshow, + closable: false, + destroyOnClose: true, + onOk: function onOk() { + submitTeam(); + }, + onCancel: function onCancel() { + setMembers(false); + setClose(); + //selectlist(''); + }, + width: 900 + }, /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.setmembers + }, /*#__PURE__*/react_default.a.createElement("p", null, "\u6DFB\u52A0\u6559\u5E08"), /*#__PURE__*/react_default.a.createElement(dropdown["a" /* default */], { + overlay: /*#__PURE__*/react_default.a.createElement(DownTeacher, { + HeaderDetail: HeaderDetail, + teachers: teachers, + setTeams: setTeams, + Teams: Teams + }), + getPopupContainer: function getPopupContainer(trigger) { + return trigger.parentNode; + }, + visible: downteacher + }, /*#__PURE__*/react_default.a.createElement(SetmembersModel_Search, { + value: teachname, + placeholder: "\u8BF7\u641C\u7D22\u6559\u5E08\u59D3\u540D/\u624B\u673A\u53F7\u5E76\u6DFB\u52A0", + allowClear: true, + onChange: function onChange(e) { + setTeachname(e.target.value); + }, + onSearch: function onSearch(value) { + setDownteacher(true); + getteacher(); + }, + onBlur: function onBlur() { + setDownteacher(false); + } + })), /*#__PURE__*/react_default.a.createElement("p", null, "\u6DFB\u52A0\u5B66\u751F/\u4E13\u4E1A\u4EBA\u58EB"), /*#__PURE__*/react_default.a.createElement(dropdown["a" /* default */], { + overlay: /*#__PURE__*/react_default.a.createElement(DownStudents, { + HeaderDetail: HeaderDetail, + students: students, + setTeams: setTeams, + Teams: Teams + }), + getPopupContainer: function getPopupContainer(trigger) { + return trigger.parentNode; + }, + visible: downstudents + }, /*#__PURE__*/react_default.a.createElement(SetmembersModel_Search, { + value: studentname, + placeholder: "\u8BF7\u641C\u7D22\u961F\u5458\u59D3\u540D/\u624B\u673A\u53F7\u5E76\u6DFB\u52A0", + allowClear: true, + onChange: function onChange(e) { + setStudentname(e.target.value); + }, + onSearch: function onSearch(value) { + setDownstudents(true); + getStudents(); + }, + onBlur: function onBlur() { + setDownstudents(false); + } + })), /*#__PURE__*/react_default.a.createElement("div", { + style: { + display: 'flex', + marginBottom: '12px', + marginTop: '15px' + } + }, /*#__PURE__*/react_default.a.createElement("p", { + style: { + flex: '1' + } + }, "\u8BF7\u6DFB\u52A0\u6218\u961F\u6210\u5458\uFF1A", StaffDetail && StaffDetail.teacher_staff ? /*#__PURE__*/react_default.a.createElement("span", null, StaffDetail && StaffDetail.teacher_staff.minimum, "-", StaffDetail && StaffDetail.teacher_staff.maximum, "\u540D\u6559\u5E08") : '', StaffDetail && StaffDetail.teacher_staff && StaffDetail.member_staff ? '/' : '', StaffDetail && StaffDetail.member_staff ? /*#__PURE__*/react_default.a.createElement("span", null, StaffDetail && StaffDetail.member_staff.minimum, "-", StaffDetail && StaffDetail.member_staff.maximum, "\u540D\u5B66\u751F") : ''), /*#__PURE__*/react_default.a.createElement("span", { + style: { + color: '#F3730C' + } + }, "\u5EFA\u8BAE\u4F18\u5148\u5C06\u6559\u5E08\u8BBE\u7F6E\u4E3A\u961F\u957F")), /*#__PURE__*/react_default.a.createElement(TeammemberTItle, null), /*#__PURE__*/react_default.a.createElement("div", { + style: { + height: '240px', + overflow: 'auto' + } + }, Teams && Teams.map(function (item, index) { + return /*#__PURE__*/react_default.a.createElement(Teammembers, { + key: index, + teamitem: item, + index: index, + setTeams: setTeams, + Teams: Teams, + setLoaderid: setLoaderid + }); + })), isTwarning && /*#__PURE__*/react_default.a.createElement("p", { + style: { + marginLeft: "53px", + color: "#D0021B", + fontSize: "12px", + marginTop: "9px" + } + }, "\u5BFC\u5E08\u9700\u4E3A", StaffDetail === null || StaffDetail === void 0 ? void 0 : (_StaffDetail$teacher_ = StaffDetail.teacher_staff) === null || _StaffDetail$teacher_ === void 0 ? void 0 : _StaffDetail$teacher_.minimum, "-", StaffDetail === null || StaffDetail === void 0 ? void 0 : (_StaffDetail$teacher_2 = StaffDetail.teacher_staff) === null || _StaffDetail$teacher_2 === void 0 ? void 0 : _StaffDetail$teacher_2.maximum, "\u4EBA,\u73B0\u4E3A", TeacherNumber, "\u4EBA"), isSwarning && /*#__PURE__*/react_default.a.createElement("p", { + style: { + marginLeft: "53px", + color: "#D0021B", + fontSize: "12px", + marginTop: "9px" + } + }, "\u6218\u961F\u6210\u5458(\u804C\u4E1A\u4E3A\u5B66\u751F)\u9700\u4E3A", StaffDetail === null || StaffDetail === void 0 ? void 0 : (_StaffDetail$member_s = StaffDetail.member_staff) === null || _StaffDetail$member_s === void 0 ? void 0 : _StaffDetail$member_s.minimum, "-", StaffDetail === null || StaffDetail === void 0 ? void 0 : (_StaffDetail$member_s2 = StaffDetail.member_staff) === null || _StaffDetail$member_s2 === void 0 ? void 0 : _StaffDetail$member_s2.maximum, "\u4EBA,\u73B0\u4E3A", StudentNumber, "\u4EBA"))); +} +/* harmony default export */ var SetmembersModel = (Setmembers); +// EXTERNAL MODULE: ./src/pages/Competitions/Entered/Enteredmodel/success.png +var success = __webpack_require__("0SVz"); +var success_default = /*#__PURE__*/__webpack_require__.n(success); + +// CONCATENATED MODULE: ./src/pages/Competitions/Entered/Enteredmodel/SignUpSucessModel.tsx + + + + + + + + +//报名成功提示 +function SignupSuccess(_ref) { + var isShowmodel = _ref.isShowmodel, + isSignUphide = _ref.isSignUphide; + var _useState = Object(react["useState"])([]), + _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), + data = _useState2[0], + setData = _useState2[1]; + Object(react["useEffect"])(function () { + var data = JSON.parse(localStorage.getItem('item')); + setData(data); + }, []); + return /*#__PURE__*/react_default.a.createElement(modal["a" /* default */], { + visible: isShowmodel, + footer: null, + centered: true, + onCancel: function onCancel() { + isSignUphide(false); + }, + width: 600, + maskClosable: false + }, /*#__PURE__*/react_default.a.createElement("div", { + style: { + display: "flex", + alignItems: 'center' + } + }, /*#__PURE__*/react_default.a.createElement("img", { + src: success_default.a, + style: { + marginRight: '35px', + width: '60px', + height: '60px' + } + }), " ", /*#__PURE__*/react_default.a.createElement("span", { + style: { + fontSize: '24px', + color: '#333333' + } + }, "\u62A5\u540D\u6210\u529F")), /*#__PURE__*/react_default.a.createElement("div", { + style: { + marginLeft: '100px', + marginTop: '41px' + } + }, /*#__PURE__*/react_default.a.createElement("p", { + className: "task-hide" + }, "\u606D\u559C\u4F60\u6210\u529F\u62A5\u540D\uFF1A", /*#__PURE__*/react_default.a.createElement("span", { + style: { + color: "#333333" + } + }, data === null || data === void 0 ? void 0 : data.competition, "-", data === null || data === void 0 ? void 0 : data.sub_title)), /*#__PURE__*/react_default.a.createElement("p", { + className: "task-hide" + }, "\u7CFB\u7EDF\u5DF2\u4E3A\u60A8\u81EA\u52A8\u521B\u5EFA\u6218\u961F\uFF0C\u6218\u961F\u540D\u79F0\u4E3A\uFF1A", /*#__PURE__*/react_default.a.createElement("span", { + style: { + color: '#333333' + } + }, data === null || data === void 0 ? void 0 : data.team_name)), /*#__PURE__*/react_default.a.createElement("p", { + style: { + marginTop: '40px' + } + }, "\u4F60\u53EF\u4EE5\u53BB\u5230\uFF3B\u7F16\u8F91\u6218\u961F\uFF3D\u9875\u9762\uFF0C\u4FEE\u6539\u6218\u961F\u540D\u79F0\u548C\u4E0A\u4F20logo\uFF0C\u4E5F\u53EF\u4EE5\u53BB\uFF3B\u8D5B\u4E8B\u8BE6\u60C5\uFF3D \u9875\u9762\u66F4\u8BE6\u7EC6\u7684\u4E86\u89E3\u6BD4\u8D5B\u3002")), /*#__PURE__*/react_default.a.createElement("p", { + style: { + marginTop: '30px', + textAlign: 'center' + } + }, /*#__PURE__*/react_default.a.createElement(react_router_dom["a" /* Link */], { + style: { + marginRight: '20px' + }, + to: "/competitions/index/".concat(data === null || data === void 0 ? void 0 : data.identify) + }, /*#__PURE__*/react_default.a.createElement(es_button["a" /* default */], null, "\u8D5B\u4E8B\u8BE6\u60C5")), /*#__PURE__*/react_default.a.createElement(react_router_dom["a" /* Link */], { + style: { + marginLeft: '20px' + }, + to: "/competitions/index/".concat(data === null || data === void 0 ? void 0 : data.identify, "/UpdateTeanname/").concat(data === null || data === void 0 ? void 0 : data.team_id) + }, /*#__PURE__*/react_default.a.createElement(es_button["a" /* default */], { + type: "primary" + }, "\u7F16\u8F91\u6218\u961F")))); +} +/* harmony default export */ var SignUpSucessModel = (SignupSuccess); +// EXTERNAL MODULE: ./src/components/AuthenticationModel/index.tsx +var AuthenticationModel = __webpack_require__("zrhs"); + +// EXTERNAL MODULE: ./src/pages/Competitions/Entered/dmpz.png +var dmpz = __webpack_require__("Vh0m"); +var dmpz_default = /*#__PURE__*/__webpack_require__.n(dmpz); + +// EXTERNAL MODULE: ./src/pages/Competitions/Entered/sjjx.png +var sjjx = __webpack_require__("hxTS"); +var sjjx_default = /*#__PURE__*/__webpack_require__.n(sjjx); + +// EXTERNAL MODULE: ./src/pages/Competitions/Entered/xmcx.png +var xmcx = __webpack_require__("fpBZ"); +var xmcx_default = /*#__PURE__*/__webpack_require__.n(xmcx); + +// EXTERNAL MODULE: ./src/pages/Competitions/Entered/xmtz.png +var xmtz = __webpack_require__("61Iv"); +var xmtz_default = /*#__PURE__*/__webpack_require__.n(xmtz); + +// EXTERNAL MODULE: ./src/utils/util.tsx + 6 modules +var util = __webpack_require__("1vsH"); + +// EXTERNAL MODULE: ./src/pages/Competitions/components/PhoneModal.tsx + 1 modules +var PhoneModal = __webpack_require__("QtKJ"); + +// CONCATENATED MODULE: ./src/pages/Competitions/Entered/index.tsx + + + + + + + + + + + + + + + +function Entered_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ Entered_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + + + + + + + + + + + + + + + + + + + + + +//竞赛定制化需求id池 +var ids = [45, 46, 49, 50, 51, 52, 71]; +var Entered_competitionDetails = function competitionDetails(_ref) { + var _user$userInfo4, _user$userInfo5, _user$userInfo6, _user$userInfo7, _user$userInfo8, _user$userInfo9, _user$userInfo10, _user$userInfo11; + var globalSetting = _ref.globalSetting, + loading = _ref.loading, + dispatch = _ref.dispatch, + user = _ref.user, + props = Object(objectWithoutProperties["a" /* default */])(_ref, ["globalSetting", "loading", "dispatch", "user"]); + var _useState = Object(react["useState"])([]), + _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), + HeaderDetail = _useState2[0], + setHeaderDetail = _useState2[1]; + var _useState3 = Object(react["useState"])([]), + _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2), + StaffDetail = _useState4[0], + setStaffDetail = _useState4[1]; + var _useParams = Object(react_router["l" /* useParams */])(), + identifier = _useParams.identifier; + var _useState5 = Object(react["useState"])([]), + _useState6 = Object(slicedToArray["a" /* default */])(_useState5, 2), + TeamData = _useState6[0], + setTeamData = _useState6[1]; //接口返回 + var _useState7 = Object(react["useState"])([]), + _useState8 = Object(slicedToArray["a" /* default */])(_useState7, 2), + TeamList = _useState8[0], + setTeamList = _useState8[1]; //全部战队信息 + var _useState9 = Object(react["useState"])([]), + _useState10 = Object(slicedToArray["a" /* default */])(_useState9, 2), + MyCreteTeam = _useState10[0], + SetMyCreateTeam = _useState10[1]; //我创建的战队信息 + var _useState11 = Object(react["useState"])([]), + _useState12 = Object(slicedToArray["a" /* default */])(_useState11, 2), + ManagedTeams = _useState12[0], + SetManagedTeams = _useState12[1]; //我管理的战队信息 + var _useState13 = Object(react["useState"])(''), + _useState14 = Object(slicedToArray["a" /* default */])(_useState13, 2), + KeyWord = _useState14[0], + setKeyWord = _useState14[1]; //搜索内容 + var _useState15 = Object(react["useState"])(1), + _useState16 = Object(slicedToArray["a" /* default */])(_useState15, 2), + Page = _useState16[0], + setPage = _useState16[1]; //页码 + var _useState17 = Object(react["useState"])(20), + _useState18 = Object(slicedToArray["a" /* default */])(_useState17, 2), + Per_page = _useState18[0], + setPer_page = _useState18[1]; //每页条数 + var _useState19 = Object(react["useState"])(false), + _useState20 = Object(slicedToArray["a" /* default */])(_useState19, 2), + isLookmodelshow = _useState20[0], + setIslookModel = _useState20[1]; //查看战队 + var _useState21 = Object(react["useState"])([]), + _useState22 = Object(slicedToArray["a" /* default */])(_useState21, 2), + team = _useState22[0], + setTeam = _useState22[1]; //单一战队信息 + var _useState23 = Object(react["useState"])(false), + _useState24 = Object(slicedToArray["a" /* default */])(_useState23, 2), + Tipsmodel = _useState24[0], + setTipsmodel = _useState24[1]; //是否显示提示框 + var _useState25 = Object(react["useState"])(''), + _useState26 = Object(slicedToArray["a" /* default */])(_useState25, 2), + TipsTitle = _useState26[0], + setTipsTitle = _useState26[1]; //提示标题头 + var _useState27 = Object(react["useState"])(''), + _useState28 = Object(slicedToArray["a" /* default */])(_useState27, 2), + TipsContent = _useState28[0], + setTipsContent = _useState28[1]; //提示内容 + var _useState29 = Object(react["useState"])(''), + _useState30 = Object(slicedToArray["a" /* default */])(_useState29, 2), + Teamid = _useState30[0], + SetTeamid = _useState30[1]; //点击的id + var _useState31 = Object(react["useState"])(''), + _useState32 = Object(slicedToArray["a" /* default */])(_useState31, 2), + TipsType = _useState32[0], + setTipsType = _useState32[1]; //删除还是退出 + var _useState33 = Object(react["useState"])(false), + _useState34 = Object(slicedToArray["a" /* default */])(_useState33, 2), + isAddmodel = _useState34[0], + setIsAddmodel = _useState34[1]; //新建战队 + var _useState35 = Object(react["useState"])(false), + _useState36 = Object(slicedToArray["a" /* default */])(_useState35, 2), + isJoin = _useState36[0], + setJoin = _useState36[1]; //加入战队 + var _useState37 = Object(react["useState"])(false), + _useState38 = Object(slicedToArray["a" /* default */])(_useState37, 2), + Membersshow = _useState38[0], + setMembers = _useState38[1]; //设置战队 + var _useState39 = Object(react["useState"])(false), + _useState40 = Object(slicedToArray["a" /* default */])(_useState39, 2), + isSelect = _useState40[0], + setIsselect = _useState40[1]; //是否搜索 + var _useState41 = Object(react["useState"])(false), + _useState42 = Object(slicedToArray["a" /* default */])(_useState41, 2), + isShowmodel = _useState42[0], + setIsShowmodel = _useState42[1]; //是否引流弹窗 + var _useState43 = Object(react["useState"])(true), + _useState44 = Object(slicedToArray["a" /* default */])(_useState43, 2), + isClick = _useState44[0], + setIsClick = _useState44[1]; //增加参数 防止点击过快 多次调用 + var _useState45 = Object(react["useState"])(), + _useState46 = Object(slicedToArray["a" /* default */])(_useState45, 2), + defaultData = _useState46[0], + setDetaultData = _useState46[1]; + var _useState47 = Object(react["useState"])(false), + _useState48 = Object(slicedToArray["a" /* default */])(_useState47, 2), + isshowModal = _useState48[0], + setIsshowModal = _useState48[1]; + var _useState49 = Object(react["useState"])(false), + _useState50 = Object(slicedToArray["a" /* default */])(_useState49, 2), + showphone = _useState50[0], + setshowphone = _useState50[1]; + var _useState51 = Object(react["useState"])(false), + _useState52 = Object(slicedToArray["a" /* default */])(_useState51, 2), + isopen = _useState52[0], + setisopen = _useState52[1]; + var _useState53 = Object(react["useState"])(), + _useState54 = Object(slicedToArray["a" /* default */])(_useState53, 2), + datas = _useState54[0], + setdatas = _useState54[1]; + var _useState55 = Object(react["useState"])(false), + _useState56 = Object(slicedToArray["a" /* default */])(_useState55, 2), + kylinIdFlag = _useState56[0], + setKylinIdFlag = _useState56[1]; + Object(react["useEffect"])(function () { + var _user$userInfo; + if ((user === null || user === void 0 ? void 0 : (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.login) && (HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.id)) { + getId(); + } + }, [user === null || user === void 0 ? void 0 : user.userInfo, HeaderDetail]); + function getId() { + return _getId.apply(this, arguments); + } + function _getId() { + _getId = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Entered_regeneratorRuntime().mark(function _callee3() { + var _user$userInfo12; + var data, a, filter, flag; + return Entered_regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + _context3.next = 2; + return dispatch({ + type: 'competitions/GetKylinId', + payload: { + owner: user === null || user === void 0 ? void 0 : (_user$userInfo12 = user.userInfo) === null || _user$userInfo12 === void 0 ? void 0 : _user$userInfo12.login + } + }); + case 2: + data = _context3.sent; + a = data.data; + filter = a.filter(function (i) { + return i.toString() === (HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.id.toString()); + }); + console.log("result", a, filter); + flag = filter && filter.length > 0 ? true : false; + setKylinIdFlag(flag); + case 8: + case "end": + return _context3.stop(); + } + }, _callee3); + })); + return _getId.apply(this, arguments); + } + Object(react["useEffect"])(function () { + function init() { + return _init.apply(this, arguments); + } + function _init() { + _init = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Entered_regeneratorRuntime().mark(function _callee() { + return Entered_regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + getStaff(); + _context.t0 = setHeaderDetail; + _context.next = 4; + return dispatch({ + type: 'competitions/getHeader', + payload: { + identifier: identifier + } + }); + case 4: + _context.t1 = _context.sent; + (0, _context.t0)(_context.t1); + selectlist(KeyWord); + + //取值 + if (parseInt(localStorage.getItem('iscreate')) === 1) { + setIsShowmodel(true); + localStorage.setItem('iscreate', '2'); + } + case 8: + case "end": + return _context.stop(); + } + }, _callee); + })); + return _init.apply(this, arguments); + } + if (identifier) { + setTimeout(function () { + init(); + }, 200); + } + }, [identifier]); + Object(react["useEffect"])(function () { + Object(util["o" /* setDocumentTitle */])('第七届CCF开源创新大赛'); + }, []); + function selectlist(_x) { + return _selectlist.apply(this, arguments); + } //获取删除 退出战队弹框 + function _selectlist() { + _selectlist = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Entered_regeneratorRuntime().mark(function _callee4(keyword) { + var data; + return Entered_regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + _context4.next = 2; + return dispatch({ + type: 'competitions/getTeamList', + payload: { + identifier: identifier, + keyword: keyword || KeyWord, + page: Page, + per_page: Per_page + } + }); + case 2: + data = _context4.sent; + if (data) { + setTeamData(data); + setDetaultData(JSON.parse(JSON.stringify(data))); + //全部战队信息 + setTeamList(data.competition_teams); + //我创建的战队信息(包括管理的) + SetMyCreateTeam(data && data.my_teams && data.my_teams.filter(function (item) { + return item.manage_permission; + })); + //我管理的战队信息(加入) + SetManagedTeams(data && data.my_teams && data.my_teams.filter(function (item) { + return !item.manage_permission; + })); + } + case 4: + case "end": + return _context4.stop(); + } + }, _callee4); + })); + return _selectlist.apply(this, arguments); + } + function isTipsshow(type, id) { + SetTeamid(id); + setTipsmodel(true); + setTipsType(type); + if (type === 1) { + setTipsTitle('删除战队'); + setTipsContent("是否确认删除战队"); + } else { + setTipsTitle('退出战队'); + setTipsContent("是否确认退出战队"); + } + } + //实时获取配置信息 + function getStaff() { + return _getStaff.apply(this, arguments); + } //点击取消调用当前方法 + function _getStaff() { + _getStaff = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Entered_regeneratorRuntime().mark(function _callee5() { + return Entered_regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + _context5.t0 = setStaffDetail; + _context5.next = 3; + return dispatch({ + type: 'competitions/getStaff', + payload: { + identifier: identifier + } + }); + case 3: + _context5.t1 = _context5.sent; + (0, _context5.t0)(_context5.t1); + case 5: + case "end": + return _context5.stop(); + } + }, _callee5); + })); + return _getStaff.apply(this, arguments); + } + function setClose() { + var data = defaultData; + //全部战队信息 + setTeamList(data.competition_teams); + //我创建的战队信息(包括管理的) + SetMyCreateTeam(data && data.my_teams && data.my_teams.filter(function (item) { + return item.manage_permission; + })); + //我管理的战队信息(加入) + SetManagedTeams(data && data.my_teams && data.my_teams.filter(function (item) { + return !item.manage_permission; + })); + } + + //删除 退出战队 + function TipsSubmit(_x2) { + return _TipsSubmit.apply(this, arguments); + } //创建战队 AddTeam + function _TipsSubmit() { + _TipsSubmit = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Entered_regeneratorRuntime().mark(function _callee6(type) { + var data, _data; + return Entered_regeneratorRuntime().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + if (!(HeaderDetail.competition_status !== 'nearly_published' && HeaderDetail.enroll_end && HeaderDetail.competition_status !== 'ended')) { + _context6.next = 3; + break; + } + message["b" /* default */].error(type === 1 ? '报名时间已截止,不支持删除战队' : '报名时间已截止,不支持退出战队'); + return _context6.abrupt("return"); + case 3: + if (!(type === 1)) { + _context6.next = 10; + break; + } + _context6.next = 6; + return dispatch({ + type: 'competitions/DeleteTeam', + payload: { + identifier: identifier, + id: Teamid + } + }); + case 6: + data = _context6.sent; + if (data && data.status === 0) { + message["b" /* default */].info("\u5220\u9664\u6210\u529F"); + setTipsmodel(false); + selectlist(KeyWord); + getStaff(); + } + _context6.next = 14; + break; + case 10: + _context6.next = 12; + return dispatch({ + type: 'competitions/ExitTeam', + payload: { + identifier: identifier, + id: Teamid + } + }); + case 12: + _data = _context6.sent; + if (_data && _data.status === 0) { + message["b" /* default */].info("\u9000\u51FA\u6218\u961F\u6210\u529F"); + setTipsmodel(false); + selectlist(KeyWord); + getStaff(); + } + case 14: + case "end": + return _context6.stop(); + } + }, _callee6); + })); + return _TipsSubmit.apply(this, arguments); + } + function addTeams(_x3) { + return _addTeams.apply(this, arguments); + } + function _addTeams() { + _addTeams = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Entered_regeneratorRuntime().mark(function _callee7(name) { + var data; + return Entered_regeneratorRuntime().wrap(function _callee7$(_context7) { + while (1) switch (_context7.prev = _context7.next) { + case 0: + if (isClick) { + _context7.next = 2; + break; + } + return _context7.abrupt("return"); + case 2: + setIsClick(false); + if (!isadd()) { + _context7.next = 5; + break; + } + return _context7.abrupt("return"); + case 5: + _context7.next = 7; + return dispatch({ + type: 'competitions/AddTeam', + payload: { + identifier: identifier, + name: name + } + }); + case 7: + data = _context7.sent; + if (data && data.status === 0) { + setisopen(true); + setdatas(data); + if (ids.includes(parseInt(HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.id))) { + setIsshowModal(true); + } + setIsAddmodel(false); + setIsClick(true); + selectlist(KeyWord); + getStaff(); + } else { + setIsClick(true); + } + case 9: + case "end": + return _context7.stop(); + } + }, _callee7); + })); + return _addTeams.apply(this, arguments); + } + function isadd() { + var _user$userInfo2, _user$userInfo3; + //判断 如果不符合条件 不能加入竞赛 + if (user === null || user === void 0 ? void 0 : (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.is_teacher) { + var _StaffDetail$teacher_; + if (StaffDetail === null || StaffDetail === void 0 ? void 0 : (_StaffDetail$teacher_ = StaffDetail.teacher_staff) === null || _StaffDetail$teacher_ === void 0 ? void 0 : _StaffDetail$teacher_.mutiple_limited) { + if (StaffDetail === null || StaffDetail === void 0 ? void 0 : StaffDetail.enrolled) { + message["b" /* default */].info('你已经报名,不能重复报名'); + setIsClick(true); + return true; + } + } + } else { + var _StaffDetail$member_s; + if (StaffDetail === null || StaffDetail === void 0 ? void 0 : (_StaffDetail$member_s = StaffDetail.member_staff) === null || _StaffDetail$member_s === void 0 ? void 0 : _StaffDetail$member_s.mutiple_limited) { + if (StaffDetail === null || StaffDetail === void 0 ? void 0 : StaffDetail.enrolled) { + message["b" /* default */].info('你已经报名,不能重复报名'); + setIsClick(true); + return true; + } + } + } + //判断竞赛是否关闭 + if (StaffDetail === null || StaffDetail === void 0 ? void 0 : StaffDetail.enroll_ended) { + message["b" /* default */].info('报名已截止,无需报名'); + setIsClick(true); + return true; + } + //禁止老师or学生报名 + if (user === null || user === void 0 ? void 0 : (_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3.is_teacher) { + if (!StaffDetail.teacher_staff) { + message["b" /* default */].info('已禁止老师报名'); + setIsClick(true); + return true; + } + } else { + if (!(StaffDetail === null || StaffDetail === void 0 ? void 0 : StaffDetail.member_staff)) { + message["b" /* default */].info('已禁止学生报名'); + setIsClick(true); + return true; + } + } + } + //加入战队 + function JoinTeams(_x4) { + return _JoinTeams.apply(this, arguments); + } + function _JoinTeams() { + _JoinTeams = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Entered_regeneratorRuntime().mark(function _callee8(name) { + var data; + return Entered_regeneratorRuntime().wrap(function _callee8$(_context8) { + while (1) switch (_context8.prev = _context8.next) { + case 0: + if (isClick) { + _context8.next = 2; + break; + } + return _context8.abrupt("return"); + case 2: + if (!isadd()) { + _context8.next = 4; + break; + } + return _context8.abrupt("return"); + case 4: + setIsClick(false); + _context8.next = 7; + return dispatch({ + type: 'competitions/JoinTeam', + payload: { + identifier: identifier, + invite_code: name + } + }); + case 7: + data = _context8.sent; + if (data && data.status === 0) { + setisopen(true); + setdatas(data); + setJoin(false); + setIsClick(true); + selectlist(KeyWord); + getStaff(); + if (ids.includes(parseInt(HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.id))) { + setIsshowModal(true); + } + } else { + setIsClick(true); + } + case 9: + case "end": + return _context8.stop(); + } + }, _callee8); + })); + return _JoinTeams.apply(this, arguments); + } + return /*#__PURE__*/react_default.a.createElement("div", { + className: "edu-container minH500" + }, /*#__PURE__*/react_default.a.createElement(breadcrumb["a" /* default */], { + className: "mt10", + separator: ">" + }, /*#__PURE__*/react_default.a.createElement(breadcrumb["a" /* default */].Item, null, /*#__PURE__*/react_default.a.createElement(react_router_dom["a" /* Link */], { + to: "/competitions/index" + }, "\u5728\u7EBF\u7ADE\u8D5B")), /*#__PURE__*/react_default.a.createElement(breadcrumb["a" /* default */].Item, null, /*#__PURE__*/react_default.a.createElement(react_router_dom["a" /* Link */], { + to: "/competitions/index/".concat(identifier) + }, HeaderDetail.name, HeaderDetail.sub_title ? '-' + HeaderDetail.sub_title : null)), /*#__PURE__*/react_default.a.createElement(breadcrumb["a" /* default */].Item, null, "\u62A5\u540D")), /*#__PURE__*/react_default.a.createElement("div", { + className: "mt10", + style: { + display: 'flex', + background: '#fff', + position: 'relative' + } + }, /*#__PURE__*/react_default.a.createElement(Assembly_Assembly, { + HeaderDetail: HeaderDetail, + dispatch: dispatch, + user: user, + setIsAddmodel: setIsAddmodel, + setJoin: setJoin + })), /*#__PURE__*/react_default.a.createElement(skeleton["a" /* default */], { + loading: loading["competitions/getTeamList"], + active: true, + avatar: { + size: 40 + }, + paragraph: { + rows: 5 + } + }, /*#__PURE__*/react_default.a.createElement("div", { + className: "mt10 mb10" + }, ((user === null || user === void 0 ? void 0 : (_user$userInfo4 = user.userInfo) === null || _user$userInfo4 === void 0 ? void 0 : _user$userInfo4.admin) || (user === null || user === void 0 ? void 0 : (_user$userInfo5 = user.userInfo) === null || _user$userInfo5 === void 0 ? void 0 : _user$userInfo5.business)) && /*#__PURE__*/react_default.a.createElement(Assembly_SelectTeam, { + selectlist: selectlist, + setIsselect: setIsselect, + Count: TeamData && TeamData.count, + Members_count: TeamData && TeamData.members_count + }), TeamData && TeamData.my_teams && TeamData.my_teams.length === 0 && (!(user === null || user === void 0 ? void 0 : (_user$userInfo6 = user.userInfo) === null || _user$userInfo6 === void 0 ? void 0 : _user$userInfo6.admin) || !(user === null || user === void 0 ? void 0 : (_user$userInfo7 = user.userInfo) === null || _user$userInfo7 === void 0 ? void 0 : _user$userInfo7.business)) ? /*#__PURE__*/react_default.a.createElement(TeamsNota, { + HeaderDetail: HeaderDetail, + dispatch: dispatch, + user: user, + setIsAddmodel: setIsAddmodel, + setJoin: setJoin + }) : null, isLookmodelshow ? /*#__PURE__*/react_default.a.createElement(LookTeamsModel, { + islookmodel: isLookmodelshow, + setIslookModel: setIslookModel, + mydatas: team + }) : null, Tipsmodel ? /*#__PURE__*/react_default.a.createElement(TipsModel, { + title: TipsTitle, + content: TipsContent, + Tipsmodel: Tipsmodel, + TipsType: TipsType, + setTipsmodel: setTipsmodel, + TipsSubmit: TipsSubmit + }) : null, isJoin ? /*#__PURE__*/react_default.a.createElement(JoinModel["a" /* default */], { + isjoin: isJoin, + setJoin: setJoin, + JoinTeams: JoinTeams + }) : null, isAddmodel ? /*#__PURE__*/react_default.a.createElement(Addteams["a" /* default */], { + isAddmodle: isAddmodel, + setIsAdd: setIsAddmodel, + createTeam: addTeams + }) : null, Membersshow ? /*#__PURE__*/react_default.a.createElement(SetmembersModel, { + HeaderDetail: HeaderDetail, + setClose: setClose, + StaffDetail: StaffDetail, + Membersshow: Membersshow, + selectlist: selectlist, + setMembers: setMembers, + dispatch: dispatch, + identifier: identifier, + mydatas: team + }) : null, isSelect || MyCreteTeam && MyCreteTeam.map(function (item, index) { + if (index === 0) { + return /*#__PURE__*/react_default.a.createElement("div", { + key: index + }, /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.teamstitlesize, + style: { + paddingRight: '36px' + } + }, /*#__PURE__*/react_default.a.createElement("span", { + style: { + flex: '1' + } + }, "\u7BA1\u7406\u7684\u6218\u961F\xA0\xA0(", MyCreteTeam.length, ")"), " ", MyCreteTeam.filter(function (item) { + return !item.active; + }).length > 0 ? /*#__PURE__*/react_default.a.createElement("span", { + style: { + fontSize: '14px', + color: '#F3730C' + } + }, "\u60A8\u6709", MyCreteTeam.filter(function (item) { + return !item.active; + }).length, "\u4E2A\u6218\u961F\u672A\u6EE1\u8DB3\u53C2\u8D5B\u8981\u6C42\uFF01\u4E3A\u4E86\u4E0D\u5F71\u54CD\u6210\u7EE9\uFF0C\u8BF7\u8BBE\u7F6E\u6218\u961F\u6210\u5458") : ''), /*#__PURE__*/react_default.a.createElement(Assembly_ManagedTeams, { + mode: HeaderDetail.mode, + item: item, + type: 1, + kylinIdFlag: kylinIdFlag, + identifier: identifier, + isTipsshow: isTipsshow, + setIslookModel: setIslookModel, + setTeam: setTeam, + setMembers: setMembers + })); + } else { + return /*#__PURE__*/react_default.a.createElement(Assembly_ManagedTeams, { + mode: HeaderDetail.mode, + key: index, + item: item, + type: 1, + kylinIdFlag: kylinIdFlag, + identifier: identifier, + isTipsshow: isTipsshow, + setIslookModel: setIslookModel, + setTeam: setTeam, + setMembers: setMembers + }); + } + }), isSelect || ManagedTeams && ManagedTeams.map(function (item, index) { + if (index === 0) { + return /*#__PURE__*/react_default.a.createElement("div", { + key: index + }, /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.teamstitlesize, + style: { + paddingRight: '36px' + } + }, /*#__PURE__*/react_default.a.createElement("span", { + style: { + flex: '1' + } + }, "\u52A0\u5165\u7684\u6218\u961F\xA0\xA0(", ManagedTeams.length, ")")), /*#__PURE__*/react_default.a.createElement(Assembly_ManagedTeams, { + mode: HeaderDetail.mode, + key: index, + item: item, + type: 2, + identifier: identifier, + isTipsshow: isTipsshow, + setIslookModel: setIslookModel, + setTeam: setTeam, + setMembers: setMembers + })); + } else { + return /*#__PURE__*/react_default.a.createElement(Assembly_ManagedTeams, { + mode: HeaderDetail.mode, + key: index, + item: item, + type: 2, + identifier: identifier, + isTipsshow: isTipsshow, + setIslookModel: setIslookModel, + setTeam: setTeam, + setMembers: setMembers + }); + } + }), ((user === null || user === void 0 ? void 0 : (_user$userInfo8 = user.userInfo) === null || _user$userInfo8 === void 0 ? void 0 : _user$userInfo8.admin) || (user === null || user === void 0 ? void 0 : (_user$userInfo9 = user.userInfo) === null || _user$userInfo9 === void 0 ? void 0 : _user$userInfo9.business)) && TeamList.map(function (item, index) { + if (index === 0) { + return /*#__PURE__*/react_default.a.createElement("div", { + key: index + }, /*#__PURE__*/react_default.a.createElement("div", { + className: Enteredmodules_default.a.teamstitlesize, + style: { + paddingRight: '36px' + } + }, /*#__PURE__*/react_default.a.createElement("span", { + style: { + flex: '1' + } + }, isSelect ? "搜索结果" : '全部战队', "\xA0\xA0(", TeamData.count, ")")), /*#__PURE__*/react_default.a.createElement(Assembly_AllTeams, { + mode: HeaderDetail.mode, + item: item, + setIslookModel: setIslookModel, + setTeam: setTeam + })); + } else { + return /*#__PURE__*/react_default.a.createElement(Assembly_AllTeams, { + mode: HeaderDetail.mode, + key: index, + item: item, + setIslookModel: setIslookModel, + setTeam: setTeam + }); + } + }), ((user === null || user === void 0 ? void 0 : (_user$userInfo10 = user.userInfo) === null || _user$userInfo10 === void 0 ? void 0 : _user$userInfo10.admin) || (user === null || user === void 0 ? void 0 : (_user$userInfo11 = user.userInfo) === null || _user$userInfo11 === void 0 ? void 0 : _user$userInfo11.business)) && TeamData && TeamData.count > 20 ? /*#__PURE__*/react_default.a.createElement("div", { + style: { + marginTop: '30px', + marginBottom: '30px', + textAlign: 'center' + } + }, /*#__PURE__*/react_default.a.createElement(pagination["a" /* default */], { + onChange: function onChange(e) { + Page = e; + setPage(Page); + selectlist(KeyWord); + }, + showSizeChanger: false, + current: Page, + pageSize: Per_page, + total: TeamData.count + })) : null)), /*#__PURE__*/react_default.a.createElement(SignUpSucessModel, { + isShowmodel: isShowmodel, + isSignUphide: setIsShowmodel + }), /*#__PURE__*/react_default.a.createElement(AuthenticationModel["a" /* default */], null), /*#__PURE__*/react_default.a.createElement(modal["a" /* default */], { + visible: isshowModal, + footer: null, + title: "\u62A5\u540D\u6210\u529F", + centered: true, + width: 500, + onCancel: function onCancel() { + return setIsshowModal(false); + } + }, /*#__PURE__*/react_default.a.createElement("div", { + style: { + padding: "32px" + } + }, /*#__PURE__*/react_default.a.createElement("p", { + style: { + fontSize: '16px', + fontWeight: '500' + } + }, "\u606D\u559C\u60A8\u5DF2\u6210\u529F\u62A5\u540D\u300A", HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.name, "-", HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.sub_title, "\u300B"), /*#__PURE__*/react_default.a.createElement("span", null, "\u6E29\u99A8\u63D0\u793A\uFF1A"), /*#__PURE__*/react_default.a.createElement("br", null), [46, 49, 50, 52].includes(parseInt(HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.id)) && /*#__PURE__*/react_default.a.createElement("span", null, " 1\u3001\u8D5B\u9898\u5DF2\u53D1\u5E03\uFF0C\u70B9\u51FB\u4E0B\u65B9\u201C\u524D\u5F80\u67E5\u770B\u201D\u6309\u94AE\u67E5\u770B\u8D5B\u9898\u3002"), [45, 51].includes(parseInt(HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.id)) && /*#__PURE__*/react_default.a.createElement("span", null, " 1\u3001\u626B\u7801\u52A0\u5165\u8D5B\u9053\u7FA4\uFF0C\u54A8\u8BE2\u8D5B\u9053\u8BE6\u7EC6\u5185\u5BB9\uFF0C\u66F4\u6709\u884C\u4E1A\u4E13\u5BB6\u5168\u7A0B\u652F\u6301"), /*#__PURE__*/react_default.a.createElement("br", null), [46, 49, 50, 52].includes(parseInt(HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.id)) && /*#__PURE__*/react_default.a.createElement("span", null, " 2\u3001\u626B\u7801\u52A0\u5165\u8D5B\u9053\u7FA4\uFF0C\u54A8\u8BE2\u8D5B\u9053\u8BE6\u7EC6\u5185\u5BB9\uFF0C\u66F4\u6709\u884C\u4E1A\u4E13\u5BB6\u5168\u7A0B\u652F\u6301"), /*#__PURE__*/react_default.a.createElement("br", null), /*#__PURE__*/react_default.a.createElement("div", { + style: { + marginTop: '30px', + textAlign: 'center' + } + }, [50, 51].includes(parseInt(HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.id)) && /*#__PURE__*/react_default.a.createElement("img", { + src: sjjx_default.a, + style: { + width: '220px', + height: '270px' + } + }), [46, 45].includes(parseInt(HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.id)) && /*#__PURE__*/react_default.a.createElement("img", { + src: xmcx_default.a, + style: { + width: '220px', + height: '270px' + } + }), [49].includes(parseInt(HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.id)) && /*#__PURE__*/react_default.a.createElement("img", { + src: xmtz_default.a, + style: { + width: '220px', + height: '270px' + } + }), [52].includes(parseInt(HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.id)) && /*#__PURE__*/react_default.a.createElement("img", { + src: dmpz_default.a, + style: { + width: '220px', + height: '270px' + } + }), /*#__PURE__*/react_default.a.createElement("p", { + style: { + marginTop: '30px' + } + }, [46, 49, 50, 52].includes(parseInt(HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.id)) && /*#__PURE__*/react_default.a.createElement(es_button["a" /* default */], { + style: { + width: '116px', + height: '40px' + }, + type: "primary", + onClick: function onClick() { + Object(util["m" /* openNewWindow */])("/competitions/index/".concat(HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.identifier, "?active=\u8D5B\u9898\u53D1\u5E03")); + } + }, "\u524D\u5F80\u67E5\u770B"), [45, 51].includes(parseInt(HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.id)) && /*#__PURE__*/react_default.a.createElement(es_button["a" /* default */], { + style: { + width: '116px', + height: '40px' + }, + type: "primary", + onClick: function onClick() { + setIsshowModal(false); + } + }, "\u77E5\u9053\u4E86"))))), /*#__PURE__*/react_default.a.createElement(PhoneModal["a" /* default */], { + datas: datas, + isopen: isopen, + setisopen: setisopen, + isShowPhone: showphone, + setIsShowPhone: setshowphone, + user: user, + dispatch: dispatch, + onOK: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Entered_regeneratorRuntime().mark(function _callee2() { + return Entered_regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _context2.t0 = setHeaderDetail; + _context2.next = 3; + return dispatch({ + type: 'competitions/getHeader', + payload: { + identifier: identifier + } + }); + case 3: + _context2.t1 = _context2.sent; + (0, _context2.t0)(_context2.t1); + case 5: + case "end": + return _context2.stop(); + } + }, _callee2); + })) + })); +}; +/* harmony default export */ var Entered = __webpack_exports__["default"] = (Object(umiExports["a" /* connect */])(function (_ref3) { + var loading = _ref3.loading, + globalSetting = _ref3.globalSetting, + user = _ref3.user; + return { + globalSetting: globalSetting, + loading: loading.effects, + user: user + }; +})(Entered_competitionDetails)); + +/***/ }), + +/***/ "J66h": +/*!******************************************!*\ + !*** ./node_modules/js-base64/base64.js ***! + \******************************************/ +/*! no static exports found */ +/*! exports used: Base64 */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* + * base64.js + * + * Licensed under the BSD 3-Clause License. + * http://opensource.org/licenses/BSD-3-Clause + * + * References: + * http://en.wikipedia.org/wiki/Base64 + */ +;(function (global, factory) { + true + ? module.exports = factory(global) + : undefined +}(( + typeof self !== 'undefined' ? self + : typeof window !== 'undefined' ? window + : typeof global !== 'undefined' ? global +: this +), function(global) { + 'use strict'; + // existing version for noConflict() + global = global || {}; + var _Base64 = global.Base64; + var version = "2.6.4"; + // constants + var b64chars + = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + var b64tab = function(bin) { + var t = {}; + for (var i = 0, l = bin.length; i < l; i++) t[bin.charAt(i)] = i; + return t; + }(b64chars); + var fromCharCode = String.fromCharCode; + // encoder stuff + var cb_utob = function(c) { + if (c.length < 2) { + var cc = c.charCodeAt(0); + return cc < 0x80 ? c + : cc < 0x800 ? (fromCharCode(0xc0 | (cc >>> 6)) + + fromCharCode(0x80 | (cc & 0x3f))) + : (fromCharCode(0xe0 | ((cc >>> 12) & 0x0f)) + + fromCharCode(0x80 | ((cc >>> 6) & 0x3f)) + + fromCharCode(0x80 | ( cc & 0x3f))); + } else { + var cc = 0x10000 + + (c.charCodeAt(0) - 0xD800) * 0x400 + + (c.charCodeAt(1) - 0xDC00); + return (fromCharCode(0xf0 | ((cc >>> 18) & 0x07)) + + fromCharCode(0x80 | ((cc >>> 12) & 0x3f)) + + fromCharCode(0x80 | ((cc >>> 6) & 0x3f)) + + fromCharCode(0x80 | ( cc & 0x3f))); + } + }; + var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; + var utob = function(u) { + return u.replace(re_utob, cb_utob); + }; + var cb_encode = function(ccc) { + var padlen = [0, 2, 1][ccc.length % 3], + ord = ccc.charCodeAt(0) << 16 + | ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8) + | ((ccc.length > 2 ? ccc.charCodeAt(2) : 0)), + chars = [ + b64chars.charAt( ord >>> 18), + b64chars.charAt((ord >>> 12) & 63), + padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63), + padlen >= 1 ? '=' : b64chars.charAt(ord & 63) + ]; + return chars.join(''); + }; + var btoa = global.btoa && typeof global.btoa == 'function' + ? function(b){ return global.btoa(b) } : function(b) { + if (b.match(/[^\x00-\xFF]/)) throw new RangeError( + 'The string contains invalid characters.' + ); + return b.replace(/[\s\S]{1,3}/g, cb_encode); + }; + var _encode = function(u) { + return btoa(utob(String(u))); + }; + var mkUriSafe = function (b64) { + return b64.replace(/[+\/]/g, function(m0) { + return m0 == '+' ? '-' : '_'; + }).replace(/=/g, ''); + }; + var encode = function(u, urisafe) { + return urisafe ? mkUriSafe(_encode(u)) : _encode(u); + }; + var encodeURI = function(u) { return encode(u, true) }; + var fromUint8Array; + if (global.Uint8Array) fromUint8Array = function(a, urisafe) { + // return btoa(fromCharCode.apply(null, a)); + var b64 = ''; + for (var i = 0, l = a.length; i < l; i += 3) { + var a0 = a[i], a1 = a[i+1], a2 = a[i+2]; + var ord = a0 << 16 | a1 << 8 | a2; + b64 += b64chars.charAt( ord >>> 18) + + b64chars.charAt((ord >>> 12) & 63) + + ( typeof a1 != 'undefined' + ? b64chars.charAt((ord >>> 6) & 63) : '=') + + ( typeof a2 != 'undefined' + ? b64chars.charAt( ord & 63) : '='); + } + return urisafe ? mkUriSafe(b64) : b64; + }; + // decoder stuff + var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g; + var cb_btou = function(cccc) { + switch(cccc.length) { + case 4: + var cp = ((0x07 & cccc.charCodeAt(0)) << 18) + | ((0x3f & cccc.charCodeAt(1)) << 12) + | ((0x3f & cccc.charCodeAt(2)) << 6) + | (0x3f & cccc.charCodeAt(3)), + offset = cp - 0x10000; + return (fromCharCode((offset >>> 10) + 0xD800) + + fromCharCode((offset & 0x3FF) + 0xDC00)); + case 3: + return fromCharCode( + ((0x0f & cccc.charCodeAt(0)) << 12) + | ((0x3f & cccc.charCodeAt(1)) << 6) + | (0x3f & cccc.charCodeAt(2)) + ); + default: + return fromCharCode( + ((0x1f & cccc.charCodeAt(0)) << 6) + | (0x3f & cccc.charCodeAt(1)) + ); + } + }; + var btou = function(b) { + return b.replace(re_btou, cb_btou); + }; + var cb_decode = function(cccc) { + var len = cccc.length, + padlen = len % 4, + n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0) + | (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0) + | (len > 2 ? b64tab[cccc.charAt(2)] << 6 : 0) + | (len > 3 ? b64tab[cccc.charAt(3)] : 0), + chars = [ + fromCharCode( n >>> 16), + fromCharCode((n >>> 8) & 0xff), + fromCharCode( n & 0xff) + ]; + chars.length -= [0, 0, 2, 1][padlen]; + return chars.join(''); + }; + var _atob = global.atob && typeof global.atob == 'function' + ? function(a){ return global.atob(a) } : function(a){ + return a.replace(/\S{1,4}/g, cb_decode); + }; + var atob = function(a) { + return _atob(String(a).replace(/[^A-Za-z0-9\+\/]/g, '')); + }; + var _decode = function(a) { return btou(_atob(a)) }; + var _fromURI = function(a) { + return String(a).replace(/[-_]/g, function(m0) { + return m0 == '-' ? '+' : '/' + }).replace(/[^A-Za-z0-9\+\/]/g, ''); + }; + var decode = function(a){ + return _decode(_fromURI(a)); + }; + var toUint8Array; + if (global.Uint8Array) toUint8Array = function(a) { + return Uint8Array.from(atob(_fromURI(a)), function(c) { + return c.charCodeAt(0); + }); + }; + var noConflict = function() { + var Base64 = global.Base64; + global.Base64 = _Base64; + return Base64; + }; + // export Base64 + global.Base64 = { + VERSION: version, + atob: atob, + btoa: btoa, + fromBase64: decode, + toBase64: encode, + utob: utob, + encode: encode, + encodeURI: encodeURI, + btou: btou, + decode: decode, + noConflict: noConflict, + fromUint8Array: fromUint8Array, + toUint8Array: toUint8Array + }; + // if ES5 is available, make Base64.extendString() available + if (typeof Object.defineProperty === 'function') { + var noEnum = function(v){ + return {value:v,enumerable:false,writable:true,configurable:true}; + }; + global.Base64.extendString = function () { + Object.defineProperty( + String.prototype, 'fromBase64', noEnum(function () { + return decode(this) + })); + Object.defineProperty( + String.prototype, 'toBase64', noEnum(function (urisafe) { + return encode(this, urisafe) + })); + Object.defineProperty( + String.prototype, 'toBase64URI', noEnum(function () { + return encode(this, true) + })); + }; + } + // + // export Base64 to the namespace + // + if (global['Meteor']) { // Meteor.js + Base64 = global.Base64; + } + // module.exports and AMD are mutually exclusive. + // module.exports has precedence. + if ( true && module.exports) { + module.exports.Base64 = global.Base64; + } + else if (true) { + // AMD. Register as an anonymous module. + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function(){ return global.Base64 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } + // that's it! + return {Base64: global.Base64} +})); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "yLpj"))) + +/***/ }), + +/***/ "QtKJ": +/*!**********************************************************************!*\ + !*** ./src/pages/Competitions/components/PhoneModal.tsx + 1 modules ***! + \**********************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! 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/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/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/message/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/QQCode.jpg (<- Module is not an ECMAScript module) */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXTERNAL MODULE: ./node_modules/antd/es/modal/style/index.js +var style = __webpack_require__("2qtc"); + +// EXTERNAL MODULE: ./node_modules/antd/es/modal/index.js + 14 modules +var modal = __webpack_require__("kLXV"); + +// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js +var button_style = __webpack_require__("+L6B"); + +// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js +var es_button = __webpack_require__("2/Rp"); + +// 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 + 9 modules +var input = __webpack_require__("5rEg"); + +// EXTERNAL MODULE: ./node_modules/antd/es/message/style/index.js +var message_style = __webpack_require__("miYZ"); + +// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 1 modules +var message = __webpack_require__("tsqr"); + +// 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/react/index.js +var react = __webpack_require__("q1tI"); +var react_default = /*#__PURE__*/__webpack_require__.n(react); + +// EXTERNAL MODULE: ./src/utils/fetch.ts +var fetch = __webpack_require__("ErOA"); + +// CONCATENATED MODULE: ./src/utils/hooks/useInterval.tsx + +function useInterval(callback, delay) { + var savedCallback = Object(react["useRef"])(); + var savedId = Object(react["useRef"])(); + + // 保存新回调 + Object(react["useEffect"])(function () { + savedCallback.current = callback; + }); + + // 建立 interval + Object(react["useEffect"])(function () { + function tick() { + savedCallback.current(); + } + if (delay !== null) { + var id = setInterval(tick, delay); + savedId.current = id; + return function () { + return clearInterval(id); + }; + } + }, [delay]); +} +// EXTERNAL MODULE: ./src/utils/util.tsx + 6 modules +var util = __webpack_require__("1vsH"); + +// EXTERNAL MODULE: ./src/assets/images/QQCode.jpg +var QQCode = __webpack_require__("DyWB"); +var QQCode_default = /*#__PURE__*/__webpack_require__.n(QQCode); + +// CONCATENATED MODULE: ./src/pages/Competitions/components/PhoneModal.tsx + + + + + + + + + + +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + + + + + +var phoneReg = /^1\d{10}$/; +function Addmodal(_ref) { + var isShowPhone = _ref.isShowPhone, + setIsShowPhone = _ref.setIsShowPhone, + user = _ref.user, + dispatch = _ref.dispatch, + onOK = _ref.onOK, + isopen = _ref.isopen, + setisopen = _ref.setisopen, + datas = _ref.datas; + var _useState = Object(react["useState"])(''), + _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), + phone = _useState2[0], + setphone = _useState2[1]; + var _useState3 = Object(react["useState"])(''), + _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2), + PhoneValue = _useState4[0], + setPhoneValue = _useState4[1]; + var _useState5 = Object(react["useState"])(60), + _useState6 = Object(slicedToArray["a" /* default */])(_useState5, 2), + countdown = _useState6[0], + setCountdown = _useState6[1]; + var _useState7 = Object(react["useState"])(), + _useState8 = Object(slicedToArray["a" /* default */])(_useState7, 2), + countdownFlag = _useState8[0], + setCountdownFlag = _useState8[1]; + var _useState9 = Object(react["useState"])(false), + _useState10 = Object(slicedToArray["a" /* default */])(_useState9, 2), + isShowPoint = _useState10[0], + setIsShowPoint = _useState10[1]; + var _useState11 = Object(react["useState"])(false), + _useState12 = Object(slicedToArray["a" /* default */])(_useState11, 2), + isShowUntie = _useState12[0], + setIsShowUntie = _useState12[1]; + var _useState13 = Object(react["useState"])(''), + _useState14 = Object(slicedToArray["a" /* default */])(_useState13, 2), + UntieValue = _useState14[0], + setUntieValue = _useState14[1]; + var intervalId = Object(react["useRef"])(); + Object(react["useEffect"])(function () { + return function () { + intervalId.current && clearInterval(intervalId.current); + }; + }, []); + useInterval(function () { + if (!countdownFlag) { + return; + } else { + setCountdown(60); + } + if (countdown > 0) { + setCountdown(countdown - 1); + } else { + setCountdown(60); + setCountdownFlag(false); + intervalId.current && clearInterval(intervalId.current); + } + }, 1000); + var handleGetCode = /*#__PURE__*/function () { + var _ref2 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { + var _user$eduUserInfo; + var data, smscode, res; + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return Object(fetch["a" /* default */])("/api/users/accounts/".concat((_user$eduUserInfo = user.eduUserInfo) === null || _user$eduUserInfo === void 0 ? void 0 : _user$eduUserInfo.login, "/valid_phone.json"), { + method: 'get', + params: { + phone: phone + } + }); + case 2: + data = _context.sent; + if (!((data === null || data === void 0 ? void 0 : data.status) === -1)) { + _context.next = 5; + break; + } + return _context.abrupt("return"); + case 5: + if (!(data === null || data === void 0 ? void 0 : data.is_exists)) { + _context.next = 8; + break; + } + setIsShowPoint(true); + return _context.abrupt("return"); + case 8: + smscode = Object(util["q" /* setmiyah */])(phone); + _context.next = 11; + return dispatch({ + type: 'account/getCode', + payload: { + login: phone, + type: 3, + smscode: smscode + } + }); + case 11: + res = _context.sent; + if (res.status === 1) { + message["b" /* default */].info('验证码已发送,请注意查收'); + setCountdownFlag(true); + } + case 13: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function handleGetCode() { + return _ref2.apply(this, arguments); + }; + }(); + return /*#__PURE__*/react_default.a.createElement("div", null, /*#__PURE__*/react_default.a.createElement(modal["a" /* default */], { + title: "\u5F3A\u5236\u89E3\u7ED1", + visible: isShowUntie, + onCancel: function onCancel() { + return setIsShowUntie(false); + }, + onOk: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() { + var _user$eduUserInfo2; + var data; + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + if (UntieValue) { + _context2.next = 3; + break; + } + message["b" /* default */].info('验证码不能为空'); + return _context2.abrupt("return"); + case 3: + _context2.next = 5; + return Object(fetch["a" /* default */])("/api/users/accounts/".concat(user === null || user === void 0 ? void 0 : (_user$eduUserInfo2 = user.eduUserInfo) === null || _user$eduUserInfo2 === void 0 ? void 0 : _user$eduUserInfo2.login, "/phone_force_unbind.json"), { + method: 'POST', + body: { + code: UntieValue, + phone: phone + } + }); + case 5: + data = _context2.sent; + if ((data === null || data === void 0 ? void 0 : data.status) === 0) { + message["b" /* default */].info('解绑成功'); + setCountdownFlag(false); + setIsShowUntie(false); + onOK(); + setIsShowPhone(false); + setUntieValue(''); + } + case 7: + case "end": + return _context2.stop(); + } + }, _callee2); + })) + }, /*#__PURE__*/react_default.a.createElement("div", { + style: { + padding: '8px 24px' + } + }, /*#__PURE__*/react_default.a.createElement("p", null, "\u82E5\u539F\u8D26\u53F7\u53EA\u6709\u7ED1\u5B9A\u4E86\u624B\u673A\u53F7\u4E00\u79CD\u767B\u5F55\u65B9\u5F0F\uFF0C\u5F3A\u5236\u89E3\u7ED1\u540E\u4F1A\u5BFC\u81F4\u539F\u8D26\u53F7\u65E0\u6CD5\u767B\u5F55\uFF0C\u8BF7\u786E\u5B9A\u662F\u5426\u5F3A\u5236\u89E3\u7ED1"), /*#__PURE__*/react_default.a.createElement("p", null, "\u4F60\u7684\u624B\u673A\u53F7\uFF1A", phone), /*#__PURE__*/react_default.a.createElement("p", null, "\u624B\u673A\u9A8C\u8BC1\u7801\uFF1A", /*#__PURE__*/react_default.a.createElement(input["a" /* default */], { + value: UntieValue, + size: "large", + onChange: function onChange(e) { + return setUntieValue(e.target.value); + }, + style: { + width: '240px' + } + }), " ", /*#__PURE__*/react_default.a.createElement(es_button["a" /* default */], { + disabled: countdownFlag, + type: "primary", + size: "large", + onClick: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() { + var smscode, res; + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + smscode = Object(util["q" /* setmiyah */])(phone); + _context3.next = 3; + return dispatch({ + type: 'account/getCode', + payload: { + login: phone, + type: 10, + smscode: smscode + } + }); + case 3: + res = _context3.sent; + if (res.status === 1) { + message["b" /* default */].info('验证码已发送,请注意查收'); + setCountdownFlag(true); + } + case 5: + case "end": + return _context3.stop(); + } + }, _callee3); + })) + }, countdownFlag ? "\u91CD\u65B0\u53D1\u9001".concat(countdown, "s") : '获取验证码')))), /*#__PURE__*/react_default.a.createElement(modal["a" /* default */], { + title: "\u63D0\u793A", + visible: isShowPoint, + onCancel: function onCancel() { + setIsShowPoint(false); + }, + okText: "\u8FDB\u884C\u5F3A\u5236\u89E3\u7ED1", + okButtonProps: { + type: "primary", + ghost: true, + style: { + width: "124px" + } + }, + onOk: function onOk() { + setIsShowUntie(true); + setIsShowPoint(false); + } + // footer={
+ // + //
} + }, /*#__PURE__*/react_default.a.createElement("div", { + style: { + padding: '7px 24px' + } + }, /*#__PURE__*/react_default.a.createElement("span", null, "\u8BE5\u624B\u673A\u53F7\u5DF2\u7ECF\u88AB\u7ED1\u5B9A\u8D26\u53F7\uFF0C\u5982\u679C\u9700\u8981\u5C06\u8BE5\u624B\u673A\u53F7\u7ED1\u5B9A\u5728\u5F53\u524D\u8D26\u53F7\u4E0A\uFF0C\u4F60\u53EF\u4EE5\u8FDB\u884C\u4E0B\u65B9\u4EFB\u610F\u4E00\u79CD\u89E3\u7ED1\u64CD\u4F5C\uFF1A"), /*#__PURE__*/react_default.a.createElement("br", null), /*#__PURE__*/react_default.a.createElement("p", { + style: { + marginTop: '1em', + display: 'flex' + } + }, /*#__PURE__*/react_default.a.createElement("span", { + style: { + flex: '1' + } + }, "1\u3001\u4F7F\u7528\u8BE5\u624B\u673A\u53F7\u767B\u5F55\u5E73\u53F0\u8FDB\u884C\u89E3\u7ED1\uFF0C\u518D\u5C06\u624B\u673A\u53F7\u7ED1\u5B9A\u5F53\u524D\u8D26\u53F7\u4E0A\u3002")), /*#__PURE__*/react_default.a.createElement("p", { + style: { + marginTop: '1em', + display: 'flex' + } + }, /*#__PURE__*/react_default.a.createElement("span", { + style: { + flex: '1' + } + }, "2\u3001\u5F3A\u5236\u89E3\u7ED1\uFF08\u5F3A\u5236\u89E3\u7ED1\u53EF\u80FD\u4F1A\u5BFC\u81F4\u89E3\u7ED1\u8D26\u53F7\u65E0\u6CD5\u767B\u5F55\uFF09")))), /*#__PURE__*/react_default.a.createElement(modal["a" /* default */], { + title: "\u7ED1\u5B9A\u624B\u673A\u53F7", + visible: isShowPhone, + onCancel: function onCancel() { + return setIsShowPhone(false); + }, + onOk: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() { + var _ref6, login, res; + return _regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + if (phoneReg.test(phone)) { + _context4.next = 3; + break; + } + message["b" /* default */].info("请输入有效的11位手机号码"); + return _context4.abrupt("return"); + case 3: + if (PhoneValue) { + _context4.next = 6; + break; + } + message["b" /* default */].info("请输入验证码"); + return _context4.abrupt("return"); + case 6: + _ref6 = user.eduUserInfo || {}, login = _ref6.login; + _context4.next = 9; + return dispatch({ + type: 'account/bindPhone', + payload: { + login: login, + phone: phone, + code: PhoneValue + } + }); + case 9: + res = _context4.sent; + if ((res === null || res === void 0 ? void 0 : res.status) === 0) { + setIsShowPhone(false); + onOK(); + } + case 11: + case "end": + return _context4.stop(); + } + }, _callee4); + })) + }, /*#__PURE__*/react_default.a.createElement("div", { + style: { + padding: '8px 24px' + } + }, /*#__PURE__*/react_default.a.createElement("p", null, "\u5E73\u53F0\u5DF2\u68C0\u6D4B\u5230\u60A8\u672A\u7ED1\u5B9A\u624B\u673A\u53F7\uFF0C\u4E3A\u4E86\u4E0D\u5F71\u54CD\u4F7F\u7528\u62A5\u540D\u529F\u80FD\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801"), /*#__PURE__*/react_default.a.createElement("p", null, "\u4F60\u7684\u624B\u673A\u53F7\uFF1A", /*#__PURE__*/react_default.a.createElement(input["a" /* default */], { + size: "large", + value: phone, + onChange: function onChange(e) { + return setphone(e.target.value); + }, + style: { + width: '240px' + } + })), /*#__PURE__*/react_default.a.createElement("p", null, "\u624B\u673A\u9A8C\u8BC1\u7801\uFF1A", /*#__PURE__*/react_default.a.createElement(input["a" /* default */], { + size: "large", + value: PhoneValue, + onChange: function onChange(e) { + return setPhoneValue(e.target.value); + }, + style: { + width: '240px' + } + }), " ", /*#__PURE__*/react_default.a.createElement(es_button["a" /* default */], { + disabled: countdownFlag, + type: "primary", + size: "large", + onClick: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() { + return _regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + if (phoneReg.test(phone)) { + _context5.next = 3; + break; + } + message["b" /* default */].info("请输入有效的11位手机号码"); + return _context5.abrupt("return"); + case 3: + handleGetCode(); + case 4: + case "end": + return _context5.stop(); + } + }, _callee5); + })) + }, countdownFlag ? "\u91CD\u65B0\u53D1\u9001".concat(countdown, "s") : '获取验证码')))), /*#__PURE__*/react_default.a.createElement(modal["a" /* default */], { + visible: isopen, + footer: false, + onCancel: function onCancel() { + return setisopen(false); + }, + centered: true, + width: 460 + }, /*#__PURE__*/react_default.a.createElement("div", null, /*#__PURE__*/react_default.a.createElement("div", { + style: { + marginTop: 50, + fontSize: 26, + color: '#3d3d3d', + textAlign: 'center', + marginBottom: 20 + } + }, /*#__PURE__*/react_default.a.createElement("i", { + style: { + fontSize: 26, + color: '#52C41A' + }, + className: "iconfont icon-tongguo" + }), " \u62A5\u540D\u6210\u529F"), /*#__PURE__*/react_default.a.createElement("div", { + style: { + alignItems: 'center', + textAlign: 'center' + } + }, /*#__PURE__*/react_default.a.createElement("img", { + style: { + width: 180, + border: '1px solid #eeeeef', + padding: 10, + marginBottom: 20 + }, + src: QQCode_default.a + }), /*#__PURE__*/react_default.a.createElement("p", { + style: { + color: '#AAAAAA' + } + }, "\u53C2\u8D5B\u8005\u53EF\u626B\u7801\u52A0\u5165\u5927\u8D5B\u5B98\u65B9\u4EA4\u6D41\u7FA4\uFF0C\u83B7\u53D6\u6700\u65B0\u7ADE\u8D5B\u901A\u77E5"))))); +} +/* harmony default export */ var PhoneModal = __webpack_exports__["a"] = (Addmodal); + +/***/ }), + +/***/ "UfjD": +/*!*******************************************************************!*\ + !*** ./src/pages/Competitions/Entered/Enteredmodel/JoinModel.tsx ***! + \*******************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var antd_es_modal_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/es/modal/style */ "2qtc"); +/* harmony import */ var antd_es_modal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/es/modal */ "kLXV"); +/* harmony import */ var antd_es_input_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd/es/input/style */ "5NDa"); +/* harmony import */ var antd_es_input__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd/es/input */ "5rEg"); +/* harmony import */ var antd_es_message_style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd/es/message/style */ "miYZ"); +/* harmony import */ var antd_es_message__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd/es/message */ "tsqr"); +/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */ "tJVT"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ "q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ant-design/icons */ "4i/N"); + + + + + + + +//通过邀请码加入战队 + + +function Jointeam(_ref) { + var isjoin = _ref.isjoin, + setJoin = _ref.setJoin, + JoinTeams = _ref.JoinTeams; + var _useState = Object(react__WEBPACK_IMPORTED_MODULE_7__["useState"])(""), + _useState2 = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_useState, 2), + code = _useState2[0], + setCode = _useState2[1]; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(antd_es_modal__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"], { + centered: true, + title: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("div", { + style: { + alignItems: 'center', + display: 'flex' + } + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("div", { + style: { + textAlign: 'left', + flex: '1' + } + }, "\u52A0\u5165\u6218\u961F"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], { + onClick: function onClick() { + return setJoin(false); + }, + style: { + cursor: 'porint' + } + })), + visible: isjoin, + closable: false, + destroyOnClose: true, + onOk: function onOk() { + if (!code) { + antd_es_message__WEBPACK_IMPORTED_MODULE_5__[/* default */ "b"].info('邀请码不能为空'); + return; + } + JoinTeams(code); + }, + onCancel: function onCancel() { + return setJoin(false); + } + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("p", { + style: { + marginTop: '15px', + marginLeft: '15px', + display: 'flex', + alignItems: 'center' + } + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("span", { + style: { + flex: 'none' + } + }, "\u9080\u8BF7\u7801\uFF1A"), " ", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(antd_es_input__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], { + placeholder: "请输入邀请码", + value: code, + maxLength: 60, + addonAfter: String(code && code.length || 0) + "/60", + onChange: function onChange(e) { + return setCode(e.target.value); + } + })))); +} +/* harmony default export */ __webpack_exports__["a"] = (Jointeam); + +/***/ }), + +/***/ "Vh0m": +/*!*************************************************!*\ + !*** ./src/pages/Competitions/Entered/dmpz.png ***! + \*************************************************/ +/*! 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/dmpz.f66eda67.png"; + +/***/ }), + +/***/ "bE4q": +/*!**************************************************************!*\ + !*** ./node_modules/antd/es/breadcrumb/index.js + 3 modules ***! + \**************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/DownOutlined.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/toConsumableArray.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/dropdown.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/index.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/react/index.js (<- Module is not an ECMAScript module) */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js +var helpers_extends = __webpack_require__("pVnL"); +var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js +var defineProperty = __webpack_require__("lSNA"); +var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toConsumableArray.js +var toConsumableArray = __webpack_require__("RIqP"); +var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray); + +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__("q1tI"); + +// EXTERNAL MODULE: ./node_modules/classnames/index.js +var classnames = __webpack_require__("TSYQ"); +var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); + +// EXTERNAL MODULE: ./node_modules/rc-util/es/Children/toArray.js +var toArray = __webpack_require__("Zm9Q"); + +// EXTERNAL MODULE: ./node_modules/@ant-design/icons/DownOutlined.js +var DownOutlined = __webpack_require__("HQEm"); +var DownOutlined_default = /*#__PURE__*/__webpack_require__.n(DownOutlined); + +// EXTERNAL MODULE: ./node_modules/antd/es/dropdown/dropdown.js + 4 modules +var dropdown = __webpack_require__("XBQK"); + +// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js + 1 modules +var context = __webpack_require__("H84U"); + +// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/BreadcrumbItem.js + + +var __rest = undefined && undefined.__rest || function (s, e) { + var t = {}; + + for (var p in s) { + if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; + } + + if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; + } + return t; +}; + + + + + + +var BreadcrumbItem_BreadcrumbItem = function BreadcrumbItem(_a) { + var customizePrefixCls = _a.prefixCls, + _a$separator = _a.separator, + separator = _a$separator === void 0 ? '/' : _a$separator, + children = _a.children, + overlay = _a.overlay, + dropdownProps = _a.dropdownProps, + restProps = __rest(_a, ["prefixCls", "separator", "children", "overlay", "dropdownProps"]); + + var _React$useContext = react["useContext"](context["b" /* ConfigContext */]), + getPrefixCls = _React$useContext.getPrefixCls; + + var prefixCls = getPrefixCls('breadcrumb', customizePrefixCls); + /** + * if overlay is have + * Wrap a DropDown + */ + + var renderBreadcrumbNode = function renderBreadcrumbNode(breadcrumbItem) { + if (overlay) { + return /*#__PURE__*/react["createElement"](dropdown["a" /* default */], extends_default()({ + overlay: overlay, + placement: "bottomCenter" + }, dropdownProps), /*#__PURE__*/react["createElement"]("span", { + className: "".concat(prefixCls, "-overlay-link") + }, breadcrumbItem, /*#__PURE__*/react["createElement"](DownOutlined_default.a, null))); + } + + return breadcrumbItem; + }; + + var link; + + if ('href' in restProps) { + link = /*#__PURE__*/react["createElement"]("a", extends_default()({ + className: "".concat(prefixCls, "-link") + }, restProps), children); + } else { + link = /*#__PURE__*/react["createElement"]("span", extends_default()({ + className: "".concat(prefixCls, "-link") + }, restProps), children); + } // wrap to dropDown + + + link = renderBreadcrumbNode(link); + + if (children) { + return /*#__PURE__*/react["createElement"]("span", null, link, separator && separator !== '' && /*#__PURE__*/react["createElement"]("span", { + className: "".concat(prefixCls, "-separator") + }, separator)); + } + + return null; +}; + +BreadcrumbItem_BreadcrumbItem.__ANT_BREADCRUMB_ITEM = true; +/* harmony default export */ var breadcrumb_BreadcrumbItem = (BreadcrumbItem_BreadcrumbItem); +// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/BreadcrumbSeparator.js + + + +var BreadcrumbSeparator_BreadcrumbSeparator = function BreadcrumbSeparator(_ref) { + var children = _ref.children; + + var _React$useContext = react["useContext"](context["b" /* ConfigContext */]), + getPrefixCls = _React$useContext.getPrefixCls; + + var prefixCls = getPrefixCls('breadcrumb'); + return /*#__PURE__*/react["createElement"]("span", { + className: "".concat(prefixCls, "-separator") + }, children || '/'); +}; + +BreadcrumbSeparator_BreadcrumbSeparator.__ANT_BREADCRUMB_SEPARATOR = true; +/* harmony default export */ var breadcrumb_BreadcrumbSeparator = (BreadcrumbSeparator_BreadcrumbSeparator); +// EXTERNAL MODULE: ./node_modules/antd/es/menu/index.js + 16 modules +var menu = __webpack_require__("BvKs"); + +// EXTERNAL MODULE: ./node_modules/antd/es/_util/devWarning.js +var devWarning = __webpack_require__("uaoM"); + +// EXTERNAL MODULE: ./node_modules/antd/es/_util/reactNode.js +var reactNode = __webpack_require__("0n0R"); + +// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/Breadcrumb.js + + + + +var Breadcrumb_rest = undefined && undefined.__rest || function (s, e) { + var t = {}; + + for (var p in s) { + if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; + } + + if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; + } + return t; +}; + + + + + + + + + + + +function getBreadcrumbName(route, params) { + if (!route.breadcrumbName) { + return null; + } + + var paramsKeys = Object.keys(params).join('|'); + var name = route.breadcrumbName.replace(new RegExp(":(".concat(paramsKeys, ")"), 'g'), function (replacement, key) { + return params[key] || replacement; + }); + return name; +} + +function defaultItemRender(route, params, routes, paths) { + var isLastItem = routes.indexOf(route) === routes.length - 1; + var name = getBreadcrumbName(route, params); + return isLastItem ? /*#__PURE__*/react["createElement"]("span", null, name) : /*#__PURE__*/react["createElement"]("a", { + href: "#/".concat(paths.join('/')) + }, name); +} + +var getPath = function getPath(path, params) { + path = (path || '').replace(/^\//, ''); + Object.keys(params).forEach(function (key) { + path = path.replace(":".concat(key), params[key]); + }); + return path; +}; + +var Breadcrumb_addChildPath = function addChildPath(paths) { + var childPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + var params = arguments.length > 2 ? arguments[2] : undefined; + + var originalPaths = toConsumableArray_default()(paths); + + var path = getPath(childPath, params); + + if (path) { + originalPaths.push(path); + } + + return originalPaths; +}; + +var Breadcrumb_Breadcrumb = function Breadcrumb(_a) { + var customizePrefixCls = _a.prefixCls, + _a$separator = _a.separator, + separator = _a$separator === void 0 ? '/' : _a$separator, + style = _a.style, + className = _a.className, + routes = _a.routes, + children = _a.children, + _a$itemRender = _a.itemRender, + itemRender = _a$itemRender === void 0 ? defaultItemRender : _a$itemRender, + _a$params = _a.params, + params = _a$params === void 0 ? {} : _a$params, + restProps = Breadcrumb_rest(_a, ["prefixCls", "separator", "style", "className", "routes", "children", "itemRender", "params"]); + + var _React$useContext = react["useContext"](context["b" /* ConfigContext */]), + getPrefixCls = _React$useContext.getPrefixCls, + direction = _React$useContext.direction; + + var crumbs; + var prefixCls = getPrefixCls('breadcrumb', customizePrefixCls); + + if (routes && routes.length > 0) { + // generated by route + var paths = []; + crumbs = routes.map(function (route) { + var path = getPath(route.path, params); + + if (path) { + paths.push(path); + } // generated overlay by route.children + + + var overlay; + + if (route.children && route.children.length) { + overlay = /*#__PURE__*/react["createElement"](menu["a" /* default */], null, route.children.map(function (child) { + return /*#__PURE__*/react["createElement"](menu["a" /* default */].Item, { + key: child.path || child.breadcrumbName + }, itemRender(child, params, routes, Breadcrumb_addChildPath(paths, child.path, params))); + })); + } + + return /*#__PURE__*/react["createElement"](breadcrumb_BreadcrumbItem, { + overlay: overlay, + separator: separator, + key: path || route.breadcrumbName + }, itemRender(route, params, routes, paths)); + }); + } else if (children) { + crumbs = Object(toArray["a" /* default */])(children).map(function (element, index) { + if (!element) { + return element; + } + + Object(devWarning["a" /* default */])(element.type && (element.type.__ANT_BREADCRUMB_ITEM === true || element.type.__ANT_BREADCRUMB_SEPARATOR === true), 'Breadcrumb', "Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children"); + return Object(reactNode["a" /* cloneElement */])(element, { + separator: separator, + key: index + }); + }); + } + + var breadcrumbClassName = classnames_default()(className, prefixCls, defineProperty_default()({}, "".concat(prefixCls, "-rtl"), direction === 'rtl')); + return /*#__PURE__*/react["createElement"]("div", extends_default()({ + className: breadcrumbClassName, + style: style + }, restProps), crumbs); +}; + +Breadcrumb_Breadcrumb.Item = breadcrumb_BreadcrumbItem; +Breadcrumb_Breadcrumb.Separator = breadcrumb_BreadcrumbSeparator; +/* harmony default export */ var breadcrumb_Breadcrumb = (Breadcrumb_Breadcrumb); +// CONCATENATED MODULE: ./node_modules/antd/es/breadcrumb/index.js + +/* harmony default export */ var breadcrumb = __webpack_exports__["a"] = (breadcrumb_Breadcrumb); + +/***/ }), + +/***/ "cWXX": +/*!******************************************************!*\ + !*** ./node_modules/antd/es/skeleton/style/index.js ***! + \******************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "cIOH"); +/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_index_less__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "oIFs"); +/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__); + + + +/***/ }), + +/***/ "fpBZ": +/*!*************************************************!*\ + !*** ./src/pages/Competitions/Entered/xmcx.png ***! + \*************************************************/ +/*! 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/xmcx.4d2f8a61.png"; + +/***/ }), + +/***/ "hxTS": +/*!*************************************************!*\ + !*** ./src/pages/Competitions/Entered/sjjx.png ***! + \*************************************************/ +/*! 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/sjjx.7a8e0b40.png"; + +/***/ }), + +/***/ "ipgu": +/*!***********************************************************!*\ + !*** ./src/pages/Competitions/Entered/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___2r6dk","flex_space_between":"flex_space_between___2h9zy","flex_box_vertical_center":"flex_box_vertical_center___2OhEf","flex_box_center_end":"flex_box_center_end___38UH6","flex_box_column":"flex_box_column___sIWsv","backgroundimg":"backgroundimg___1O-pN","titlesize":"titlesize___1djF4","countsize":"countsize___1_hGV","addteams":"addteams___2JAL0","createteams":"createteams___1_asj","buttoncoent":"buttoncoent___11zMD","nullnodata":"nullnodata___3kGxG","searchhead":"searchhead___fTCjR","selectleft":"selectleft___1K6QG","packinputs":"packinputs___23jVT","ManagedTeams":"ManagedTeams___3EhNw","spanradius":"spanradius___3oPq5","width18":"width18___3EJtL","width15":"width15___3oUqm","nametitle":"nametitle___3lYJL","borderjingao":"borderjingao___2gLqX","updatecount":"updatecount___326A6","deleteitem":"deleteitem___2Cjb5","width20":"width20___2gQvl","imageradius":"imageradius___3eNIt","loaderimg":"loaderimg___362cf","teamstitlesize":"teamstitlesize___3iOmt","setmembers":"setmembers___3XDJA","teammember":"teammember___1sFe4","flex1":"flex1___I9fEY","flex2":"flex2___3luPi","teammembers":"teammembers___3u0fA","teacherdown":"teacherdown___2Zb6v","teachname":"teachname___DKH10","task_hide":"task_hide___1nza8","code":"code___1CX3A"}; + +/***/ }), + +/***/ "oIFs": +/*!********************************************************!*\ + !*** ./node_modules/antd/es/skeleton/style/index.less ***! + \********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), + +/***/ "qHvr": +/*!******************************************************************!*\ + !*** ./src/pages/Competitions/Entered/Enteredmodel/Addteams.tsx ***! + \******************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var antd_es_modal_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/es/modal/style */ "2qtc"); +/* harmony import */ var antd_es_modal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/es/modal */ "kLXV"); +/* harmony import */ var antd_es_input_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd/es/input/style */ "5NDa"); +/* harmony import */ var antd_es_input__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd/es/input */ "5rEg"); +/* harmony import */ var antd_es_message_style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd/es/message/style */ "miYZ"); +/* harmony import */ var antd_es_message__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd/es/message */ "tsqr"); +/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */ "tJVT"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ "q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ant-design/icons */ "4i/N"); + + + + + + + +//创建战队弹窗 + + +function Addteans(_ref) { + var isAddmodle = _ref.isAddmodle, + setIsAdd = _ref.setIsAdd, + createTeam = _ref.createTeam; + var _useState = Object(react__WEBPACK_IMPORTED_MODULE_7__["useState"])(""), + _useState2 = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_useState, 2), + personname = _useState2[0], + setpersonname = _useState2[1]; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(antd_es_modal__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"], { + centered: true, + title: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("div", { + style: { + alignItems: 'center', + display: 'flex' + } + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("div", { + style: { + textAlign: 'left', + flex: '1' + } + }, "\u521B\u5EFA\u6218\u961F"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], { + onClick: function onClick() { + return setIsAdd(false); + }, + style: { + cursor: 'porint' + } + })), + visible: isAddmodle, + closable: false, + destroyOnClose: true, + onOk: function onOk() { + if (!personname) { + antd_es_message__WEBPACK_IMPORTED_MODULE_5__[/* default */ "b"].info('战队名不能为空'); + return; + } + createTeam(personname); + }, + onCancel: function onCancel() { + return setIsAdd(false); + } + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("span", { + style: { + fontSize: '14px', + color: '#F73737' + } + }, "*"), "\u961F\u540D\uFF1A", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("p", { + style: { + marginTop: '15px', + marginLeft: '15px' + } + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(antd_es_input__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], { + placeholder: "请输入队名", + value: personname, + maxLength: 60, + addonAfter: String(personname && personname.length || 0) + "/60", + onChange: function onChange(e) { + return setpersonname(e.target.value); + } + })))); +} +/* harmony default export */ __webpack_exports__["a"] = (Addteans); + +/***/ }), + +/***/ "sPJy": +/*!********************************************************!*\ + !*** ./node_modules/antd/es/breadcrumb/style/index.js ***! + \********************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "cIOH"); +/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_index_less__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "AOa7"); +/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _menu_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../menu/style */ "lUTK"); +/* harmony import */ var _dropdown_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dropdown/style */ "qVdP"); + + + + + +/***/ }), + +/***/ "w3kr": +/*!***************************************!*\ + !*** ./src/assets/images/Noentry.jpg ***! + \***************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +module.exports = "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAJcAAABgCAYAAAAQCODYAAAAAXNSR0IArs4c6QAAC+9JREFUeAHtneePEz0Qh3303uHoHFX03gUI0EkgISQ+wb8In/gAiKODqKJ3EHD03nsvL4/1OtosyWbjtRN745Gi7G7Wbfa3M+PxeNL07du3PyJQ4IAFDnSwUGeoMnBAciCAKwDBGgcCuKyxNlQcwBUwYI0DAVzWWBsqDuAKGLDGgQAua6wNFQdwBQxY40AAlzXWhooDuAIGrHEggMsaa0PFAVwBA9Y4EMBljbX+VdzW1iauXbtmrOMBXMZY6X9Fb9++Fe/evTM2kKYQcmOMl15W9P37d3Hy5Enx8+dP8fDhQ9GzZ0/Rv39/MXjwYDFt2rRMY+qUqXQo7D0Hfv36Jd6/fy/B9efPH/FX2Mjzbt26ZR5bkFyZWZifCjZv3ixaWlrE4sWLjQwq2FxG2JiPSpBWJiSW4kaQXIoT4Vuqxk6dzFlK5mpKeDjo9devXws63q9fP9HU1JRwt5mffvz4Id68eSMwWLEl8kLwrmvXrmLAgAGiY8eORodlElh0zCq4ANX58+el70Q94M6dO4t58+aJiRMnGmWMqgxQnT59WrS3t+cKVGp86htgTZkyRcyaNUt06OCmdWNVLR48eFA8ePBA8aPoe86cOWL69OlF17Ke4KPZt2+f+PTpU9aqvCnft29f0draKnr06OFcn61Jrvv37xeAhb9k6tSp4uvXr1KqPHnyRFy4cEGMHTtW+lVMcAXJePjwYQmsXr16SeCigl19q7OM+ffv3+Lly5fi8uXL0ul54sQJsXr16ixVWilrDVxPnz6VHcYZN3fuXHnMTGTlypViy5YtAga9ePHCGLiuXr0qbSycgOvWrRNdunSxwjBXKoWvo0aNEtu3bxePHj0S9+7dE2PGjHGle7If1pT1ly9fZAO9e/cuGjBGoxLhJtUXzIWwQ/IOLMVQJLSyXdX41W8ufFsDF0sIECqQGZsipNXHjx/lqbpH/Zbl+8OHD7I4qrCRCJsLwsvuGllTi3h6sQmQYDt37hQTJkyQSws3btyQPOjTp49obm42xg9mphDqlnUynwl3Q1o3g7Ip1fhdGrc1cAGeRYsWiePHj8u36uzZs4Vx46dZtmxZagYWCkYOnj17JrDrAC/GPKCC9u/fH7nL30NcNkOHDhUzZswQAwcO9HIg1sAFN8aPHy+dfVeuXJFOVN5GDNGZM2dqLzNgpwFY1G2eCX8dbhwiFXDZ4M+qhfPZJE+tgouOYlchpUwQttqOHTuKbDgT9bpcB1L50qVLAkmWNQSm1uO0Di6TAzp27JgEFmp1/vz5YuTIkbmcGQIoAvdY3UByQRwzXmXAm+SrrbqszRZNdxgmY2dB+MrGjRuXS2AxPtQfEn/VqlXSjOAaNqWaDHHuA3kDLuWU5c0dMmSID7w10sdJkyYV6sEr7xN5A67Pnz9Lvsadsj4xW6evOEoVESXqE3kDLuyQQH5xwBtw+cXW0Fs44NVsMe0jw1vNBEDHU48vDuelyXDftP3O2325BNfRo0dllIDuw8Ku27Bhg27xUO5/DuRSLaqFcd2nzORBLSfp1hHK5VQtLlmyRC6a66pFfGhqQVgHJARFEhXLJAQpSIyZL8SLyRIb0SU4q7NQLtUiDsjly5dn4YtWWSTeqVOnBFG4UcIvx15Al73rhEKxAhIN3RkxYoTst4q/i44pzXEu1WKagZu+Byfvtm3b/gEW7Tx//lxGjN6+fdt0s0bqwzm7a9euImBRMRGuhEuxiK5DAVw6XIuVIRjyyJEjiQvq2HDEuptM9BHrhvYpEkup8LVr14pNmzYJTAtMA6Qx65o6FMClw7VYmXPnzsm4stjlf05xkaA2XSLi4RTgUd2ERBEmTnAnIeOQWnqrtt8BXNVyrMT91cSvE4fm0jKO2uvAsOJLawR8Qrp7HXJp0MMQxLnObJGyceJNLudUxR6pFizMyLLOxOJ91D1nkkEUBmqRl4QtgJA651h3r0MuwYWNQICdSVq6dKmMrI3XqeOySBsfH2/Lxjl9Yf8ok40zZ85IFQngoiFOaodRte1nUovEV925c6faNq3fX26Xd5aGmTmVIh5ONS4G7o+rn1L11vLaggULpF+LNm/duiVBpmLnCFXH76dDmSTX9evXZcQkyHeJiNHnLdSdQsfHgkqcPHly/HLhnJirtIY6hrJLkotBoPbZSMzG4sePHxecqIAqy0ZbLXARgovdgF3DA0SEYkMw03CBYEgWplQ7BoCHvYI/K4mQWGr3edJ99fgN9c5GEJP5O7TARbIPgKXowIED8hD/SKPsdlZjV98rVqwQLJiX25WkNqqYTlOk2nfxWwtca9askeDCv4MEY6kFydWowOLBdu/eXWabwWbhg3THccp0HrOBWZhvW8OyAlYLXITe8sEWYZG2kWLaKzEcm4pPoIxREejnqBMuMFRIn1fch8XyUCNKdS3JpUDk6zZz1X9T39ifzLSIhkCSkyuLaFaIpZU9e/ZIpyT7DllSaZRkKZnAleXhsKRAcn2Y3/I3acns2bOzVFdUlpkbuSmSXBEY1rSp68OhQWwqHLb8pUk0uPDVq1dF4FLSXdljtLlw4UK5i7qo4zk7qRu4yAJIDBGENx3DN8uDjj6XixcvFtI0Ra9Hj1myIbuhbptIK2bJJBKO06BBgwqXSrln8IbjtmDTa56lWCYPfYGDGgdkWo5S/Dz6W7XHZNxLQ6gpHUIS7d27tySwqI9My4qYRfKJE7Ps3bt3y1ll/Le8nNdNcvFg7969W+Dj8OHDC8dZD1B3rIclLVyjFnXCj1nQPXToUCFMJd5XloJIGhIlbFMczXFCepLyaf369f+Uid9b7lypY9e8/vS3buBiIRiVQFgt3vRhw4aV45/WdR3gpGmIdFBKnZe6v1QEAZKsFLgoj+1JanOC83RIxWK5tl7JWOoGLt40Epv5REwQyJaYRFF7S91XaVaNoY+TtZoFcOoGmDdv3pTN1HK5S42r0nfdwFWpYy7+zoNMmoHS51ISM41UYcZZ6Q+diGRlAsE3M1ImQvQHk4IZt2sUwFXFE0kTyqPcDtFqS12L/s5xObUZvY8ZKsnvooS001Wp0XpsHNdttmhjMDbrRFok2VqqbZyp3BulNH/tCwCV/RQtW+4Ys4JMg4TK6G79Kle3qetBcqXkJK4DZoqViPuYAeLDYkaKLy2NVKJe0p0n2V0kMMatwZqujT+WqjS2an8P4ErJsWri5Nktgx+MGTAO3bTE0lESUV8a+y2pjlr+5g241GJwJYPaFvOQFkiiJN9ZtG1UaBo1Gi1TSr1F/yCilDM2Wt61Y2/ApfxHzJbqEWXA8tTGjRulXYSEAWQ4MPkodam+kx4yMV3qQ/QnthMvDvWrFyhaXu0ZJMQJcPtETvc2+tYy3eZhILmI+CT9eNwTbpvxACG6tGO7PaIs2KcA4ceK8qNU266F9Vj9v8VSDEhzDQC1tbUlrruhpghSLPW2p2nD5XuQhkSy4suqhrDHiBJ2RX06KblgKsxNIlRTPJtM0v2N8BuzTbaEueJQddLPRZhKCJ2u/nVAZZsMAKi+B8UlnFSLxV0MZ75ywEnJ5SszQ7+LORDAVcyPcGaQAwFcBpkZqirmQABXMT/CmUEOBHAZZGaoqpgDAVzF/AhnBjkQwGWQmbarYuUCJylhPT6Qkx56HxhX6z6y0Zf/9lZRIey3ZJOLy8lNArhqjRKN9ghvZrGeyBA2tZCmiQVtNn4kJaXTaMpoEe/Voi8qIstTIy6M0GlSALDfkzSTLFKXywWWpS2TZb0GFyHEW7dulUlATDLFtbpUKI1azCfeno/rESFeq0XFbJOpAFwDFv0hYw4qEJurvb1dBiwiydSfELjYZ/rkNbhcZarpfmG0t7a2ynh8ZotEjJAbTUXnmm7PVH3eRUWQGkkltmUrFtGZBA6qjQuEnJDNOVD9OeCV5GIaTq6GOBE4qHbOEGjIW63z5wPxesN5Ng54J7nY9ax21XBMIhP2+ql0SM3NzYL/CQxUfw54JblgF7m3VP4twnoBF8auq/nd6/+I69cDr10R9WNbaDkNB7wGF9ut2OkyevToNGMN99SYA97ZXDXmT2guAwe8llwZxh2K1oADAVw1YHKjNvEfaorIMxGe6ooAAAAASUVORK5CYII=" + +/***/ }), + +/***/ "zrhs": +/*!******************************************************!*\ + !*** ./src/components/AuthenticationModel/index.tsx ***! + \******************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var antd_es_modal_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/es/modal/style */ "2qtc"); +/* harmony import */ var antd_es_modal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/es/modal */ "kLXV"); +/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties */ "PpiC"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! umi */ "9kvl"); + + + + + +var AuthModal = function AuthModal(_ref) { + var shixunsDetail = _ref.shixunsDetail, + globalSetting = _ref.globalSetting, + loading = _ref.loading, + dispatch = _ref.dispatch, + props = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_ref, ["shixunsDetail", "globalSetting", "loading", "dispatch"]); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(antd_es_modal__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"], { + centered: true, + keyboard: false, + closable: false, + zIndex: 6666, + title: "\u63D0\u793A", + visible: shixunsDetail.actionTabs.key === 'Banner-Auth', + okText: "\u786E\u5B9A", + cancelText: "\u53D6\u6D88", + onOk: function onOk() { + dispatch({ + type: 'shixunsDetail/setActionTabs', + payload: {} + }); + window.location.href = 'https://www.educoder.net/account/certification'; + }, + onCancel: function onCancel() { + dispatch({ + type: 'shixunsDetail/setActionTabs', + payload: {} + }); + } + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement("p", { + className: "tc font16" + }, "\u5F53\u524D\u7ADE\u8D5B\u9700\u8981\u5B9E\u540D\u8BA4\u8BC1\uFF0C\u8BF7\u5148\u5B8C\u6210\u5B9E\u540D\u8BA4\u8BC1\u540E\u518D\u62A5\u540D\u53C2\u8D5B", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement("br", null), "\u8BF7\u95EE\u662F\u5426\u524D\u5F80\u8FDB\u884C\u8BA4\u8BC1\uFF1F")); +}; +/* harmony default export */ __webpack_exports__["a"] = (Object(umi__WEBPACK_IMPORTED_MODULE_4__[/* connect */ "a"])(function (_ref2) { + var shixunsDetail = _ref2.shixunsDetail, + loading = _ref2.loading, + globalSetting = _ref2.globalSetting; + return { + shixunsDetail: shixunsDetail, + globalSetting: globalSetting, + loading: loading.models.index + }; +})(AuthModal)); + +/***/ }) + +}]); \ No newline at end of file diff --git a/umi.ea859dd4.js b/umi.ea859dd4.js new file mode 100644 index 000000000..203c371f1 --- /dev/null +++ b/umi.ea859dd4.js @@ -0,0 +1,141271 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // install a JSONP callback for chunk loading +/******/ function webpackJsonpCallback(data) { +/******/ var chunkIds = data[0]; +/******/ var moreModules = data[1]; +/******/ +/******/ +/******/ // add "moreModules" to the modules object, +/******/ // then flag all "chunkIds" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0, resolves = []; +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ resolves.push(installedChunks[chunkId][0]); +/******/ } +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ for(moduleId in moreModules) { +/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { +/******/ modules[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(parentJsonpFunction) parentJsonpFunction(data); +/******/ +/******/ while(resolves.length) { +/******/ resolves.shift()(); +/******/ } +/******/ +/******/ }; +/******/ +/******/ +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // object to store loaded CSS chunks +/******/ var installedCssChunks = { +/******/ 21: 0 +/******/ } +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // Promise = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ 21: 0 +/******/ }; +/******/ +/******/ +/******/ +/******/ // script path function +/******/ function jsonpScriptSrc(chunkId) { +/******/ return __webpack_require__.p + "" + ({"0":"vendors~layouts__SimpleLayouts~layouts__index~p__Competitions__Detail~p__Competitions__Entered~p__Co~571f4253","1":"vendors~layouts__SimpleLayouts~layouts__index~p__Competitions__Detail~p__Competitions__Entered~p__Co~af741bd6","2":"vendors~layouts__SimpleLayouts~layouts__index~p__Competitions__Detail~p__Competitions__Entered~p__Co~ec7b5f6b","3":"vendors~layouts__SimpleLayouts~p__Competitions__Detail~p__metting__information__detail~p__metting__o~178abcb8","4":"p__metting__information__detail~p__metting__organization~p__metting__track","5":"vendors~layouts__index~p__Competitions__Entered__Assembly__TeamDateil~p__Competitions__Index","6":"vendors~p__Competitions__Entered~p__Competitions__Entered__Assembly__TeamDateil~p__Competitions__Index","8":"layouts__SimpleLayouts","9":"layouts__index","10":"p__Competitions__Detail","11":"p__Competitions__Entered","12":"p__Competitions__Entered__Assembly__TeamDateil","13":"p__Competitions__Index","14":"p__Competitions__Update","15":"p__metting__banner","16":"p__metting__home","17":"p__metting__information","18":"p__metting__information__detail","19":"p__metting__organization","20":"p__metting__track","22":"vendors~monaco-editor","23":"vendors~p__Competitions__Update"}[chunkId]||chunkId) + "." + {"0":"83f401cc","1":"9aac69c4","2":"60b46e3e","3":"2845a433","4":"9baad107","5":"4d98b8e7","6":"5a6e1448","7":"5d14cdb3","8":"b9915c4a","9":"23972aa4","10":"4771074d","11":"fb2933f7","12":"bf5fc15c","13":"3f1d100e","14":"922421aa","15":"e2634be1","16":"5d4df36b","17":"e49571cd","18":"a08d558e","19":"de137232","20":"b045af64","22":"61923039","23":"7a827459","24":"97d25b5f","25":"104e44fd","26":"503de7ed","27":"1a3bc7c7","28":"943cc97a","29":"ced3058a","30":"68211da4","31":"50d3aabc","32":"a24c1207","33":"d1265227","34":"c9a118f7","35":"1bfe2dd7","36":"ae4ab8cb","37":"677d55ee","38":"af45cc50","39":"b85a605a","40":"aebd8ce5","41":"f6f6840d","42":"175a4c11","43":"7cdda08a","44":"08b4031f","45":"397115c8","46":"b673e63f","47":"3600c6a5","48":"d1f24edf","49":"d560ebf5","50":"e31b4cd9","51":"c178c1b5","52":"d04fcbd7","53":"1d23b9df","54":"be8dbc89","55":"60853033","56":"10955429","57":"2bd0c3a7","58":"3a115454","59":"d672ee7a","60":"bc984e39","61":"4bce22df","62":"85f60d91","63":"fdc8f2e1","64":"6256f2ac","65":"6f8b888b","66":"4dfce51c","67":"cb8e8499","68":"b0fe1b4d","69":"ff71a626","70":"ffd82168","71":"bb4f487c","72":"811fa516","73":"51a0cc5a","74":"30bf2410","75":"e6343d6c","76":"fb8c2f41","77":"3c15cc88","78":"da1449d6","79":"889f6e69","80":"f8dfbb68","81":"20860e11","82":"10a2cced","83":"d7681b11","84":"2b7a8ebb","85":"bfd535b6","86":"9f5667e5"}[chunkId] + ".async.js" +/******/ } +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // This file contains only the entry chunk. +/******/ // The chunk loading function for additional chunks +/******/ __webpack_require__.e = function requireEnsure(chunkId) { +/******/ var promises = []; +/******/ +/******/ +/******/ // mini-css-extract-plugin CSS loading +/******/ var cssChunks = {"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"22":1,"23":1}; +/******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]); +/******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) { +/******/ promises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) { +/******/ var href = "" + ({"0":"vendors~layouts__SimpleLayouts~layouts__index~p__Competitions__Detail~p__Competitions__Entered~p__Co~571f4253","1":"vendors~layouts__SimpleLayouts~layouts__index~p__Competitions__Detail~p__Competitions__Entered~p__Co~af741bd6","2":"vendors~layouts__SimpleLayouts~layouts__index~p__Competitions__Detail~p__Competitions__Entered~p__Co~ec7b5f6b","3":"vendors~layouts__SimpleLayouts~p__Competitions__Detail~p__metting__information__detail~p__metting__o~178abcb8","4":"p__metting__information__detail~p__metting__organization~p__metting__track","5":"vendors~layouts__index~p__Competitions__Entered__Assembly__TeamDateil~p__Competitions__Index","6":"vendors~p__Competitions__Entered~p__Competitions__Entered__Assembly__TeamDateil~p__Competitions__Index","8":"layouts__SimpleLayouts","9":"layouts__index","10":"p__Competitions__Detail","11":"p__Competitions__Entered","12":"p__Competitions__Entered__Assembly__TeamDateil","13":"p__Competitions__Index","14":"p__Competitions__Update","15":"p__metting__banner","16":"p__metting__home","17":"p__metting__information","18":"p__metting__information__detail","19":"p__metting__organization","20":"p__metting__track","22":"vendors~monaco-editor","23":"vendors~p__Competitions__Update"}[chunkId]||chunkId) + "." + {"0":"f6170cac","1":"1d972763","2":"b353f8d2","3":"c140c04e","4":"a1bb3bbf","5":"747ef8d8","6":"511a8faf","7":"31d6cfe0","8":"da01e4c6","9":"e0ccd94e","10":"457f5449","11":"37b8810c","12":"7e90791c","13":"afba6266","14":"d9eeb85a","15":"1ba80596","16":"13d66392","17":"f94af77c","18":"7a74b177","19":"a2cbc9ef","20":"5eec5747","22":"d82723f9","23":"03519cbf","24":"31d6cfe0","25":"31d6cfe0","26":"31d6cfe0","27":"31d6cfe0","28":"31d6cfe0","29":"31d6cfe0","30":"31d6cfe0","31":"31d6cfe0","32":"31d6cfe0","33":"31d6cfe0","34":"31d6cfe0","35":"31d6cfe0","36":"31d6cfe0","37":"31d6cfe0","38":"31d6cfe0","39":"31d6cfe0","40":"31d6cfe0","41":"31d6cfe0","42":"31d6cfe0","43":"31d6cfe0","44":"31d6cfe0","45":"31d6cfe0","46":"31d6cfe0","47":"31d6cfe0","48":"31d6cfe0","49":"31d6cfe0","50":"31d6cfe0","51":"31d6cfe0","52":"31d6cfe0","53":"31d6cfe0","54":"31d6cfe0","55":"31d6cfe0","56":"31d6cfe0","57":"31d6cfe0","58":"31d6cfe0","59":"31d6cfe0","60":"31d6cfe0","61":"31d6cfe0","62":"31d6cfe0","63":"31d6cfe0","64":"31d6cfe0","65":"31d6cfe0","66":"31d6cfe0","67":"31d6cfe0","68":"31d6cfe0","69":"31d6cfe0","70":"31d6cfe0","71":"31d6cfe0","72":"31d6cfe0","73":"31d6cfe0","74":"31d6cfe0","75":"31d6cfe0","76":"31d6cfe0","77":"31d6cfe0","78":"31d6cfe0","79":"31d6cfe0","80":"31d6cfe0","81":"31d6cfe0","82":"31d6cfe0","83":"31d6cfe0","84":"31d6cfe0","85":"31d6cfe0","86":"31d6cfe0"}[chunkId] + ".chunk.css"; +/******/ var fullhref = __webpack_require__.p + href; +/******/ var existingLinkTags = document.getElementsByTagName("link"); +/******/ for(var i = 0; i < existingLinkTags.length; i++) { +/******/ var tag = existingLinkTags[i]; +/******/ var dataHref = tag.getAttribute("data-href") || tag.getAttribute("href"); +/******/ if(tag.rel === "stylesheet" && (dataHref === href || dataHref === fullhref)) return resolve(); +/******/ } +/******/ var existingStyleTags = document.getElementsByTagName("style"); +/******/ for(var i = 0; i < existingStyleTags.length; i++) { +/******/ var tag = existingStyleTags[i]; +/******/ var dataHref = tag.getAttribute("data-href"); +/******/ if(dataHref === href || dataHref === fullhref) return resolve(); +/******/ } +/******/ var linkTag = document.createElement("link"); +/******/ linkTag.rel = "stylesheet"; +/******/ linkTag.type = "text/css"; +/******/ linkTag.onload = resolve; +/******/ linkTag.onerror = function(event) { +/******/ var request = event && event.target && event.target.src || fullhref; +/******/ var err = new Error("Loading CSS chunk " + chunkId + " failed.\n(" + request + ")"); +/******/ err.code = "CSS_CHUNK_LOAD_FAILED"; +/******/ err.request = request; +/******/ delete installedCssChunks[chunkId] +/******/ linkTag.parentNode.removeChild(linkTag) +/******/ reject(err); +/******/ }; +/******/ linkTag.href = fullhref; +/******/ +/******/ var head = document.getElementsByTagName("head")[0]; +/******/ head.appendChild(linkTag); +/******/ }).then(function() { +/******/ installedCssChunks[chunkId] = 0; +/******/ })); +/******/ } +/******/ +/******/ // JSONP chunk loading for javascript +/******/ +/******/ var installedChunkData = installedChunks[chunkId]; +/******/ if(installedChunkData !== 0) { // 0 means "already installed". +/******/ +/******/ // a Promise means "currently loading". +/******/ if(installedChunkData) { +/******/ promises.push(installedChunkData[2]); +/******/ } else { +/******/ // setup Promise in chunk cache +/******/ var promise = new Promise(function(resolve, reject) { +/******/ installedChunkData = installedChunks[chunkId] = [resolve, reject]; +/******/ }); +/******/ promises.push(installedChunkData[2] = promise); +/******/ +/******/ // start chunk loading +/******/ var script = document.createElement('script'); +/******/ var onScriptComplete; +/******/ +/******/ script.charset = 'utf-8'; +/******/ script.timeout = 120; +/******/ if (__webpack_require__.nc) { +/******/ script.setAttribute("nonce", __webpack_require__.nc); +/******/ } +/******/ script.src = jsonpScriptSrc(chunkId); +/******/ +/******/ // create error before stack unwound to get useful stacktrace later +/******/ var error = new Error(); +/******/ onScriptComplete = function (event) { +/******/ // avoid mem leaks in IE. +/******/ script.onerror = script.onload = null; +/******/ clearTimeout(timeout); +/******/ var chunk = installedChunks[chunkId]; +/******/ if(chunk !== 0) { +/******/ if(chunk) { +/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); +/******/ var realSrc = event && event.target && event.target.src; +/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; +/******/ error.name = 'ChunkLoadError'; +/******/ error.type = errorType; +/******/ error.request = realSrc; +/******/ chunk[1](error); +/******/ } +/******/ installedChunks[chunkId] = undefined; +/******/ } +/******/ }; +/******/ var timeout = setTimeout(function(){ +/******/ onScriptComplete({ type: 'timeout', target: script }); +/******/ }, 120000); +/******/ script.onerror = script.onload = onScriptComplete; +/******/ document.head.appendChild(script); +/******/ } +/******/ } +/******/ return Promise.all(promises); +/******/ }; +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = "/"; +/******/ +/******/ // on error function for async loading +/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; }; +/******/ +/******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || []; +/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); +/******/ jsonpArray.push = webpackJsonpCallback; +/******/ jsonpArray = jsonpArray.slice(); +/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); +/******/ var parentJsonpFunction = oldJsonpFunction; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "++zV": +/*!************************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.reflect.define-metadata.js ***! + \************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ "eDxR"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk"); + +var toMetadataKey = ReflectMetadataModule.toKey; +var ordinaryDefineOwnMetadata = ReflectMetadataModule.set; + +// `Reflect.defineMetadata` method +// https://github.com/rbuckton/reflect-metadata +$({ target: 'Reflect', stat: true }, { + defineMetadata: function defineMetadata(metadataKey, metadataValue, target /* , targetKey */) { + var targetKey = arguments.length < 4 ? undefined : toMetadataKey(arguments[3]); + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), targetKey); + } +}); + + +/***/ }), + +/***/ "+0iv": +/*!***********************************************!*\ + !*** ./node_modules/is-plain-object/index.js ***! + \***********************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var isObject = __webpack_require__(/*! isobject */ "qDJ8"); + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} + +module.exports = function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +}; + + +/***/ }), + +/***/ "+2oP": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es.array.slice.js ***! + \********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v"); +var isArray = __webpack_require__(/*! ../internals/is-array */ "6LWA"); +var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "I8vh"); +var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ"); +var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU"); +var createProperty = __webpack_require__(/*! ../internals/create-property */ "hBjN"); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp"); +var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "Hd5f"); +var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "rkAj"); + +var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice'); +var USES_TO_LENGTH = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 }); + +var SPECIES = wellKnownSymbol('species'); +var nativeSlice = [].slice; +var max = Math.max; + +// `Array.prototype.slice` method +// https://tc39.github.io/ecma262/#sec-array.prototype.slice +// fallback for not array-like ES3 strings and DOM objects +$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, { + slice: function slice(start, end) { + var O = toIndexedObject(this); + var length = toLength(O.length); + var k = toAbsoluteIndex(start, length); + var fin = toAbsoluteIndex(end === undefined ? length : end, length); + // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible + var Constructor, result, n; + if (isArray(O)) { + Constructor = O.constructor; + // cross-realm fallback + if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) { + Constructor = undefined; + } else if (isObject(Constructor)) { + Constructor = Constructor[SPECIES]; + if (Constructor === null) Constructor = undefined; + } + if (Constructor === Array || Constructor === undefined) { + return nativeSlice.call(O, k, fin); + } + } + result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0)); + for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]); + result.length = n; + return result; + } +}); + + +/***/ }), + +/***/ "+Gva": +/*!**********************************************************!*\ + !*** ./node_modules/antd/es/locale/zh_CN.js + 4 modules ***! + \**********************************************************/ +/*! exports provided: default */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-pagination/es/locale/zh_CN.js because of ./node_modules/rc-pagination/es/Pagination.js */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// EXTERNAL MODULE: ./node_modules/rc-pagination/es/locale/zh_CN.js +var zh_CN = __webpack_require__("N2Kk"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js +var helpers_extends = __webpack_require__("pVnL"); +var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends); + +// CONCATENATED MODULE: ./node_modules/rc-picker/es/locale/zh_CN.js +var locale = { + locale: 'zh_CN', + today: '今天', + now: '此刻', + backToToday: '返回今天', + ok: '确定', + timeSelect: '选择时间', + dateSelect: '选择日期', + weekSelect: '选择周', + clear: '清除', + month: '月', + year: '年', + previousMonth: '上个月 (翻页上键)', + nextMonth: '下个月 (翻页下键)', + monthSelect: '选择月份', + yearSelect: '选择年份', + decadeSelect: '选择年代', + yearFormat: 'YYYY年', + dayFormat: 'D日', + dateFormat: 'YYYY年M月D日', + dateTimeFormat: 'YYYY年M月D日 HH时mm分ss秒', + previousYear: '上一年 (Control键加左方向键)', + nextYear: '下一年 (Control键加右方向键)', + previousDecade: '上一年代', + nextDecade: '下一年代', + previousCentury: '上一世纪', + nextCentury: '下一世纪' +}; +/* harmony default export */ var locale_zh_CN = (locale); +// CONCATENATED MODULE: ./node_modules/antd/es/time-picker/locale/zh_CN.js +var zh_CN_locale = { + placeholder: '请选择时间', + rangePlaceholder: ['开始时间', '结束时间'] +}; +/* harmony default export */ var time_picker_locale_zh_CN = (zh_CN_locale); +// CONCATENATED MODULE: ./node_modules/antd/es/date-picker/locale/zh_CN.js + + + // 统一合并为完整的 Locale + +var locale_zh_CN_locale = { + lang: extends_default()({ + placeholder: '请选择日期', + yearPlaceholder: '请选择年份', + quarterPlaceholder: '请选择季度', + monthPlaceholder: '请选择月份', + weekPlaceholder: '请选择周', + rangePlaceholder: ['开始日期', '结束日期'], + rangeYearPlaceholder: ['开始年份', '结束年份'], + rangeMonthPlaceholder: ['开始月份', '结束月份'], + rangeWeekPlaceholder: ['开始周', '结束周'] + }, locale_zh_CN), + timePickerLocale: extends_default()({}, time_picker_locale_zh_CN) +}; // should add whitespace between char in Button + +locale_zh_CN_locale.lang.ok = '确 定'; // All settings at: +// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json + +/* harmony default export */ var date_picker_locale_zh_CN = (locale_zh_CN_locale); +// CONCATENATED MODULE: ./node_modules/antd/es/calendar/locale/zh_CN.js + +/* harmony default export */ var calendar_locale_zh_CN = (date_picker_locale_zh_CN); +// CONCATENATED MODULE: ./node_modules/antd/es/locale/zh_CN.js +/* eslint-disable no-template-curly-in-string */ + + + + +var typeTemplate = '${label}不是一个有效的${type}'; +var localeValues = { + locale: 'zh-cn', + Pagination: zh_CN["a" /* default */], + DatePicker: date_picker_locale_zh_CN, + TimePicker: time_picker_locale_zh_CN, + Calendar: calendar_locale_zh_CN, + // locales for all comoponents + global: { + placeholder: '请选择' + }, + Table: { + filterTitle: '筛选', + filterConfirm: '确定', + filterReset: '重置', + filterEmptyText: '无筛选项', + selectAll: '全选当页', + selectInvert: '反选当页', + selectionAll: '全选所有', + sortTitle: '排序', + expand: '展开行', + collapse: '关闭行', + triggerDesc: '点击降序', + triggerAsc: '点击升序', + cancelSort: '取消排序' + }, + Modal: { + okText: '确定', + cancelText: '取消', + justOkText: '知道了' + }, + Popconfirm: { + cancelText: '取消', + okText: '确定' + }, + Transfer: { + searchPlaceholder: '请输入搜索内容', + itemUnit: '项', + itemsUnit: '项', + remove: '删除', + selectCurrent: '全选当页', + removeCurrent: '删除当页', + selectAll: '全选所有', + removeAll: '删除全部', + selectInvert: '反选当页' + }, + Upload: { + uploading: '文件上传中', + removeFile: '删除文件', + uploadError: '上传错误', + previewFile: '预览文件', + downloadFile: '下载文件' + }, + Empty: { + description: '暂无数据' + }, + Icon: { + icon: '图标' + }, + Text: { + edit: '编辑', + copy: '复制', + copied: '复制成功', + expand: '展开' + }, + PageHeader: { + back: '返回' + }, + Form: { + optional: '(可选)', + defaultValidateMessages: { + "default": '字段验证错误${label}', + required: '请输入${label}', + "enum": '${label}必须是其中一个[${enum}]', + whitespace: '${label}不能为空字符', + date: { + format: '${label}日期格式无效', + parse: '${label}不能转换为日期', + invalid: '${label}是一个无效日期' + }, + types: { + string: typeTemplate, + method: typeTemplate, + array: typeTemplate, + object: typeTemplate, + number: typeTemplate, + date: typeTemplate, + "boolean": typeTemplate, + integer: typeTemplate, + "float": typeTemplate, + regexp: typeTemplate, + email: typeTemplate, + url: typeTemplate, + hex: typeTemplate + }, + string: { + len: '${label}须为${len}个字符', + min: '${label}最少${min}个字符', + max: '${label}最多${max}个字符', + range: '${label}须在${min}-${max}字符之间' + }, + number: { + len: '${label}必须等于${len}', + min: '${label}最小值为${min}', + max: '${label}最大值为${max}', + range: '${label}须在${min}-${max}之间' + }, + array: { + len: '须为${len}个${label}', + min: '最少${min}个${label}', + max: '最多${max}个${label}', + range: '${label}数量须在${min}-${max}之间' + }, + pattern: { + mismatch: '${label}与模式不匹配${pattern}' + } + } + } +}; +/* harmony default export */ var es_locale_zh_CN = __webpack_exports__["default"] = (localeValues); + +/***/ }), + +/***/ "+L6B": +/*!****************************************************!*\ + !*** ./node_modules/antd/es/button/style/index.js ***! + \****************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "cIOH"); +/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_index_less__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "qCM6"); +/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__); + + + +/***/ }), + +/***/ "+M1K": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/internals/to-positive-integer.js ***! + \***************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(/*! ../internals/to-integer */ "ppGB"); + +module.exports = function (it) { + var result = toInteger(it); + if (result < 0) throw RangeError("The argument can't be less than 0"); + return result; +}; + + +/***/ }), + +/***/ "+P9B": +/*!*******************************************************************!*\ + !*** ./node_modules/@ant-design/icons/lib/icons/CloseOutlined.js ***! + \*******************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt"); +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9")); +var React = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI")); +var _CloseOutlined = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons-svg/lib/asn/CloseOutlined */ "+xQR")); +var _AntdIcon = _interopRequireDefault(__webpack_require__(/*! ../components/AntdIcon */ "KQxl")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +// GENERATE BY ./scripts/generate.ts +// DON NOT EDIT IT MANUALLY + +var CloseOutlined = function CloseOutlined(props, ref) { + return /*#__PURE__*/React.createElement(_AntdIcon.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, { + ref: ref, + icon: _CloseOutlined.default + })); +}; +var RefIcon = /*#__PURE__*/React.forwardRef(CloseOutlined); +if (false) {} +var _default = exports.default = RefIcon; + +/***/ }), + +/***/ "+kx5": +/*!********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.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 _arrayWithHoles; }); +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} + +/***/ }), + +/***/ "+qE3": +/*!***************************************!*\ + !*** ./node_modules/events/events.js ***! + \***************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +var R = typeof Reflect === 'object' ? Reflect : null +var ReflectApply = R && typeof R.apply === 'function' + ? R.apply + : function ReflectApply(target, receiver, args) { + return Function.prototype.apply.call(target, receiver, args); + } + +var ReflectOwnKeys +if (R && typeof R.ownKeys === 'function') { + ReflectOwnKeys = R.ownKeys +} else if (Object.getOwnPropertySymbols) { + ReflectOwnKeys = function ReflectOwnKeys(target) { + return Object.getOwnPropertyNames(target) + .concat(Object.getOwnPropertySymbols(target)); + }; +} else { + ReflectOwnKeys = function ReflectOwnKeys(target) { + return Object.getOwnPropertyNames(target); + }; +} + +function ProcessEmitWarning(warning) { + if (console && console.warn) console.warn(warning); +} + +var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) { + return value !== value; +} + +function EventEmitter() { + EventEmitter.init.call(this); +} +module.exports = EventEmitter; +module.exports.once = once; + +// Backwards-compat with node 0.10.x +EventEmitter.EventEmitter = EventEmitter; + +EventEmitter.prototype._events = undefined; +EventEmitter.prototype._eventsCount = 0; +EventEmitter.prototype._maxListeners = undefined; + +// By default EventEmitters will print a warning if more than 10 listeners are +// added to it. This is a useful default which helps finding memory leaks. +var defaultMaxListeners = 10; + +function checkListener(listener) { + if (typeof listener !== 'function') { + throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener); + } +} + +Object.defineProperty(EventEmitter, 'defaultMaxListeners', { + enumerable: true, + get: function() { + return defaultMaxListeners; + }, + set: function(arg) { + if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) { + throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.'); + } + defaultMaxListeners = arg; + } +}); + +EventEmitter.init = function() { + + if (this._events === undefined || + this._events === Object.getPrototypeOf(this)._events) { + this._events = Object.create(null); + this._eventsCount = 0; + } + + this._maxListeners = this._maxListeners || undefined; +}; + +// Obviously not all Emitters should be limited to 10. This function allows +// that to be increased. Set to zero for unlimited. +EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) { + if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) { + throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.'); + } + this._maxListeners = n; + return this; +}; + +function _getMaxListeners(that) { + if (that._maxListeners === undefined) + return EventEmitter.defaultMaxListeners; + return that._maxListeners; +} + +EventEmitter.prototype.getMaxListeners = function getMaxListeners() { + return _getMaxListeners(this); +}; + +EventEmitter.prototype.emit = function emit(type) { + var args = []; + for (var i = 1; i < arguments.length; i++) args.push(arguments[i]); + var doError = (type === 'error'); + + var events = this._events; + if (events !== undefined) + doError = (doError && events.error === undefined); + else if (!doError) + return false; + + // If there is no 'error' event listener then throw. + if (doError) { + var er; + if (args.length > 0) + er = args[0]; + if (er instanceof Error) { + // Note: The comments on the `throw` lines are intentional, they show + // up in Node's output if this results in an unhandled exception. + throw er; // Unhandled 'error' event + } + // At least give some kind of context to the user + var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : '')); + err.context = er; + throw err; // Unhandled 'error' event + } + + var handler = events[type]; + + if (handler === undefined) + return false; + + if (typeof handler === 'function') { + ReflectApply(handler, this, args); + } else { + var len = handler.length; + var listeners = arrayClone(handler, len); + for (var i = 0; i < len; ++i) + ReflectApply(listeners[i], this, args); + } + + return true; +}; + +function _addListener(target, type, listener, prepend) { + var m; + var events; + var existing; + + checkListener(listener); + + events = target._events; + if (events === undefined) { + events = target._events = Object.create(null); + target._eventsCount = 0; + } else { + // To avoid recursion in the case that type === "newListener"! Before + // adding it to the listeners, first emit "newListener". + if (events.newListener !== undefined) { + target.emit('newListener', type, + listener.listener ? listener.listener : listener); + + // Re-assign `events` because a newListener handler could have caused the + // this._events to be assigned to a new object + events = target._events; + } + existing = events[type]; + } + + if (existing === undefined) { + // Optimize the case of one listener. Don't need the extra array object. + existing = events[type] = listener; + ++target._eventsCount; + } else { + if (typeof existing === 'function') { + // Adding the second element, need to change to array. + existing = events[type] = + prepend ? [listener, existing] : [existing, listener]; + // If we've already got an array, just append. + } else if (prepend) { + existing.unshift(listener); + } else { + existing.push(listener); + } + + // Check for listener leak + m = _getMaxListeners(target); + if (m > 0 && existing.length > m && !existing.warned) { + existing.warned = true; + // No error code for this since it is a Warning + // eslint-disable-next-line no-restricted-syntax + var w = new Error('Possible EventEmitter memory leak detected. ' + + existing.length + ' ' + String(type) + ' listeners ' + + 'added. Use emitter.setMaxListeners() to ' + + 'increase limit'); + w.name = 'MaxListenersExceededWarning'; + w.emitter = target; + w.type = type; + w.count = existing.length; + ProcessEmitWarning(w); + } + } + + return target; +} + +EventEmitter.prototype.addListener = function addListener(type, listener) { + return _addListener(this, type, listener, false); +}; + +EventEmitter.prototype.on = EventEmitter.prototype.addListener; + +EventEmitter.prototype.prependListener = + function prependListener(type, listener) { + return _addListener(this, type, listener, true); + }; + +function onceWrapper() { + if (!this.fired) { + this.target.removeListener(this.type, this.wrapFn); + this.fired = true; + if (arguments.length === 0) + return this.listener.call(this.target); + return this.listener.apply(this.target, arguments); + } +} + +function _onceWrap(target, type, listener) { + var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener }; + var wrapped = onceWrapper.bind(state); + wrapped.listener = listener; + state.wrapFn = wrapped; + return wrapped; +} + +EventEmitter.prototype.once = function once(type, listener) { + checkListener(listener); + this.on(type, _onceWrap(this, type, listener)); + return this; +}; + +EventEmitter.prototype.prependOnceListener = + function prependOnceListener(type, listener) { + checkListener(listener); + this.prependListener(type, _onceWrap(this, type, listener)); + return this; + }; + +// Emits a 'removeListener' event if and only if the listener was removed. +EventEmitter.prototype.removeListener = + function removeListener(type, listener) { + var list, events, position, i, originalListener; + + checkListener(listener); + + events = this._events; + if (events === undefined) + return this; + + list = events[type]; + if (list === undefined) + return this; + + if (list === listener || list.listener === listener) { + if (--this._eventsCount === 0) + this._events = Object.create(null); + else { + delete events[type]; + if (events.removeListener) + this.emit('removeListener', type, list.listener || listener); + } + } else if (typeof list !== 'function') { + position = -1; + + for (i = list.length - 1; i >= 0; i--) { + if (list[i] === listener || list[i].listener === listener) { + originalListener = list[i].listener; + position = i; + break; + } + } + + if (position < 0) + return this; + + if (position === 0) + list.shift(); + else { + spliceOne(list, position); + } + + if (list.length === 1) + events[type] = list[0]; + + if (events.removeListener !== undefined) + this.emit('removeListener', type, originalListener || listener); + } + + return this; + }; + +EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + +EventEmitter.prototype.removeAllListeners = + function removeAllListeners(type) { + var listeners, events, i; + + events = this._events; + if (events === undefined) + return this; + + // not listening for removeListener, no need to emit + if (events.removeListener === undefined) { + if (arguments.length === 0) { + this._events = Object.create(null); + this._eventsCount = 0; + } else if (events[type] !== undefined) { + if (--this._eventsCount === 0) + this._events = Object.create(null); + else + delete events[type]; + } + return this; + } + + // emit removeListener for all listeners on all events + if (arguments.length === 0) { + var keys = Object.keys(events); + var key; + for (i = 0; i < keys.length; ++i) { + key = keys[i]; + if (key === 'removeListener') continue; + this.removeAllListeners(key); + } + this.removeAllListeners('removeListener'); + this._events = Object.create(null); + this._eventsCount = 0; + return this; + } + + listeners = events[type]; + + if (typeof listeners === 'function') { + this.removeListener(type, listeners); + } else if (listeners !== undefined) { + // LIFO order + for (i = listeners.length - 1; i >= 0; i--) { + this.removeListener(type, listeners[i]); + } + } + + return this; + }; + +function _listeners(target, type, unwrap) { + var events = target._events; + + if (events === undefined) + return []; + + var evlistener = events[type]; + if (evlistener === undefined) + return []; + + if (typeof evlistener === 'function') + return unwrap ? [evlistener.listener || evlistener] : [evlistener]; + + return unwrap ? + unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length); +} + +EventEmitter.prototype.listeners = function listeners(type) { + return _listeners(this, type, true); +}; + +EventEmitter.prototype.rawListeners = function rawListeners(type) { + return _listeners(this, type, false); +}; + +EventEmitter.listenerCount = function(emitter, type) { + if (typeof emitter.listenerCount === 'function') { + return emitter.listenerCount(type); + } else { + return listenerCount.call(emitter, type); + } +}; + +EventEmitter.prototype.listenerCount = listenerCount; +function listenerCount(type) { + var events = this._events; + + if (events !== undefined) { + var evlistener = events[type]; + + if (typeof evlistener === 'function') { + return 1; + } else if (evlistener !== undefined) { + return evlistener.length; + } + } + + return 0; +} + +EventEmitter.prototype.eventNames = function eventNames() { + return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : []; +}; + +function arrayClone(arr, n) { + var copy = new Array(n); + for (var i = 0; i < n; ++i) + copy[i] = arr[i]; + return copy; +} + +function spliceOne(list, index) { + for (; index + 1 < list.length; index++) + list[index] = list[index + 1]; + list.pop(); +} + +function unwrapListeners(arr) { + var ret = new Array(arr.length); + for (var i = 0; i < ret.length; ++i) { + ret[i] = arr[i].listener || arr[i]; + } + return ret; +} + +function once(emitter, name) { + return new Promise(function (resolve, reject) { + function errorListener(err) { + emitter.removeListener(name, resolver); + reject(err); + } + + function resolver() { + if (typeof emitter.removeListener === 'function') { + emitter.removeListener('error', errorListener); + } + resolve([].slice.call(arguments)); + }; + + eventTargetAgnosticAddListener(emitter, name, resolver, { once: true }); + if (name !== 'error') { + addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true }); + } + }); +} + +function addErrorHandlerIfEventEmitter(emitter, handler, flags) { + if (typeof emitter.on === 'function') { + eventTargetAgnosticAddListener(emitter, 'error', handler, flags); + } +} + +function eventTargetAgnosticAddListener(emitter, name, listener, flags) { + if (typeof emitter.on === 'function') { + if (flags.once) { + emitter.once(name, listener); + } else { + emitter.on(name, listener); + } + } else if (typeof emitter.addEventListener === 'function') { + // EventTarget does not have `error` event semantics like Node + // EventEmitters, we do not listen for `error` events here. + emitter.addEventListener(name, function wrapListener(arg) { + // IE does not have builtin `{ once: true }` support so we + // have to do it manually. + if (flags.once) { + emitter.removeEventListener(name, wrapListener); + } + listener(arg); + }); + } else { + throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter); + } +} + + +/***/ }), + +/***/ "+wdc": +/*!****************************************************************!*\ + !*** ./node_modules/scheduler/cjs/scheduler.production.min.js ***! + \****************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** @license React v0.18.0 + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +Object.defineProperty(exports,"__esModule",{value:!0});var f,g,h,k,l; +if("undefined"===typeof window||"function"!==typeof MessageChannel){var p=null,q=null,t=function(){if(null!==p)try{var a=exports.unstable_now();p(!0,a);p=null}catch(b){throw setTimeout(t,0),b;}},u=Date.now();exports.unstable_now=function(){return Date.now()-u};f=function(a){null!==p?setTimeout(f,0,a):(p=a,setTimeout(t,0))};g=function(a,b){q=setTimeout(a,b)};h=function(){clearTimeout(q)};k=function(){return!1};l=exports.unstable_forceFrameRate=function(){}}else{var w=window.performance,x=window.Date, +y=window.setTimeout,z=window.clearTimeout;if("undefined"!==typeof console){var A=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills");"function"!==typeof A&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"=== +typeof w&&"function"===typeof w.now)exports.unstable_now=function(){return w.now()};else{var B=x.now();exports.unstable_now=function(){return x.now()-B}}var C=!1,D=null,E=-1,F=5,G=0;k=function(){return exports.unstable_now()>=G};l=function(){};exports.unstable_forceFrameRate=function(a){0>a||125K(n,c))void 0!==r&&0>K(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>K(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function K(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var N=[],O=[],P=1,Q=null,R=3,S=!1,T=!1,U=!1; +function V(a){for(var b=L(O);null!==b;){if(null===b.callback)M(O);else if(b.startTime<=a)M(O),b.sortIndex=b.expirationTime,J(N,b);else break;b=L(O)}}function W(a){U=!1;V(a);if(!T)if(null!==L(N))T=!0,f(X);else{var b=L(O);null!==b&&g(W,b.startTime-a)}} +function X(a,b){T=!1;U&&(U=!1,h());S=!0;var c=R;try{V(b);for(Q=L(N);null!==Q&&(!(Q.expirationTime>b)||a&&!k());){var d=Q.callback;if(null!==d){Q.callback=null;R=Q.priorityLevel;var e=d(Q.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?Q.callback=e:Q===L(N)&&M(N);V(b)}else M(N);Q=L(N)}if(null!==Q)var m=!0;else{var n=L(O);null!==n&&g(W,n.startTime-b);m=!1}return m}finally{Q=null,R=c,S=!1}} +function Y(a){switch(a){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}}var Z=l;exports.unstable_ImmediatePriority=1;exports.unstable_UserBlockingPriority=2;exports.unstable_NormalPriority=3;exports.unstable_IdlePriority=5;exports.unstable_LowPriority=4;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=R;R=a;try{return b()}finally{R=c}}; +exports.unstable_next=function(a){switch(R){case 1:case 2:case 3:var b=3;break;default:b=R}var c=R;R=b;try{return a()}finally{R=c}}; +exports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();if("object"===typeof c&&null!==c){var e=c.delay;e="number"===typeof e&&0d?(a.sortIndex=e,J(O,a),null===L(N)&&a===L(O)&&(U?h():U=!0,g(W,e-d))):(a.sortIndex=c,J(N,a),T||S||(T=!0,f(X)));return a};exports.unstable_cancelCallback=function(a){a.callback=null}; +exports.unstable_wrapCallback=function(a){var b=R;return function(){var c=R;R=b;try{return a.apply(this,arguments)}finally{R=c}}};exports.unstable_getCurrentPriorityLevel=function(){return R};exports.unstable_shouldYield=function(){var a=exports.unstable_now();V(a);var b=L(N);return b!==Q&&null!==Q&&null!==b&&null!==b.callback&&b.startTime<=a&&b.expirationTime true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); +} + +module.exports = isSymbol; + + +/***/ }), + +/***/ "/EoS": +/*!******************************************!*\ + !*** ./src/styles/iconfont/iconfont.css ***! + \******************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), + +/***/ "/GqU": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/internals/to-indexed-object.js ***! + \*************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +// toObject with fallback for non-array-like ES3 strings +var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "RK3t"); +var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF"); + +module.exports = function (it) { + return IndexedObject(requireObjectCoercible(it)); +}; + + +/***/ }), + +/***/ "/MKj": +/*!***********************************************************!*\ + !*** ./node_modules/react-redux/es/index.js + 24 modules ***! + \***********************************************************/ +/*! exports provided: Provider, connectAdvanced, ReactReduxContext, connect, useDispatch, createDispatchHook, useSelector, createSelectorHook, useStore, createStoreHook, shallowEqual, batch */ +/*! exports used: Provider, ReactReduxContext, connect */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js because of ./node_modules/rc-tooltip/es/Tooltip.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-redux/node_modules/react-is/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ components_Provider; }); +__webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ ReactReduxContext; }); +__webpack_require__.d(__webpack_exports__, "c", function() { return /* reexport */ connect_connect; }); + +// UNUSED EXPORTS: connectAdvanced, useDispatch, createDispatchHook, useSelector, createSelectorHook, useStore, createStoreHook, shallowEqual, batch + +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__("q1tI"); +var react_default = /*#__PURE__*/__webpack_require__.n(react); + +// CONCATENATED MODULE: ./node_modules/react-redux/es/components/Context.js + +var ReactReduxContext = /*#__PURE__*/react_default.a.createContext(null); + +if (false) {} + +/* harmony default export */ var components_Context = (ReactReduxContext); +// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/batch.js +// Default to a dummy "batch" implementation that just runs the callback +function defaultNoopBatch(callback) { + callback(); +} + +var batch_batch = defaultNoopBatch; // Allow injecting another batching function later + +var setBatch = function setBatch(newBatch) { + return batch_batch = newBatch; +}; // Supply a getter just to skip dealing with ESM bindings + +var getBatch = function getBatch() { + return batch_batch; +}; +// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/Subscription.js + // encapsulates the subscription logic for connecting a component to the redux store, as +// well as nesting subscriptions of descendant components, so that we can ensure the +// ancestor components re-render before descendants + +function createListenerCollection() { + var batch = getBatch(); + var first = null; + var last = null; + return { + clear: function clear() { + first = null; + last = null; + }, + notify: function notify() { + batch(function () { + var listener = first; + + while (listener) { + listener.callback(); + listener = listener.next; + } + }); + }, + get: function get() { + var listeners = []; + var listener = first; + + while (listener) { + listeners.push(listener); + listener = listener.next; + } + + return listeners; + }, + subscribe: function subscribe(callback) { + var isSubscribed = true; + var listener = last = { + callback: callback, + next: null, + prev: last + }; + + if (listener.prev) { + listener.prev.next = listener; + } else { + first = listener; + } + + return function unsubscribe() { + if (!isSubscribed || first === null) return; + isSubscribed = false; + + if (listener.next) { + listener.next.prev = listener.prev; + } else { + last = listener.prev; + } + + if (listener.prev) { + listener.prev.next = listener.next; + } else { + first = listener.next; + } + }; + } + }; +} + +var nullListeners = { + notify: function notify() {}, + get: function get() { + return []; + } +}; +function createSubscription(store, parentSub) { + var unsubscribe; + var listeners = nullListeners; + + function addNestedSub(listener) { + trySubscribe(); + return listeners.subscribe(listener); + } + + function notifyNestedSubs() { + listeners.notify(); + } + + function handleChangeWrapper() { + if (subscription.onStateChange) { + subscription.onStateChange(); + } + } + + function isSubscribed() { + return Boolean(unsubscribe); + } + + function trySubscribe() { + if (!unsubscribe) { + unsubscribe = parentSub ? parentSub.addNestedSub(handleChangeWrapper) : store.subscribe(handleChangeWrapper); + listeners = createListenerCollection(); + } + } + + function tryUnsubscribe() { + if (unsubscribe) { + unsubscribe(); + unsubscribe = undefined; + listeners.clear(); + listeners = nullListeners; + } + } + + var subscription = { + addNestedSub: addNestedSub, + notifyNestedSubs: notifyNestedSubs, + handleChangeWrapper: handleChangeWrapper, + isSubscribed: isSubscribed, + trySubscribe: trySubscribe, + tryUnsubscribe: tryUnsubscribe, + getListeners: function getListeners() { + return listeners; + } + }; + return subscription; +} +// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js + // React currently throws a warning when using useLayoutEffect on the server. +// To get around it, we can conditionally useEffect on the server (no-op) and +// useLayoutEffect in the browser. We need useLayoutEffect to ensure the store +// subscription callback always has the selector from the latest render commit +// available, otherwise a store update may happen between render and the effect, +// which may cause missed updates; we also must ensure the store subscription +// is created synchronously, otherwise a store update may occur before the +// subscription is created and an inconsistent state may be observed + +var useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? react["useLayoutEffect"] : react["useEffect"]; +// CONCATENATED MODULE: ./node_modules/react-redux/es/components/Provider.js + + + + + + +function Provider(_ref) { + var store = _ref.store, + context = _ref.context, + children = _ref.children; + var contextValue = Object(react["useMemo"])(function () { + var subscription = createSubscription(store); + return { + store: store, + subscription: subscription + }; + }, [store]); + var previousState = Object(react["useMemo"])(function () { + return store.getState(); + }, [store]); + useIsomorphicLayoutEffect(function () { + var subscription = contextValue.subscription; + subscription.onStateChange = subscription.notifyNestedSubs; + subscription.trySubscribe(); + + if (previousState !== store.getState()) { + subscription.notifyNestedSubs(); + } + + return function () { + subscription.tryUnsubscribe(); + subscription.onStateChange = null; + }; + }, [contextValue, previousState]); + var Context = context || ReactReduxContext; + return /*#__PURE__*/react_default.a.createElement(Context.Provider, { + value: contextValue + }, children); +} + +if (false) {} + +/* harmony default export */ var components_Provider = (Provider); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js +var esm_extends = __webpack_require__("wx14"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +var objectWithoutPropertiesLoose = __webpack_require__("zLVn"); + +// EXTERNAL MODULE: ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +var hoist_non_react_statics_cjs = __webpack_require__("2mql"); +var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs); + +// EXTERNAL MODULE: ./node_modules/react-redux/node_modules/react-is/index.js +var react_is = __webpack_require__("0vxD"); + +// CONCATENATED MODULE: ./node_modules/react-redux/es/components/connectAdvanced.js + + +var _excluded = ["getDisplayName", "methodName", "renderCountProp", "shouldHandleStateChanges", "storeKey", "withRef", "forwardRef", "context"], + _excluded2 = ["reactReduxForwardedRef"]; + + + + + + // Define some constant arrays just to avoid re-creating these + +var EMPTY_ARRAY = []; +var NO_SUBSCRIPTION_ARRAY = [null, null]; + +var stringifyComponent = function stringifyComponent(Comp) { + try { + return JSON.stringify(Comp); + } catch (err) { + return String(Comp); + } +}; + +function storeStateUpdatesReducer(state, action) { + var updateCount = state[1]; + return [action.payload, updateCount + 1]; +} + +function useIsomorphicLayoutEffectWithArgs(effectFunc, effectArgs, dependencies) { + useIsomorphicLayoutEffect(function () { + return effectFunc.apply(void 0, effectArgs); + }, dependencies); +} + +function captureWrapperProps(lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, actualChildProps, childPropsFromStoreUpdate, notifyNestedSubs) { + // We want to capture the wrapper props and child props we used for later comparisons + lastWrapperProps.current = wrapperProps; + lastChildProps.current = actualChildProps; + renderIsScheduled.current = false; // If the render was from a store update, clear out that reference and cascade the subscriber update + + if (childPropsFromStoreUpdate.current) { + childPropsFromStoreUpdate.current = null; + notifyNestedSubs(); + } +} + +function subscribeUpdates(shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, childPropsFromStoreUpdate, notifyNestedSubs, forceComponentUpdateDispatch) { + // If we're not subscribed to the store, nothing to do here + if (!shouldHandleStateChanges) return; // Capture values for checking if and when this component unmounts + + var didUnsubscribe = false; + var lastThrownError = null; // We'll run this callback every time a store subscription update propagates to this component + + var checkForUpdates = function checkForUpdates() { + if (didUnsubscribe) { + // Don't run stale listeners. + // Redux doesn't guarantee unsubscriptions happen until next dispatch. + return; + } + + var latestStoreState = store.getState(); + var newChildProps, error; + + try { + // Actually run the selector with the most recent store state and wrapper props + // to determine what the child props should be + newChildProps = childPropsSelector(latestStoreState, lastWrapperProps.current); + } catch (e) { + error = e; + lastThrownError = e; + } + + if (!error) { + lastThrownError = null; + } // If the child props haven't changed, nothing to do here - cascade the subscription update + + + if (newChildProps === lastChildProps.current) { + if (!renderIsScheduled.current) { + notifyNestedSubs(); + } + } else { + // Save references to the new child props. Note that we track the "child props from store update" + // as a ref instead of a useState/useReducer because we need a way to determine if that value has + // been processed. If this went into useState/useReducer, we couldn't clear out the value without + // forcing another re-render, which we don't want. + lastChildProps.current = newChildProps; + childPropsFromStoreUpdate.current = newChildProps; + renderIsScheduled.current = true; // If the child props _did_ change (or we caught an error), this wrapper component needs to re-render + + forceComponentUpdateDispatch({ + type: 'STORE_UPDATED', + payload: { + error: error + } + }); + } + }; // Actually subscribe to the nearest connected ancestor (or store) + + + subscription.onStateChange = checkForUpdates; + subscription.trySubscribe(); // Pull data from the store after first render in case the store has + // changed since we began. + + checkForUpdates(); + + var unsubscribeWrapper = function unsubscribeWrapper() { + didUnsubscribe = true; + subscription.tryUnsubscribe(); + subscription.onStateChange = null; + + if (lastThrownError) { + // It's possible that we caught an error due to a bad mapState function, but the + // parent re-rendered without this component and we're about to unmount. + // This shouldn't happen as long as we do top-down subscriptions correctly, but + // if we ever do those wrong, this throw will surface the error in our tests. + // In that case, throw the error from here so it doesn't get lost. + throw lastThrownError; + } + }; + + return unsubscribeWrapper; +} + +var initStateUpdates = function initStateUpdates() { + return [null, 0]; +}; + +function connectAdvanced( +/* + selectorFactory is a func that is responsible for returning the selector function used to + compute new props from state, props, and dispatch. For example: + export default connectAdvanced((dispatch, options) => (state, props) => ({ + thing: state.things[props.thingId], + saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)), + }))(YourComponent) + Access to dispatch is provided to the factory so selectorFactories can bind actionCreators + outside of their selector as an optimization. Options passed to connectAdvanced are passed to + the selectorFactory, along with displayName and WrappedComponent, as the second argument. + Note that selectorFactory is responsible for all caching/memoization of inbound and outbound + props. Do not use connectAdvanced directly without memoizing results between calls to your + selector, otherwise the Connect component will re-render on every state or props change. +*/ +selectorFactory, // options object: +_ref) { + if (_ref === void 0) { + _ref = {}; + } + + var _ref2 = _ref, + _ref2$getDisplayName = _ref2.getDisplayName, + getDisplayName = _ref2$getDisplayName === void 0 ? function (name) { + return "ConnectAdvanced(" + name + ")"; + } : _ref2$getDisplayName, + _ref2$methodName = _ref2.methodName, + methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName, + _ref2$renderCountProp = _ref2.renderCountProp, + renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp, + _ref2$shouldHandleSta = _ref2.shouldHandleStateChanges, + shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta, + _ref2$storeKey = _ref2.storeKey, + storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey, + _ref2$withRef = _ref2.withRef, + withRef = _ref2$withRef === void 0 ? false : _ref2$withRef, + _ref2$forwardRef = _ref2.forwardRef, + forwardRef = _ref2$forwardRef === void 0 ? false : _ref2$forwardRef, + _ref2$context = _ref2.context, + context = _ref2$context === void 0 ? ReactReduxContext : _ref2$context, + connectOptions = Object(objectWithoutPropertiesLoose["a" /* default */])(_ref2, _excluded); + + if (false) { var customStoreWarningMessage; } + + var Context = context; + return function wrapWithConnect(WrappedComponent) { + if (false) {} + + var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component'; + var displayName = getDisplayName(wrappedComponentName); + + var selectorFactoryOptions = Object(esm_extends["a" /* default */])({}, connectOptions, { + getDisplayName: getDisplayName, + methodName: methodName, + renderCountProp: renderCountProp, + shouldHandleStateChanges: shouldHandleStateChanges, + storeKey: storeKey, + displayName: displayName, + wrappedComponentName: wrappedComponentName, + WrappedComponent: WrappedComponent + }); + + var pure = connectOptions.pure; + + function createChildSelector(store) { + return selectorFactory(store.dispatch, selectorFactoryOptions); + } // If we aren't running in "pure" mode, we don't want to memoize values. + // To avoid conditionally calling hooks, we fall back to a tiny wrapper + // that just executes the given callback immediately. + + + var usePureOnlyMemo = pure ? react["useMemo"] : function (callback) { + return callback(); + }; + + function ConnectFunction(props) { + var _useMemo = Object(react["useMemo"])(function () { + // Distinguish between actual "data" props that were passed to the wrapper component, + // and values needed to control behavior (forwarded refs, alternate context instances). + // To maintain the wrapperProps object reference, memoize this destructuring. + var reactReduxForwardedRef = props.reactReduxForwardedRef, + wrapperProps = Object(objectWithoutPropertiesLoose["a" /* default */])(props, _excluded2); + + return [props.context, reactReduxForwardedRef, wrapperProps]; + }, [props]), + propsContext = _useMemo[0], + reactReduxForwardedRef = _useMemo[1], + wrapperProps = _useMemo[2]; + + var ContextToUse = Object(react["useMemo"])(function () { + // Users may optionally pass in a custom context instance to use instead of our ReactReduxContext. + // Memoize the check that determines which context instance we should use. + return propsContext && propsContext.Consumer && Object(react_is["isContextConsumer"])( /*#__PURE__*/react_default.a.createElement(propsContext.Consumer, null)) ? propsContext : Context; + }, [propsContext, Context]); // Retrieve the store and ancestor subscription via context, if available + + var contextValue = Object(react["useContext"])(ContextToUse); // The store _must_ exist as either a prop or in context. + // We'll check to see if it _looks_ like a Redux store first. + // This allows us to pass through a `store` prop that is just a plain value. + + var didStoreComeFromProps = Boolean(props.store) && Boolean(props.store.getState) && Boolean(props.store.dispatch); + var didStoreComeFromContext = Boolean(contextValue) && Boolean(contextValue.store); + + if (false) {} // Based on the previous check, one of these must be true + + + var store = didStoreComeFromProps ? props.store : contextValue.store; + var childPropsSelector = Object(react["useMemo"])(function () { + // The child props selector needs the store reference as an input. + // Re-create this selector whenever the store changes. + return createChildSelector(store); + }, [store]); + + var _useMemo2 = Object(react["useMemo"])(function () { + if (!shouldHandleStateChanges) return NO_SUBSCRIPTION_ARRAY; // This Subscription's source should match where store came from: props vs. context. A component + // connected to the store via props shouldn't use subscription from context, or vice versa. + + // This Subscription's source should match where store came from: props vs. context. A component + // connected to the store via props shouldn't use subscription from context, or vice versa. + var subscription = createSubscription(store, didStoreComeFromProps ? null : contextValue.subscription); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in + // the middle of the notification loop, where `subscription` will then be null. This can + // probably be avoided if Subscription's listeners logic is changed to not call listeners + // that have been unsubscribed in the middle of the notification loop. + + // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in + // the middle of the notification loop, where `subscription` will then be null. This can + // probably be avoided if Subscription's listeners logic is changed to not call listeners + // that have been unsubscribed in the middle of the notification loop. + var notifyNestedSubs = subscription.notifyNestedSubs.bind(subscription); + return [subscription, notifyNestedSubs]; + }, [store, didStoreComeFromProps, contextValue]), + subscription = _useMemo2[0], + notifyNestedSubs = _useMemo2[1]; // Determine what {store, subscription} value should be put into nested context, if necessary, + // and memoize that value to avoid unnecessary context updates. + + + var overriddenContextValue = Object(react["useMemo"])(function () { + if (didStoreComeFromProps) { + // This component is directly subscribed to a store from props. + // We don't want descendants reading from this store - pass down whatever + // the existing context value is from the nearest connected ancestor. + return contextValue; + } // Otherwise, put this component's subscription instance into context, so that + // connected descendants won't update until after this component is done + + + return Object(esm_extends["a" /* default */])({}, contextValue, { + subscription: subscription + }); + }, [didStoreComeFromProps, contextValue, subscription]); // We need to force this wrapper component to re-render whenever a Redux store update + // causes a change to the calculated child component props (or we caught an error in mapState) + + var _useReducer = Object(react["useReducer"])(storeStateUpdatesReducer, EMPTY_ARRAY, initStateUpdates), + _useReducer$ = _useReducer[0], + previousStateUpdateResult = _useReducer$[0], + forceComponentUpdateDispatch = _useReducer[1]; // Propagate any mapState/mapDispatch errors upwards + + + if (previousStateUpdateResult && previousStateUpdateResult.error) { + throw previousStateUpdateResult.error; + } // Set up refs to coordinate values between the subscription effect and the render logic + + + var lastChildProps = Object(react["useRef"])(); + var lastWrapperProps = Object(react["useRef"])(wrapperProps); + var childPropsFromStoreUpdate = Object(react["useRef"])(); + var renderIsScheduled = Object(react["useRef"])(false); + var actualChildProps = usePureOnlyMemo(function () { + // Tricky logic here: + // - This render may have been triggered by a Redux store update that produced new child props + // - However, we may have gotten new wrapper props after that + // If we have new child props, and the same wrapper props, we know we should use the new child props as-is. + // But, if we have new wrapper props, those might change the child props, so we have to recalculate things. + // So, we'll use the child props from store update only if the wrapper props are the same as last time. + if (childPropsFromStoreUpdate.current && wrapperProps === lastWrapperProps.current) { + return childPropsFromStoreUpdate.current; + } // TODO We're reading the store directly in render() here. Bad idea? + // This will likely cause Bad Things (TM) to happen in Concurrent Mode. + // Note that we do this because on renders _not_ caused by store updates, we need the latest store state + // to determine what the child props should be. + + + return childPropsSelector(store.getState(), wrapperProps); + }, [store, previousStateUpdateResult, wrapperProps]); // We need this to execute synchronously every time we re-render. However, React warns + // about useLayoutEffect in SSR, so we try to detect environment and fall back to + // just useEffect instead to avoid the warning, since neither will run anyway. + + useIsomorphicLayoutEffectWithArgs(captureWrapperProps, [lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, actualChildProps, childPropsFromStoreUpdate, notifyNestedSubs]); // Our re-subscribe logic only runs when the store/subscription setup changes + + useIsomorphicLayoutEffectWithArgs(subscribeUpdates, [shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, childPropsFromStoreUpdate, notifyNestedSubs, forceComponentUpdateDispatch], [store, subscription, childPropsSelector]); // Now that all that's done, we can finally try to actually render the child component. + // We memoize the elements for the rendered child component as an optimization. + + var renderedWrappedComponent = Object(react["useMemo"])(function () { + return /*#__PURE__*/react_default.a.createElement(WrappedComponent, Object(esm_extends["a" /* default */])({}, actualChildProps, { + ref: reactReduxForwardedRef + })); + }, [reactReduxForwardedRef, WrappedComponent, actualChildProps]); // If React sees the exact same element reference as last time, it bails out of re-rendering + // that child, same as if it was wrapped in React.memo() or returned false from shouldComponentUpdate. + + var renderedChild = Object(react["useMemo"])(function () { + if (shouldHandleStateChanges) { + // If this component is subscribed to store updates, we need to pass its own + // subscription instance down to our descendants. That means rendering the same + // Context instance, and putting a different value into the context. + return /*#__PURE__*/react_default.a.createElement(ContextToUse.Provider, { + value: overriddenContextValue + }, renderedWrappedComponent); + } + + return renderedWrappedComponent; + }, [ContextToUse, renderedWrappedComponent, overriddenContextValue]); + return renderedChild; + } // If we're in "pure" mode, ensure our wrapper component only re-renders when incoming props have changed. + + + var Connect = pure ? react_default.a.memo(ConnectFunction) : ConnectFunction; + Connect.WrappedComponent = WrappedComponent; + Connect.displayName = ConnectFunction.displayName = displayName; + + if (forwardRef) { + var forwarded = react_default.a.forwardRef(function forwardConnectRef(props, ref) { + return /*#__PURE__*/react_default.a.createElement(Connect, Object(esm_extends["a" /* default */])({}, props, { + reactReduxForwardedRef: ref + })); + }); + forwarded.displayName = displayName; + forwarded.WrappedComponent = WrappedComponent; + return hoist_non_react_statics_cjs_default()(forwarded, WrappedComponent); + } + + return hoist_non_react_statics_cjs_default()(Connect, WrappedComponent); + }; +} +// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/shallowEqual.js +function is(x, y) { + if (x === y) { + return x !== 0 || y !== 0 || 1 / x === 1 / y; + } else { + return x !== x && y !== y; + } +} + +function shallowEqual(objA, objB) { + if (is(objA, objB)) return true; + + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return false; + + for (var i = 0; i < keysA.length; i++) { + if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { + return false; + } + } + + return true; +} +// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/bindActionCreators.js +function bindActionCreators(actionCreators, dispatch) { + var boundActionCreators = {}; + + var _loop = function _loop(key) { + var actionCreator = actionCreators[key]; + + if (typeof actionCreator === 'function') { + boundActionCreators[key] = function () { + return dispatch(actionCreator.apply(void 0, arguments)); + }; + } + }; + + for (var key in actionCreators) { + _loop(key); + } + + return boundActionCreators; +} +// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/isPlainObject.js +/** + * @param {any} obj The object to inspect. + * @returns {boolean} True if the argument appears to be a plain object. + */ +function isPlainObject(obj) { + if (typeof obj !== 'object' || obj === null) return false; + var proto = Object.getPrototypeOf(obj); + if (proto === null) return true; + var baseProto = proto; + + while (Object.getPrototypeOf(baseProto) !== null) { + baseProto = Object.getPrototypeOf(baseProto); + } + + return proto === baseProto; +} +// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/warning.js +/** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ +function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + + + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ + +} +// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/verifyPlainObject.js + + +function verifyPlainObject(value, displayName, methodName) { + if (!isPlainObject(value)) { + warning(methodName + "() in " + displayName + " must return a plain object. Instead received " + value + "."); + } +} +// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/wrapMapToProps.js + +function wrapMapToPropsConstant(getConstant) { + return function initConstantSelector(dispatch, options) { + var constant = getConstant(dispatch, options); + + function constantSelector() { + return constant; + } + + constantSelector.dependsOnOwnProps = false; + return constantSelector; + }; +} // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args +// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine +// whether mapToProps needs to be invoked when props have changed. +// +// A length of one signals that mapToProps does not depend on props from the parent component. +// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and +// therefore not reporting its length accurately.. + +function getDependsOnOwnProps(mapToProps) { + return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1; +} // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction, +// this function wraps mapToProps in a proxy function which does several things: +// +// * Detects whether the mapToProps function being called depends on props, which +// is used by selectorFactory to decide if it should reinvoke on props changes. +// +// * On first call, handles mapToProps if returns another function, and treats that +// new function as the true mapToProps for subsequent calls. +// +// * On first call, verifies the first result is a plain object, in order to warn +// the developer that their mapToProps function is not returning a valid result. +// + +function wrapMapToPropsFunc(mapToProps, methodName) { + return function initProxySelector(dispatch, _ref) { + var displayName = _ref.displayName; + + var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) { + return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch); + }; // allow detectFactoryAndVerify to get ownProps + + + proxy.dependsOnOwnProps = true; + + proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) { + proxy.mapToProps = mapToProps; + proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps); + var props = proxy(stateOrDispatch, ownProps); + + if (typeof props === 'function') { + proxy.mapToProps = props; + proxy.dependsOnOwnProps = getDependsOnOwnProps(props); + props = proxy(stateOrDispatch, ownProps); + } + + if (false) {} + return props; + }; + + return proxy; + }; +} +// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/mapDispatchToProps.js + + +function whenMapDispatchToPropsIsFunction(mapDispatchToProps) { + return typeof mapDispatchToProps === 'function' ? wrapMapToPropsFunc(mapDispatchToProps, 'mapDispatchToProps') : undefined; +} +function whenMapDispatchToPropsIsMissing(mapDispatchToProps) { + return !mapDispatchToProps ? wrapMapToPropsConstant(function (dispatch) { + return { + dispatch: dispatch + }; + }) : undefined; +} +function whenMapDispatchToPropsIsObject(mapDispatchToProps) { + return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? wrapMapToPropsConstant(function (dispatch) { + return bindActionCreators(mapDispatchToProps, dispatch); + }) : undefined; +} +/* harmony default export */ var connect_mapDispatchToProps = ([whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject]); +// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/mapStateToProps.js + +function whenMapStateToPropsIsFunction(mapStateToProps) { + return typeof mapStateToProps === 'function' ? wrapMapToPropsFunc(mapStateToProps, 'mapStateToProps') : undefined; +} +function whenMapStateToPropsIsMissing(mapStateToProps) { + return !mapStateToProps ? wrapMapToPropsConstant(function () { + return {}; + }) : undefined; +} +/* harmony default export */ var connect_mapStateToProps = ([whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing]); +// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/mergeProps.js + + +function defaultMergeProps(stateProps, dispatchProps, ownProps) { + return Object(esm_extends["a" /* default */])({}, ownProps, stateProps, dispatchProps); +} +function wrapMergePropsFunc(mergeProps) { + return function initMergePropsProxy(dispatch, _ref) { + var displayName = _ref.displayName, + pure = _ref.pure, + areMergedPropsEqual = _ref.areMergedPropsEqual; + var hasRunOnce = false; + var mergedProps; + return function mergePropsProxy(stateProps, dispatchProps, ownProps) { + var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps); + + if (hasRunOnce) { + if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps; + } else { + hasRunOnce = true; + mergedProps = nextMergedProps; + if (false) {} + } + + return mergedProps; + }; + }; +} +function whenMergePropsIsFunction(mergeProps) { + return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined; +} +function whenMergePropsIsOmitted(mergeProps) { + return !mergeProps ? function () { + return defaultMergeProps; + } : undefined; +} +/* harmony default export */ var connect_mergeProps = ([whenMergePropsIsFunction, whenMergePropsIsOmitted]); +// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/verifySubselectors.js + + +function verify(selector, methodName, displayName) { + if (!selector) { + throw new Error("Unexpected value for " + methodName + " in " + displayName + "."); + } else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') { + if (!Object.prototype.hasOwnProperty.call(selector, 'dependsOnOwnProps')) { + warning("The selector for " + methodName + " of " + displayName + " did not specify a value for dependsOnOwnProps."); + } + } +} + +function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) { + verify(mapStateToProps, 'mapStateToProps', displayName); + verify(mapDispatchToProps, 'mapDispatchToProps', displayName); + verify(mergeProps, 'mergeProps', displayName); +} +// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/selectorFactory.js + +var selectorFactory_excluded = ["initMapStateToProps", "initMapDispatchToProps", "initMergeProps"]; + +function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) { + return function impureFinalPropsSelector(state, ownProps) { + return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps); + }; +} +function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) { + var areStatesEqual = _ref.areStatesEqual, + areOwnPropsEqual = _ref.areOwnPropsEqual, + areStatePropsEqual = _ref.areStatePropsEqual; + var hasRunAtLeastOnce = false; + var state; + var ownProps; + var stateProps; + var dispatchProps; + var mergedProps; + + function handleFirstCall(firstState, firstOwnProps) { + state = firstState; + ownProps = firstOwnProps; + stateProps = mapStateToProps(state, ownProps); + dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + hasRunAtLeastOnce = true; + return mergedProps; + } + + function handleNewPropsAndNewState() { + stateProps = mapStateToProps(state, ownProps); + if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleNewProps() { + if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps); + if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleNewState() { + var nextStateProps = mapStateToProps(state, ownProps); + var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps); + stateProps = nextStateProps; + if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleSubsequentCalls(nextState, nextOwnProps) { + var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps); + var stateChanged = !areStatesEqual(nextState, state, nextOwnProps, ownProps); + state = nextState; + ownProps = nextOwnProps; + if (propsChanged && stateChanged) return handleNewPropsAndNewState(); + if (propsChanged) return handleNewProps(); + if (stateChanged) return handleNewState(); + return mergedProps; + } + + return function pureFinalPropsSelector(nextState, nextOwnProps) { + return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps); + }; +} // TODO: Add more comments +// If pure is true, the selector returned by selectorFactory will memoize its results, +// allowing connectAdvanced's shouldComponentUpdate to return false if final +// props have not changed. If false, the selector will always return a new +// object and shouldComponentUpdate will always return true. + +function finalPropsSelectorFactory(dispatch, _ref2) { + var initMapStateToProps = _ref2.initMapStateToProps, + initMapDispatchToProps = _ref2.initMapDispatchToProps, + initMergeProps = _ref2.initMergeProps, + options = Object(objectWithoutPropertiesLoose["a" /* default */])(_ref2, selectorFactory_excluded); + + var mapStateToProps = initMapStateToProps(dispatch, options); + var mapDispatchToProps = initMapDispatchToProps(dispatch, options); + var mergeProps = initMergeProps(dispatch, options); + + if (false) {} + + var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory; + return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options); +} +// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/connect.js + + +var connect_excluded = ["pure", "areStatesEqual", "areOwnPropsEqual", "areStatePropsEqual", "areMergedPropsEqual"]; + + + + + + +/* + connect is a facade over connectAdvanced. It turns its args into a compatible + selectorFactory, which has the signature: + + (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps + + connect passes its args to connectAdvanced as options, which will in turn pass them to + selectorFactory each time a Connect component instance is instantiated or hot reloaded. + + selectorFactory returns a final props selector from its mapStateToProps, + mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps, + mergePropsFactories, and pure args. + + The resulting final props selector is called by the Connect component instance whenever + it receives new props or store state. + */ + +function match(arg, factories, name) { + for (var i = factories.length - 1; i >= 0; i--) { + var result = factories[i](arg); + if (result) return result; + } + + return function (dispatch, options) { + throw new Error("Invalid value of type " + typeof arg + " for " + name + " argument when connecting component " + options.wrappedComponentName + "."); + }; +} + +function strictEqual(a, b) { + return a === b; +} // createConnect with default args builds the 'official' connect behavior. Calling it with +// different options opens up some testing and extensibility scenarios + + +function createConnect(_temp) { + var _ref = _temp === void 0 ? {} : _temp, + _ref$connectHOC = _ref.connectHOC, + connectHOC = _ref$connectHOC === void 0 ? connectAdvanced : _ref$connectHOC, + _ref$mapStateToPropsF = _ref.mapStateToPropsFactories, + mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? connect_mapStateToProps : _ref$mapStateToPropsF, + _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories, + mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? connect_mapDispatchToProps : _ref$mapDispatchToPro, + _ref$mergePropsFactor = _ref.mergePropsFactories, + mergePropsFactories = _ref$mergePropsFactor === void 0 ? connect_mergeProps : _ref$mergePropsFactor, + _ref$selectorFactory = _ref.selectorFactory, + selectorFactory = _ref$selectorFactory === void 0 ? finalPropsSelectorFactory : _ref$selectorFactory; + + return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) { + if (_ref2 === void 0) { + _ref2 = {}; + } + + var _ref3 = _ref2, + _ref3$pure = _ref3.pure, + pure = _ref3$pure === void 0 ? true : _ref3$pure, + _ref3$areStatesEqual = _ref3.areStatesEqual, + areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual, + _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual, + areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? shallowEqual : _ref3$areOwnPropsEqua, + _ref3$areStatePropsEq = _ref3.areStatePropsEqual, + areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? shallowEqual : _ref3$areStatePropsEq, + _ref3$areMergedPropsE = _ref3.areMergedPropsEqual, + areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? shallowEqual : _ref3$areMergedPropsE, + extraOptions = Object(objectWithoutPropertiesLoose["a" /* default */])(_ref3, connect_excluded); + + var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps'); + var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps'); + var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps'); + return connectHOC(selectorFactory, Object(esm_extends["a" /* default */])({ + // used in error messages + methodName: 'connect', + // used to compute Connect's displayName from the wrapped component's displayName. + getDisplayName: function getDisplayName(name) { + return "Connect(" + name + ")"; + }, + // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes + shouldHandleStateChanges: Boolean(mapStateToProps), + // passed through to selectorFactory + initMapStateToProps: initMapStateToProps, + initMapDispatchToProps: initMapDispatchToProps, + initMergeProps: initMergeProps, + pure: pure, + areStatesEqual: areStatesEqual, + areOwnPropsEqual: areOwnPropsEqual, + areStatePropsEqual: areStatePropsEqual, + areMergedPropsEqual: areMergedPropsEqual + }, extraOptions)); + }; +} +/* harmony default export */ var connect_connect = (/*#__PURE__*/createConnect()); +// CONCATENATED MODULE: ./node_modules/react-redux/es/hooks/useReduxContext.js + + +/** + * A hook to access the value of the `ReactReduxContext`. This is a low-level + * hook that you should usually not need to call directly. + * + * @returns {any} the value of the `ReactReduxContext` + * + * @example + * + * import React from 'react' + * import { useReduxContext } from 'react-redux' + * + * export const CounterComponent = ({ value }) => { + * const { store } = useReduxContext() + * return
{store.getState()}
+ * } + */ + +function useReduxContext_useReduxContext() { + var contextValue = Object(react["useContext"])(ReactReduxContext); + + if (false) {} + + return contextValue; +} +// CONCATENATED MODULE: ./node_modules/react-redux/es/hooks/useStore.js + + + +/** + * Hook factory, which creates a `useStore` hook bound to a given context. + * + * @param {React.Context} [context=ReactReduxContext] Context passed to your ``. + * @returns {Function} A `useStore` hook bound to the specified context. + */ + +function createStoreHook(context) { + if (context === void 0) { + context = ReactReduxContext; + } + + var useReduxContext = context === ReactReduxContext ? useReduxContext_useReduxContext : function () { + return Object(react["useContext"])(context); + }; + return function useStore() { + var _useReduxContext = useReduxContext(), + store = _useReduxContext.store; + + return store; + }; +} +/** + * A hook to access the redux store. + * + * @returns {any} the redux store + * + * @example + * + * import React from 'react' + * import { useStore } from 'react-redux' + * + * export const ExampleComponent = () => { + * const store = useStore() + * return
{store.getState()}
+ * } + */ + +var useStore_useStore = /*#__PURE__*/createStoreHook(); +// CONCATENATED MODULE: ./node_modules/react-redux/es/hooks/useDispatch.js + + +/** + * Hook factory, which creates a `useDispatch` hook bound to a given context. + * + * @param {React.Context} [context=ReactReduxContext] Context passed to your ``. + * @returns {Function} A `useDispatch` hook bound to the specified context. + */ + +function createDispatchHook(context) { + if (context === void 0) { + context = ReactReduxContext; + } + + var useStore = context === ReactReduxContext ? useStore_useStore : createStoreHook(context); + return function useDispatch() { + var store = useStore(); + return store.dispatch; + }; +} +/** + * A hook to access the redux `dispatch` function. + * + * @returns {any|function} redux store's `dispatch` function + * + * @example + * + * import React, { useCallback } from 'react' + * import { useDispatch } from 'react-redux' + * + * export const CounterComponent = ({ value }) => { + * const dispatch = useDispatch() + * const increaseCounter = useCallback(() => dispatch({ type: 'increase-counter' }), []) + * return ( + *
+ * {value} + * + *
+ * ) + * } + */ + +var useDispatch = /*#__PURE__*/createDispatchHook(); +// CONCATENATED MODULE: ./node_modules/react-redux/es/hooks/useSelector.js + + + + + + +var refEquality = function refEquality(a, b) { + return a === b; +}; + +function useSelectorWithStoreAndSubscription(selector, equalityFn, store, contextSub) { + var _useReducer = Object(react["useReducer"])(function (s) { + return s + 1; + }, 0), + forceRender = _useReducer[1]; + + var subscription = Object(react["useMemo"])(function () { + return createSubscription(store, contextSub); + }, [store, contextSub]); + var latestSubscriptionCallbackError = Object(react["useRef"])(); + var latestSelector = Object(react["useRef"])(); + var latestStoreState = Object(react["useRef"])(); + var latestSelectedState = Object(react["useRef"])(); + var storeState = store.getState(); + var selectedState; + + try { + if (selector !== latestSelector.current || storeState !== latestStoreState.current || latestSubscriptionCallbackError.current) { + var newSelectedState = selector(storeState); // ensure latest selected state is reused so that a custom equality function can result in identical references + + if (latestSelectedState.current === undefined || !equalityFn(newSelectedState, latestSelectedState.current)) { + selectedState = newSelectedState; + } else { + selectedState = latestSelectedState.current; + } + } else { + selectedState = latestSelectedState.current; + } + } catch (err) { + if (latestSubscriptionCallbackError.current) { + err.message += "\nThe error may be correlated with this previous error:\n" + latestSubscriptionCallbackError.current.stack + "\n\n"; + } + + throw err; + } + + useIsomorphicLayoutEffect(function () { + latestSelector.current = selector; + latestStoreState.current = storeState; + latestSelectedState.current = selectedState; + latestSubscriptionCallbackError.current = undefined; + }); + useIsomorphicLayoutEffect(function () { + function checkForUpdates() { + try { + var newStoreState = store.getState(); // Avoid calling selector multiple times if the store's state has not changed + + if (newStoreState === latestStoreState.current) { + return; + } + + var _newSelectedState = latestSelector.current(newStoreState); + + if (equalityFn(_newSelectedState, latestSelectedState.current)) { + return; + } + + latestSelectedState.current = _newSelectedState; + latestStoreState.current = newStoreState; + } catch (err) { + // we ignore all errors here, since when the component + // is re-rendered, the selectors are called again, and + // will throw again, if neither props nor store state + // changed + latestSubscriptionCallbackError.current = err; + } + + forceRender(); + } + + subscription.onStateChange = checkForUpdates; + subscription.trySubscribe(); + checkForUpdates(); + return function () { + return subscription.tryUnsubscribe(); + }; + }, [store, subscription]); + return selectedState; +} +/** + * Hook factory, which creates a `useSelector` hook bound to a given context. + * + * @param {React.Context} [context=ReactReduxContext] Context passed to your ``. + * @returns {Function} A `useSelector` hook bound to the specified context. + */ + + +function createSelectorHook(context) { + if (context === void 0) { + context = ReactReduxContext; + } + + var useReduxContext = context === ReactReduxContext ? useReduxContext_useReduxContext : function () { + return Object(react["useContext"])(context); + }; + return function useSelector(selector, equalityFn) { + if (equalityFn === void 0) { + equalityFn = refEquality; + } + + if (false) {} + + var _useReduxContext = useReduxContext(), + store = _useReduxContext.store, + contextSub = _useReduxContext.subscription; + + var selectedState = useSelectorWithStoreAndSubscription(selector, equalityFn, store, contextSub); + Object(react["useDebugValue"])(selectedState); + return selectedState; + }; +} +/** + * A hook to access the redux store's state. This hook takes a selector function + * as an argument. The selector is called with the store state. + * + * This hook takes an optional equality comparison function as the second parameter + * that allows you to customize the way the selected state is compared to determine + * whether the component needs to be re-rendered. + * + * @param {Function} selector the selector function + * @param {Function=} equalityFn the function that will be used to determine equality + * + * @returns {any} the selected state + * + * @example + * + * import React from 'react' + * import { useSelector } from 'react-redux' + * + * export const CounterComponent = () => { + * const counter = useSelector(state => state.counter) + * return
{counter}
+ * } + */ + +var useSelector_useSelector = /*#__PURE__*/createSelectorHook(); +// CONCATENATED MODULE: ./node_modules/react-redux/es/exports.js + + + + + + + + + +// EXTERNAL MODULE: ./node_modules/react-dom/index.js +var react_dom = __webpack_require__("i8i4"); + +// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/reactBatchedUpdates.js +/* eslint-disable import/no-unresolved */ + +// CONCATENATED MODULE: ./node_modules/react-redux/es/index.js + + + // Enable batched updates in our subscriptions for use +// with standard React renderers (ReactDOM, React Native) + +setBatch(react_dom["unstable_batchedUpdates"]); + + +/***/ }), + +/***/ "/MOW": +/*!***********************************************************************!*\ + !*** ./node_modules/@ant-design/icons/lib/icons/CloseCircleFilled.js ***! + \***********************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt"); +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9")); +var React = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI")); +var _CloseCircleFilled = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons-svg/lib/asn/CloseCircleFilled */ "UF9F")); +var _AntdIcon = _interopRequireDefault(__webpack_require__(/*! ../components/AntdIcon */ "KQxl")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +// GENERATE BY ./scripts/generate.ts +// DON NOT EDIT IT MANUALLY + +var CloseCircleFilled = function CloseCircleFilled(props, ref) { + return /*#__PURE__*/React.createElement(_AntdIcon.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, { + ref: ref, + icon: _CloseCircleFilled.default + })); +}; +var RefIcon = /*#__PURE__*/React.forwardRef(CloseCircleFilled); +if (false) {} +var _default = exports.default = RefIcon; + +/***/ }), + +/***/ "/Yfv": +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/modules/es.typed-array.int8-array.js ***! + \*******************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var createTypedArrayConstructor = __webpack_require__(/*! ../internals/typed-array-constructor */ "dOgj"); + +// `Int8Array` constructor +// https://tc39.github.io/ecma262/#sec-typedarray-objects +createTypedArrayConstructor('Int8', function (init) { + return function Int8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ "/b8u": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/internals/use-symbol-as-uid.js ***! + \*************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ "STAE"); + +module.exports = NATIVE_SYMBOL + // eslint-disable-next-line no-undef + && !Symbol.sham + // eslint-disable-next-line no-undef + && typeof Symbol.iterator == 'symbol'; + + +/***/ }), + +/***/ "/byt": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/internals/dom-iterables.js ***! + \*********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +// iterable DOM collections +// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods +module.exports = { + CSSRuleList: 0, + CSSStyleDeclaration: 0, + CSSValueList: 0, + ClientRectList: 0, + DOMRectList: 0, + DOMStringList: 0, + DOMTokenList: 1, + DataTransferItemList: 0, + FileList: 0, + HTMLAllCollection: 0, + HTMLCollection: 0, + HTMLFormElement: 0, + HTMLSelectElement: 0, + MediaList: 0, + MimeTypeArray: 0, + NamedNodeMap: 0, + NodeList: 1, + PaintRequestList: 0, + Plugin: 0, + PluginArray: 0, + SVGLengthList: 0, + SVGNumberList: 0, + SVGPathSegList: 0, + SVGPointList: 0, + SVGStringList: 0, + SVGTransformList: 0, + SourceBufferList: 0, + StyleSheetList: 0, + TextTrackCueList: 0, + TextTrackList: 0, + TouchList: 0 +}; + + +/***/ }), + +/***/ "/ccO": +/*!************************************************************************************!*\ + !*** ./node_modules/@umijs/preset-built-in/node_modules/use-subscription/index.js ***! + \************************************************************************************/ +/*! no static exports found */ +/*! exports used: useSubscription */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +if (true) { + module.exports = __webpack_require__(/*! ./cjs/use-subscription.production.min.js */ "nDJS"); +} else {} + + +/***/ }), + +/***/ "/kpp": +/*!******************************************!*\ + !*** ./node_modules/antd/es/grid/col.js ***! + \******************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "lSNA"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "pVnL"); +/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5"); +/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "TSYQ"); +/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _RowContext__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./RowContext */ "o/2+"); +/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../config-provider */ "H84U"); + + + + +var __rest = undefined && undefined.__rest || function (s, e) { + var t = {}; + + for (var p in s) { + if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; + } + + if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; + } + return t; +}; + + + + + + +function parseFlex(flex) { + if (typeof flex === 'number') { + return "".concat(flex, " ").concat(flex, " auto"); + } + + if (/^\d+(\.\d+)?(px|em|rem|%)$/.test(flex)) { + return "0 0 ".concat(flex); + } + + return flex; +} + +var Col = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function (props, ref) { + var renderCol = function renderCol(_ref) { + var _classNames; + + var getPrefixCls = _ref.getPrefixCls, + direction = _ref.direction; + + var customizePrefixCls = props.prefixCls, + span = props.span, + order = props.order, + offset = props.offset, + push = props.push, + pull = props.pull, + className = props.className, + children = props.children, + flex = props.flex, + style = props.style, + others = __rest(props, ["prefixCls", "span", "order", "offset", "push", "pull", "className", "children", "flex", "style"]); + + var prefixCls = getPrefixCls('col', customizePrefixCls); + var sizeClassObj = {}; + ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].forEach(function (size) { + var _extends2; + + var sizeProps = {}; + var propSize = props[size]; + + if (typeof propSize === 'number') { + sizeProps.span = propSize; + } else if (_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_2___default()(propSize) === 'object') { + sizeProps = propSize || {}; + } + + delete others[size]; + sizeClassObj = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, sizeClassObj), (_extends2 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_extends2, "".concat(prefixCls, "-").concat(size, "-").concat(sizeProps.span), sizeProps.span !== undefined), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_extends2, "".concat(prefixCls, "-").concat(size, "-order-").concat(sizeProps.order), sizeProps.order || sizeProps.order === 0), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_extends2, "".concat(prefixCls, "-").concat(size, "-offset-").concat(sizeProps.offset), sizeProps.offset || sizeProps.offset === 0), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_extends2, "".concat(prefixCls, "-").concat(size, "-push-").concat(sizeProps.push), sizeProps.push || sizeProps.push === 0), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_extends2, "".concat(prefixCls, "-").concat(size, "-pull-").concat(sizeProps.pull), sizeProps.pull || sizeProps.pull === 0), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_extends2, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _extends2)); + }); + var classes = classnames__WEBPACK_IMPORTED_MODULE_4___default()(prefixCls, (_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(prefixCls, "-").concat(span), span !== undefined), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(prefixCls, "-order-").concat(order), order), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(prefixCls, "-offset-").concat(offset), offset), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(prefixCls, "-push-").concat(push), push), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(prefixCls, "-pull-").concat(pull), pull), _classNames), className, sizeClassObj); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_RowContext__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].Consumer, null, function (_ref2) { + var gutter = _ref2.gutter; + + var mergedStyle = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, style); + + if (gutter) { + mergedStyle = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, gutter[0] > 0 ? { + paddingLeft: gutter[0] / 2, + paddingRight: gutter[0] / 2 + } : {}), gutter[1] > 0 ? { + paddingTop: gutter[1] / 2, + paddingBottom: gutter[1] / 2 + } : {}), mergedStyle); + } + + if (flex) { + mergedStyle.flex = parseFlex(flex); + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, others, { + style: mergedStyle, + className: classes, + ref: ref + }), children); + }); + }; + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_6__[/* ConfigConsumer */ "a"], null, renderCol); +}); +Col.displayName = 'Col'; +/* harmony default export */ __webpack_exports__["a"] = (Col); + +/***/ }), + +/***/ "/qSt": +/*!*******************************************************************!*\ + !*** ./node_modules/@ant-design/icons/lib/components/IconBase.js ***! + \*******************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "QILm")); +var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9")); +var _utils = __webpack_require__(/*! ../utils */ "vmBS"); +var _excluded = ["icon", "className", "onClick", "style", "primaryColor", "secondaryColor"]; +var twoToneColorPalette = { + primaryColor: '#333', + secondaryColor: '#E6E6E6', + calculated: false +}; +function setTwoToneColors(_ref) { + var primaryColor = _ref.primaryColor, + secondaryColor = _ref.secondaryColor; + twoToneColorPalette.primaryColor = primaryColor; + twoToneColorPalette.secondaryColor = secondaryColor || (0, _utils.getSecondaryColor)(primaryColor); + twoToneColorPalette.calculated = !!secondaryColor; +} +function getTwoToneColors() { + return (0, _objectSpread2.default)({}, twoToneColorPalette); +} +var IconBase = function IconBase(props) { + var icon = props.icon, + className = props.className, + onClick = props.onClick, + style = props.style, + primaryColor = props.primaryColor, + secondaryColor = props.secondaryColor, + restProps = (0, _objectWithoutProperties2.default)(props, _excluded); + var colors = twoToneColorPalette; + if (primaryColor) { + colors = { + primaryColor: primaryColor, + secondaryColor: secondaryColor || (0, _utils.getSecondaryColor)(primaryColor) + }; + } + (0, _utils.useInsertStyles)(); + (0, _utils.warning)((0, _utils.isIconDefinition)(icon), "icon should be icon definiton, but got ".concat(icon)); + if (!(0, _utils.isIconDefinition)(icon)) { + return null; + } + var target = icon; + if (target && typeof target.icon === 'function') { + target = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, target), {}, { + icon: target.icon(colors.primaryColor, colors.secondaryColor) + }); + } + return (0, _utils.generate)(target.icon, "svg-".concat(target.name), (0, _objectSpread2.default)({ + className: className, + onClick: onClick, + style: style, + 'data-icon': target.name, + width: '1em', + height: '1em', + fill: 'currentColor', + 'aria-hidden': 'true' + }, restProps)); +}; +IconBase.displayName = 'IconReact'; +IconBase.getTwoToneColors = getTwoToneColors; +IconBase.setTwoToneColors = setTwoToneColors; +var _default = exports.default = IconBase; + +/***/ }), + +/***/ "/qmn": +/*!**********************************************************************!*\ + !*** ./node_modules/core-js/internals/native-promise-constructor.js ***! + \**********************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(/*! ../internals/global */ "2oRo"); + +module.exports = global.Promise; + + +/***/ }), + +/***/ "/xke": +/*!**********************************************************!*\ + !*** ./node_modules/antd/es/notification/style/index.js ***! + \**********************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "cIOH"); +/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_index_less__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "rSSe"); +/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__); + + + +/***/ }), + +/***/ 0: +/*!******************************************!*\ + !*** multi ./src/.umi-production/umi.ts ***! + \******************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(/*! D:\projects\competitions\forgeplus-react\src\.umi-production\umi.ts */"tB8F"); + + +/***/ }), + +/***/ "02UQ": +/*!*********************************************************!*\ + !*** ./src/models/classrooms/graduation.ts + 1 modules ***! + \*********************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/pages/metting/home/index.jsx */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// 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/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +var asyncToGenerator = __webpack_require__("9og8"); + +// EXTERNAL MODULE: ./src/utils/fetch.ts +var fetch = __webpack_require__("ErOA"); + +// CONCATENATED MODULE: ./src/service/graduation.ts + + +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + +function graduation_getTasksDetail(_x) { + return _getTasksDetail.apply(this, arguments); +} +function _getTasksDetail() { + _getTasksDetail = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) { + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", Object(fetch["a" /* default */])("/api/graduation_tasks/".concat(params.categoryId, ".json"), { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context.stop(); + } + }, _callee); + })); + return _getTasksDetail.apply(this, arguments); +} +function graduation_getTasksListDetail(_x2) { + return _getTasksListDetail.apply(this, arguments); +} +function _getTasksListDetail() { + _getTasksListDetail = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", Object(fetch["a" /* default */])("/api/graduation_tasks/".concat(params.categoryId, "/tasks_list.json"), { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return _getTasksListDetail.apply(this, arguments); +} +function graduation_getTopisDetail(_x3) { + return _getTopisDetail.apply(this, arguments); +} +function _getTopisDetail() { + _getTopisDetail = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) { + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + return _context3.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/graduation_topics/").concat(params.categoryId, "/show_detail.json"), { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context3.stop(); + } + }, _callee3); + })); + return _getTopisDetail.apply(this, arguments); +} +function graduation_getTopisDetailList(_x4) { + return _getTopisDetailList.apply(this, arguments); +} +function _getTopisDetailList() { + _getTopisDetailList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) { + return _regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + return _context4.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/graduation_topics/").concat(params.categoryId, ".json"), { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context4.stop(); + } + }, _callee4); + })); + return _getTopisDetailList.apply(this, arguments); +} +function graduation_refuseTopic(_x5) { + return _refuseTopic.apply(this, arguments); +} +function _refuseTopic() { + _refuseTopic = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) { + return _regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + return _context5.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/graduation_topics/").concat(params.categoryId, "/refuse_student_topic.json"), { + method: 'post', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context5.stop(); + } + }, _callee5); + })); + return _refuseTopic.apply(this, arguments); +} +function graduation_agreeTopic(_x6) { + return _agreeTopic.apply(this, arguments); +} +function _agreeTopic() { + _agreeTopic = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) { + return _regeneratorRuntime().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + return _context6.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/graduation_topics/").concat(params.categoryId, "/accept_student_topic.json"), { + method: 'post', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context6.stop(); + } + }, _callee6); + })); + return _agreeTopic.apply(this, arguments); +} +function graduation_getReplyList(_x7) { + return _getReplyList.apply(this, arguments); +} +function _getReplyList() { + _getReplyList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) { + return _regeneratorRuntime().wrap(function _callee7$(_context7) { + while (1) switch (_context7.prev = _context7.next) { + case 0: + return _context7.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.categoryId, "/show_comment.json"), { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context7.stop(); + } + }, _callee7); + })); + return _getReplyList.apply(this, arguments); +} +function graduation_createReply(_x8) { + return _createReply.apply(this, arguments); +} +function _createReply() { + _createReply = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) { + return _regeneratorRuntime().wrap(function _callee8$(_context8) { + while (1) switch (_context8.prev = _context8.next) { + case 0: + return _context8.abrupt("return", Object(fetch["a" /* default */])("/api/users/reply_message.json", { + method: 'post', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context8.stop(); + } + }, _callee8); + })); + return _createReply.apply(this, arguments); +} +function graduation_replyLike(_x9) { + return _replyLike.apply(this, arguments); +} +function _replyLike() { + _replyLike = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params) { + return _regeneratorRuntime().wrap(function _callee9$(_context9) { + while (1) switch (_context9.prev = _context9.next) { + case 0: + return _context9.abrupt("return", Object(fetch["a" /* default */])("/api/praise_tread/like.json", { + method: 'post', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context9.stop(); + } + }, _callee9); + })); + return _replyLike.apply(this, arguments); +} +function graduation_replyUnLike(_x10) { + return _replyUnLike.apply(this, arguments); +} +function _replyUnLike() { + _replyUnLike = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) { + return _regeneratorRuntime().wrap(function _callee10$(_context10) { + while (1) switch (_context10.prev = _context10.next) { + case 0: + return _context10.abrupt("return", Object(fetch["a" /* default */])("/api/praise_tread/unlike.json", { + method: 'delete', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context10.stop(); + } + }, _callee10); + })); + return _replyUnLike.apply(this, arguments); +} +function graduation_deleteReply(_x11) { + return _deleteReply.apply(this, arguments); +} +function _deleteReply() { + _deleteReply = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(params) { + return _regeneratorRuntime().wrap(function _callee11$(_context11) { + while (1) switch (_context11.prev = _context11.next) { + case 0: + return _context11.abrupt("return", Object(fetch["a" /* default */])("/api/commons/delete.json", { + method: 'delete', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context11.stop(); + } + }, _callee11); + })); + return _deleteReply.apply(this, arguments); +} +function graduation_addTopicDefaultData(_x12) { + return _addTopicDefaultData.apply(this, arguments); +} +function _addTopicDefaultData() { + _addTopicDefaultData = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(params) { + return _regeneratorRuntime().wrap(function _callee12$(_context12) { + while (1) switch (_context12.prev = _context12.next) { + case 0: + return _context12.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/graduation_topics/new.json"), { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context12.stop(); + } + }, _callee12); + })); + return _addTopicDefaultData.apply(this, arguments); +} +function graduation_editTopicDefaultData(_x13) { + return _editTopicDefaultData.apply(this, arguments); +} +function _editTopicDefaultData() { + _editTopicDefaultData = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(params) { + return _regeneratorRuntime().wrap(function _callee13$(_context13) { + while (1) switch (_context13.prev = _context13.next) { + case 0: + return _context13.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/graduation_topics/").concat(params.categoryId, "/edit.json"), { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context13.stop(); + } + }, _callee13); + })); + return _editTopicDefaultData.apply(this, arguments); +} +function graduation_addTopic(_x14) { + return _addTopic.apply(this, arguments); +} +function _addTopic() { + _addTopic = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(params) { + return _regeneratorRuntime().wrap(function _callee14$(_context14) { + while (1) switch (_context14.prev = _context14.next) { + case 0: + return _context14.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/graduation_topics"), { + method: 'post', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context14.stop(); + } + }, _callee14); + })); + return _addTopic.apply(this, arguments); +} +function graduation_editTopic(_x15) { + return _editTopic.apply(this, arguments); +} +function _editTopic() { + _editTopic = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(params) { + return _regeneratorRuntime().wrap(function _callee15$(_context15) { + while (1) switch (_context15.prev = _context15.next) { + case 0: + return _context15.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/graduation_topics/").concat(params.categoryId), { + method: 'put', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context15.stop(); + } + }, _callee15); + })); + return _editTopic.apply(this, arguments); +} +function graduation_addTasks(_x16) { + return _addTasks.apply(this, arguments); +} +function _addTasks() { + _addTasks = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(params) { + return _regeneratorRuntime().wrap(function _callee16$(_context16) { + while (1) switch (_context16.prev = _context16.next) { + case 0: + return _context16.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/graduation_tasks"), { + method: 'post', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context16.stop(); + } + }, _callee16); + })); + return _addTasks.apply(this, arguments); +} +function graduation_editTasks(_x17) { + return _editTasks.apply(this, arguments); +} +function _editTasks() { + _editTasks = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(params) { + return _regeneratorRuntime().wrap(function _callee17$(_context17) { + while (1) switch (_context17.prev = _context17.next) { + case 0: + return _context17.abrupt("return", Object(fetch["a" /* default */])("/api/graduation_tasks/".concat(params.categoryId, ".json"), { + method: 'put', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context17.stop(); + } + }, _callee17); + })); + return _editTasks.apply(this, arguments); +} +function graduation_editTasksDefaultData(_x18) { + return _editTasksDefaultData.apply(this, arguments); +} +function _editTasksDefaultData() { + _editTasksDefaultData = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(params) { + return _regeneratorRuntime().wrap(function _callee18$(_context18) { + while (1) switch (_context18.prev = _context18.next) { + case 0: + return _context18.abrupt("return", Object(fetch["a" /* default */])("/api/graduation_tasks/".concat(params.categoryId, "/edit.json"), { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context18.stop(); + } + }, _callee18); + })); + return _editTasksDefaultData.apply(this, arguments); +} +// CONCATENATED MODULE: ./src/models/classrooms/graduation.ts + +function graduation_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ graduation_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + +var GraduationModel = { + namespace: 'graduation', + state: { + name: '毕业设计', + loading: true, + // 题库 + actionTabs: {}, + detailList: {}, + detailTaskList: {}, + replyList: {}, + detail: {}, + addTopicData: {}, + editTopicData: {}, + editTasksData: {} + }, + effects: { + // 选题列表 + getTopisDetailList: function getTopisDetailList(_ref, _ref2) { + var payload = _ref.payload, + callback = _ref.callback; + var call = _ref2.call, + put = _ref2.put; + return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee() { + var response; + return graduation_regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return call(graduation_getTopisDetailList, payload); + case 2: + response = _context.sent; + _context.next = 5; + return put({ + type: 'save', + payload: { + detailList: Object(objectSpread2["a" /* default */])({}, response) + } + }); + case 5: + return _context.abrupt("return", response); + case 6: + case "end": + return _context.stop(); + } + }, _callee); + })(); + }, + getTasksListDetail: function getTasksListDetail(_ref3, _ref4) { + var payload = _ref3.payload, + callback = _ref3.callback; + var call = _ref4.call, + put = _ref4.put; + return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee2() { + var response; + return graduation_regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return call(graduation_getTasksListDetail, payload); + case 2: + response = _context2.sent; + _context2.next = 5; + return put({ + type: 'save', + payload: { + detailTaskList: Object(objectSpread2["a" /* default */])({}, response) + } + }); + case 5: + return _context2.abrupt("return", response); + case 6: + case "end": + return _context2.stop(); + } + }, _callee2); + })(); + }, + // 选题详情 + getTopisDetail: function getTopisDetail(_ref5, _ref6) { + var payload = _ref5.payload, + callback = _ref5.callback; + var call = _ref6.call, + put = _ref6.put; + return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee3() { + var response; + return graduation_regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + _context3.next = 2; + return call(graduation_getTopisDetail, payload); + case 2: + response = _context3.sent; + _context3.next = 5; + return put({ + type: 'save', + payload: { + detail: Object(objectSpread2["a" /* default */])({}, response) + } + }); + case 5: + return _context3.abrupt("return", response); + case 6: + case "end": + return _context3.stop(); + } + }, _callee3); + })(); + }, + // 任务详情 + getTasksDetail: function getTasksDetail(_ref7, _ref8) { + var payload = _ref7.payload, + callback = _ref7.callback; + var call = _ref8.call, + put = _ref8.put; + return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee4() { + var response; + return graduation_regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + _context4.next = 2; + return call(graduation_getTasksDetail, payload); + case 2: + response = _context4.sent; + _context4.next = 5; + return put({ + type: 'save', + payload: { + tasksDetail: Object(objectSpread2["a" /* default */])({}, response) + } + }); + case 5: + return _context4.abrupt("return", response); + case 6: + case "end": + return _context4.stop(); + } + }, _callee4); + })(); + }, + // 拒绝 + refuseTopic: function refuseTopic(_ref9, _ref10) { + var payload = _ref9.payload, + callback = _ref9.callback; + var call = _ref10.call, + put = _ref10.put; + return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee5() { + var response; + return graduation_regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + _context5.next = 2; + return call(graduation_refuseTopic, payload); + case 2: + response = _context5.sent; + return _context5.abrupt("return", response); + case 4: + case "end": + return _context5.stop(); + } + }, _callee5); + })(); + }, + agreeTopic: function agreeTopic(_ref11, _ref12) { + var payload = _ref11.payload, + callback = _ref11.callback; + var call = _ref12.call, + put = _ref12.put; + return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee6() { + var response; + return graduation_regeneratorRuntime().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + _context6.next = 2; + return call(graduation_agreeTopic, payload); + case 2: + response = _context6.sent; + return _context6.abrupt("return", response); + case 4: + case "end": + return _context6.stop(); + } + }, _callee6); + })(); + }, + // 讨论回复列表 + getReplyList: function getReplyList(_ref13, _ref14) { + var payload = _ref13.payload, + callback = _ref13.callback; + var call = _ref14.call, + put = _ref14.put; + return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee7() { + var response; + return graduation_regeneratorRuntime().wrap(function _callee7$(_context7) { + while (1) switch (_context7.prev = _context7.next) { + case 0: + _context7.next = 2; + return call(graduation_getReplyList, payload); + case 2: + response = _context7.sent; + _context7.next = 5; + return put({ + type: 'save', + payload: { + replyList: Object(objectSpread2["a" /* default */])({}, response) + } + }); + case 5: + case "end": + return _context7.stop(); + } + }, _callee7); + })(); + }, + // 讨论创建回复 + createReply: function createReply(_ref15, _ref16) { + var payload = _ref15.payload, + callback = _ref15.callback; + var call = _ref16.call, + put = _ref16.put; + return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee8() { + return graduation_regeneratorRuntime().wrap(function _callee8$(_context8) { + while (1) switch (_context8.prev = _context8.next) { + case 0: + _context8.next = 2; + return call(graduation_createReply, payload); + case 2: + return _context8.abrupt("return", _context8.sent); + case 3: + case "end": + return _context8.stop(); + } + }, _callee8); + })(); + }, + // 讨论回复点赞 + replyLike: function replyLike(_ref17, _ref18) { + var payload = _ref17.payload, + callback = _ref17.callback; + var call = _ref18.call, + put = _ref18.put; + return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee9() { + return graduation_regeneratorRuntime().wrap(function _callee9$(_context9) { + while (1) switch (_context9.prev = _context9.next) { + case 0: + _context9.next = 2; + return call(graduation_replyLike, payload); + case 2: + return _context9.abrupt("return", _context9.sent); + case 3: + case "end": + return _context9.stop(); + } + }, _callee9); + })(); + }, + // 讨论回复取消点赞 + replyUnLike: function replyUnLike(_ref19, _ref20) { + var payload = _ref19.payload, + callback = _ref19.callback; + var call = _ref20.call, + put = _ref20.put; + return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee10() { + return graduation_regeneratorRuntime().wrap(function _callee10$(_context10) { + while (1) switch (_context10.prev = _context10.next) { + case 0: + _context10.next = 2; + return call(graduation_replyUnLike, payload); + case 2: + return _context10.abrupt("return", _context10.sent); + case 3: + case "end": + return _context10.stop(); + } + }, _callee10); + })(); + }, + // 讨论回复删除 + deleteReply: function deleteReply(_ref21, _ref22) { + var payload = _ref21.payload, + callback = _ref21.callback; + var call = _ref22.call, + put = _ref22.put; + return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee11() { + return graduation_regeneratorRuntime().wrap(function _callee11$(_context11) { + while (1) switch (_context11.prev = _context11.next) { + case 0: + _context11.next = 2; + return call(graduation_deleteReply, payload); + case 2: + return _context11.abrupt("return", _context11.sent); + case 3: + case "end": + return _context11.stop(); + } + }, _callee11); + })(); + }, + // 新建默认数据 + addTopicDefaultData: function addTopicDefaultData(_ref23, _ref24) { + var payload = _ref23.payload, + callback = _ref23.callback; + var call = _ref24.call, + put = _ref24.put; + return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee12() { + var response; + return graduation_regeneratorRuntime().wrap(function _callee12$(_context12) { + while (1) switch (_context12.prev = _context12.next) { + case 0: + _context12.next = 2; + return call(graduation_addTopicDefaultData, payload); + case 2: + response = _context12.sent; + _context12.next = 5; + return put({ + type: 'save', + payload: { + addTopicData: Object(objectSpread2["a" /* default */])({}, response) + } + }); + case 5: + case "end": + return _context12.stop(); + } + }, _callee12); + })(); + }, + // 编辑默认数据 + editTopicDefaultData: function editTopicDefaultData(_ref25, _ref26) { + var payload = _ref25.payload, + callback = _ref25.callback; + var call = _ref26.call, + put = _ref26.put; + return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee13() { + var response; + return graduation_regeneratorRuntime().wrap(function _callee13$(_context13) { + while (1) switch (_context13.prev = _context13.next) { + case 0: + _context13.next = 2; + return call(graduation_editTopicDefaultData, payload); + case 2: + response = _context13.sent; + _context13.next = 5; + return put({ + type: 'save', + payload: { + editTopicData: Object(objectSpread2["a" /* default */])({}, response) + } + }); + case 5: + return _context13.abrupt("return", response); + case 6: + case "end": + return _context13.stop(); + } + }, _callee13); + })(); + }, + editTasksDefaultData: function editTasksDefaultData(_ref27, _ref28) { + var payload = _ref27.payload, + callback = _ref27.callback; + var call = _ref28.call, + put = _ref28.put; + return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee14() { + var response; + return graduation_regeneratorRuntime().wrap(function _callee14$(_context14) { + while (1) switch (_context14.prev = _context14.next) { + case 0: + _context14.next = 2; + return call(graduation_editTasksDefaultData, payload); + case 2: + response = _context14.sent; + _context14.next = 5; + return put({ + type: 'save', + payload: { + editTasksData: Object(objectSpread2["a" /* default */])({}, response) + } + }); + case 5: + return _context14.abrupt("return", response); + case 6: + case "end": + return _context14.stop(); + } + }, _callee14); + })(); + }, + // 新增毕设选题 + addTopic: function addTopic(_ref29, _ref30) { + var payload = _ref29.payload, + callback = _ref29.callback; + var call = _ref30.call, + put = _ref30.put; + return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee15() { + var response; + return graduation_regeneratorRuntime().wrap(function _callee15$(_context15) { + while (1) switch (_context15.prev = _context15.next) { + case 0: + _context15.next = 2; + return call(graduation_addTopic, payload); + case 2: + response = _context15.sent; + return _context15.abrupt("return", response); + case 4: + case "end": + return _context15.stop(); + } + }, _callee15); + })(); + }, + // 编辑毕设选题 + editTopic: function editTopic(_ref31, _ref32) { + var payload = _ref31.payload, + callback = _ref31.callback; + var call = _ref32.call, + put = _ref32.put; + return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee16() { + var response; + return graduation_regeneratorRuntime().wrap(function _callee16$(_context16) { + while (1) switch (_context16.prev = _context16.next) { + case 0: + _context16.next = 2; + return call(graduation_editTopic, payload); + case 2: + response = _context16.sent; + return _context16.abrupt("return", response); + case 4: + case "end": + return _context16.stop(); + } + }, _callee16); + })(); + }, + // 新增毕设任务 + addTasks: function addTasks(_ref33, _ref34) { + var payload = _ref33.payload, + callback = _ref33.callback; + var call = _ref34.call, + put = _ref34.put; + return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee17() { + var response; + return graduation_regeneratorRuntime().wrap(function _callee17$(_context17) { + while (1) switch (_context17.prev = _context17.next) { + case 0: + _context17.next = 2; + return call(graduation_addTasks, payload); + case 2: + response = _context17.sent; + return _context17.abrupt("return", response); + case 4: + case "end": + return _context17.stop(); + } + }, _callee17); + })(); + }, + // 编辑毕设任务 + editTasks: function editTasks(_ref35, _ref36) { + var payload = _ref35.payload, + callback = _ref35.callback; + var call = _ref36.call, + put = _ref36.put; + return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee18() { + var response; + return graduation_regeneratorRuntime().wrap(function _callee18$(_context18) { + while (1) switch (_context18.prev = _context18.next) { + case 0: + _context18.next = 2; + return call(graduation_editTasks, payload); + case 2: + response = _context18.sent; + return _context18.abrupt("return", response); + case 4: + case "end": + return _context18.stop(); + } + }, _callee18); + })(); + }, + // 设置操做action + setActionTabs: function setActionTabs(_ref37, _ref38) { + var payload = _ref37.payload; + var call = _ref38.call, + put = _ref38.put; + return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee19() { + return graduation_regeneratorRuntime().wrap(function _callee19$(_context19) { + while (1) switch (_context19.prev = _context19.next) { + case 0: + _context19.next = 2; + return put({ + type: 'save', + payload: { + actionTabs: Object(objectSpread2["a" /* default */])({}, payload) + } + }); + case 2: + case "end": + return _context19.stop(); + } + }, _callee19); + })(); + } + }, + reducers: { + save: function save(state, action) { + return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload); + } + }, + subscriptions: { + setup: function setup(_ref39) { + var dispatch = _ref39.dispatch, + history = _ref39.history; + } + } +}; +/* harmony default export */ var graduation = __webpack_exports__["a"] = (GraduationModel); + +/***/ }), + +/***/ "03hy": +/*!******************************************************************************!*\ + !*** ./node_modules/@ant-design/icons/lib/components/twoTonePrimaryColor.js ***! + \******************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getTwoToneColor = getTwoToneColor; +exports.setTwoToneColor = setTwoToneColor; +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "J4zp")); +var _IconBase = _interopRequireDefault(__webpack_require__(/*! ./IconBase */ "/qSt")); +var _utils = __webpack_require__(/*! ../utils */ "vmBS"); +function setTwoToneColor(twoToneColor) { + var _normalizeTwoToneColo = (0, _utils.normalizeTwoToneColors)(twoToneColor), + _normalizeTwoToneColo2 = (0, _slicedToArray2.default)(_normalizeTwoToneColo, 2), + primaryColor = _normalizeTwoToneColo2[0], + secondaryColor = _normalizeTwoToneColo2[1]; + return _IconBase.default.setTwoToneColors({ + primaryColor: primaryColor, + secondaryColor: secondaryColor + }); +} +function getTwoToneColor() { + var colors = _IconBase.default.getTwoToneColors(); + if (!colors.calculated) { + return colors.primaryColor; + } + return [colors.primaryColor, colors.secondaryColor]; +} + +/***/ }), + +/***/ "07d7": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/es.object.to-string.js ***! + \*************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ "AO7/"); +var redefine = __webpack_require__(/*! ../internals/redefine */ "busE"); +var toString = __webpack_require__(/*! ../internals/object-to-string */ "sEFX"); + +// `Object.prototype.toString` method +// https://tc39.github.io/ecma262/#sec-object.prototype.tostring +if (!TO_STRING_TAG_SUPPORT) { + redefine(Object.prototype, 'toString', toString, { unsafe: true }); +} + + +/***/ }), + +/***/ "0Ake": +/*!***************************************************!*\ + !*** ./node_modules/set-function-length/index.js ***! + \***************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "AM7I"); +var define = __webpack_require__(/*! define-data-property */ "eZIG"); +var hasDescriptors = __webpack_require__(/*! has-property-descriptors */ "ZLCw")(); +var gOPD = __webpack_require__(/*! gopd */ "Kqna"); + +var $TypeError = __webpack_require__(/*! es-errors/type */ "DSU0"); +var $floor = GetIntrinsic('%Math.floor%'); + +/** @type {import('.')} */ +module.exports = function setFunctionLength(fn, length) { + if (typeof fn !== 'function') { + throw new $TypeError('`fn` is not a function'); + } + if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) { + throw new $TypeError('`length` must be a positive 32-bit integer'); + } + + var loose = arguments.length > 2 && !!arguments[2]; + + var functionLengthIsConfigurable = true; + var functionLengthIsWritable = true; + if ('length' in fn && gOPD) { + var desc = gOPD(fn, 'length'); + if (desc && !desc.configurable) { + functionLengthIsConfigurable = false; + } + if (desc && !desc.writable) { + functionLengthIsWritable = false; + } + } + + if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { + if (hasDescriptors) { + define(/** @type {Parameters[0]} */ (fn), 'length', length, true, true); + } else { + define(/** @type {Parameters[0]} */ (fn), 'length', length); + } + } + return fn; +}; + + +/***/ }), + +/***/ "0BK2": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/hidden-keys.js ***! + \*******************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +module.exports = {}; + + +/***/ }), + +/***/ "0BeC": +/*!*********************************************************!*\ + !*** ./src/models/classrooms/attachment.ts + 1 modules ***! + \*********************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/pages/metting/home/index.jsx */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// 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/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +var asyncToGenerator = __webpack_require__("9og8"); + +// EXTERNAL MODULE: ./src/utils/fetch.ts +var fetch = __webpack_require__("ErOA"); + +// CONCATENATED MODULE: ./src/service/attachment.ts + + +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + +// 公告上移 +function attachment_allAttachment(_x) { + return _allAttachment.apply(this, arguments); +} +// 公告下移 +function _allAttachment() { + _allAttachment = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) { + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", Object(fetch["a" /* default */])("/api/files/public_with_course_and_project", { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context.stop(); + } + }, _callee); + })); + return _allAttachment.apply(this, arguments); +} +function attachment_mineAttachment(_x2) { + return _mineAttachment.apply(this, arguments); +} +// 导入资源 +function _mineAttachment() { + _mineAttachment = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", Object(fetch["a" /* default */])("/api/files/mine_with_course_and_project.json", { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return _mineAttachment.apply(this, arguments); +} +function attachment_fileImport(_x3) { + return _fileImport.apply(this, arguments); +} +function _fileImport() { + _fileImport = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) { + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + return _context3.abrupt("return", Object(fetch["a" /* default */])("/api/files/import.json", { + method: 'post', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context3.stop(); + } + }, _callee3); + })); + return _fileImport.apply(this, arguments); +} +function attachment_getDetail(_x4) { + return _getDetail.apply(this, arguments); +} +function _getDetail() { + _getDetail = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) { + return _regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + return _context4.abrupt("return", Object(fetch["a" /* default */])("/api/files/".concat(params.id, ".json"), { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context4.stop(); + } + }, _callee4); + })); + return _getDetail.apply(this, arguments); +} +function updateFiles(_x5) { + return _updateFiles.apply(this, arguments); +} +function _updateFiles() { + _updateFiles = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) { + var id; + return _regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + id = params.id; + delete params.id; + return _context5.abrupt("return", Object(fetch["a" /* default */])("/api/files/".concat(id, ".json"), { + method: 'put', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 3: + case "end": + return _context5.stop(); + } + }, _callee5); + })); + return _updateFiles.apply(this, arguments); +} +function attachment_updateVisits(_x6) { + return _updateVisits.apply(this, arguments); +} +function _updateVisits() { + _updateVisits = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) { + return _regeneratorRuntime().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + return _context6.abrupt("return", Object(fetch["a" /* default */])("/api/files/".concat(params.id, "/update_visits.json"), { + method: 'post' + })); + case 1: + case "end": + return _context6.stop(); + } + }, _callee6); + })); + return _updateVisits.apply(this, arguments); +} +// CONCATENATED MODULE: ./src/models/classrooms/attachment.ts + +function attachment_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ attachment_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + +var AnnouncementModel = { + namespace: 'attachment', + state: { + name: '资源', + loading: true, + detail: {}, + // 题库 + actionTabs: {} + }, + effects: { + // 全部资源 + allAttachment: function allAttachment(_ref, _ref2) { + var payload = _ref.payload, + callback = _ref.callback; + var call = _ref2.call, + put = _ref2.put; + return /*#__PURE__*/attachment_regeneratorRuntime().mark(function _callee() { + var response; + return attachment_regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return call(attachment_allAttachment, payload); + case 2: + response = _context.sent; + _context.next = 5; + return put({ + type: 'save', + payload: { + allList: Object(objectSpread2["a" /* default */])({}, response) + } + }); + case 5: + return _context.abrupt("return", response); + case 6: + case "end": + return _context.stop(); + } + }, _callee); + })(); + }, + // 我的资源 + mineAttachment: function mineAttachment(_ref3, _ref4) { + var payload = _ref3.payload, + callback = _ref3.callback; + var call = _ref4.call, + put = _ref4.put; + return /*#__PURE__*/attachment_regeneratorRuntime().mark(function _callee2() { + var response; + return attachment_regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return call(attachment_mineAttachment, payload); + case 2: + response = _context2.sent; + _context2.next = 5; + return put({ + type: 'save', + payload: { + mineList: Object(objectSpread2["a" /* default */])({}, response) + } + }); + case 5: + return _context2.abrupt("return", response); + case 6: + case "end": + return _context2.stop(); + } + }, _callee2); + })(); + }, + // 导入资源 + fileImport: function fileImport(_ref5, _ref6) { + var payload = _ref5.payload, + callback = _ref5.callback; + var call = _ref6.call, + put = _ref6.put; + return /*#__PURE__*/attachment_regeneratorRuntime().mark(function _callee3() { + var response; + return attachment_regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + _context3.next = 2; + return call(attachment_fileImport, payload); + case 2: + response = _context3.sent; + return _context3.abrupt("return", response); + case 4: + case "end": + return _context3.stop(); + } + }, _callee3); + })(); + }, + // 资源详情 + getDetail: function getDetail(_ref7, _ref8) { + var payload = _ref7.payload, + callback = _ref7.callback; + var call = _ref8.call, + put = _ref8.put; + return /*#__PURE__*/attachment_regeneratorRuntime().mark(function _callee4() { + var response; + return attachment_regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + _context4.next = 2; + return call(attachment_getDetail, payload); + case 2: + response = _context4.sent; + _context4.next = 5; + return put({ + type: 'save', + payload: { + detail: Object(objectSpread2["a" /* default */])({}, response) + } + }); + case 5: + return _context4.abrupt("return", response); + case 6: + case "end": + return _context4.stop(); + } + }, _callee4); + })(); + }, + updateVisits: function updateVisits(_ref9, _ref10) { + var payload = _ref9.payload, + callback = _ref9.callback; + var call = _ref10.call, + put = _ref10.put; + return /*#__PURE__*/attachment_regeneratorRuntime().mark(function _callee5() { + var response; + return attachment_regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + _context5.next = 2; + return call(attachment_updateVisits, payload); + case 2: + response = _context5.sent; + return _context5.abrupt("return", response); + case 4: + case "end": + return _context5.stop(); + } + }, _callee5); + })(); + }, + // 设置操做action + setActionTabs: function setActionTabs(_ref11, _ref12) { + var payload = _ref11.payload; + var call = _ref12.call, + put = _ref12.put; + return /*#__PURE__*/attachment_regeneratorRuntime().mark(function _callee6() { + return attachment_regeneratorRuntime().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + _context6.next = 2; + return put({ + type: 'save', + payload: { + actionTabs: Object(objectSpread2["a" /* default */])({}, payload) + } + }); + case 2: + case "end": + return _context6.stop(); + } + }, _callee6); + })(); + } + }, + reducers: { + save: function save(state, action) { + return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload); + } + }, + subscriptions: { + setup: function setup(_ref13) { + var dispatch = _ref13.dispatch, + history = _ref13.history; + } + } +}; +/* harmony default export */ var attachment = __webpack_exports__["a"] = (AnnouncementModel); + +/***/ }), + +/***/ "0Dky": +/*!*************************************************!*\ + !*** ./node_modules/core-js/internals/fails.js ***! + \*************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return !!exec(); + } catch (error) { + return true; + } +}; + + +/***/ }), + +/***/ "0G8d": +/*!***************************************************************!*\ + !*** ./node_modules/@ant-design/icons/CheckCircleOutlined.js ***! + \***************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; + + var _CheckCircleOutlined = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/CheckCircleOutlined */ "qJkI")); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _default = _CheckCircleOutlined; + exports.default = _default; + module.exports = _default; + +/***/ }), + +/***/ "0GbY": +/*!********************************************************!*\ + !*** ./node_modules/core-js/internals/get-built-in.js ***! + \********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var path = __webpack_require__(/*! ../internals/path */ "Qo9l"); +var global = __webpack_require__(/*! ../internals/global */ "2oRo"); + +var aFunction = function (variable) { + return typeof variable == 'function' ? variable : undefined; +}; + +module.exports = function (namespace, method) { + return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace]) + : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method]; +}; + + +/***/ }), + +/***/ "0JQy": +/*!************************************************!*\ + !*** ./node_modules/lodash/_unicodeToArray.js ***! + \************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function unicodeToArray(string) { + return string.match(reUnicode) || []; +} + +module.exports = unicodeToArray; + + +/***/ }), + +/***/ "0Owb": +/*!*************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.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 _extends; }); +function _extends() { + _extends = Object.assign || 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); +} + +/***/ }), + +/***/ "0TkE": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/es.typed-array.find.js ***! + \*************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC"); +var $find = __webpack_require__(/*! ../internals/array-iteration */ "tycR").find; + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; + +// `%TypedArray%.prototype.find` method +// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.find +exportTypedArrayMethod('find', function find(predicate /* , thisArg */) { + return $find(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined); +}); + + +/***/ }), + +/***/ "0ZTe": +/*!*************************************************!*\ + !*** ./node_modules/lodash/_createCaseFirst.js ***! + \*************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var castSlice = __webpack_require__(/*! ./_castSlice */ "wy8a"), + hasUnicode = __webpack_require__(/*! ./_hasUnicode */ "quyA"), + stringToArray = __webpack_require__(/*! ./_stringToArray */ "Em2t"), + toString = __webpack_require__(/*! ./toString */ "dt0z"); + +/** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ +function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; +} + +module.exports = createCaseFirst; + + +/***/ }), + +/***/ "0eef": +/*!*************************************************************************!*\ + !*** ./node_modules/core-js/internals/object-property-is-enumerable.js ***! + \*************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var nativePropertyIsEnumerable = {}.propertyIsEnumerable; +var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + +// Nashorn ~ JDK8 bug +var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); + +// `Object.prototype.propertyIsEnumerable` method implementation +// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable +exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) { + var descriptor = getOwnPropertyDescriptor(this, V); + return !!descriptor && descriptor.enumerable; +} : nativePropertyIsEnumerable; + + +/***/ }), + +/***/ "0jNN": +/*!**************************************!*\ + !*** ./node_modules/qs/lib/utils.js ***! + \**************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var formats = __webpack_require__(/*! ./formats */ "sxOR"); + +var has = Object.prototype.hasOwnProperty; +var isArray = Array.isArray; + +var hexTable = (function () { + var array = []; + for (var i = 0; i < 256; ++i) { + array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); + } + + return array; +}()); + +var compactQueue = function compactQueue(queue) { + while (queue.length > 1) { + var item = queue.pop(); + var obj = item.obj[item.prop]; + + if (isArray(obj)) { + var compacted = []; + + for (var j = 0; j < obj.length; ++j) { + if (typeof obj[j] !== 'undefined') { + compacted.push(obj[j]); + } + } + + item.obj[item.prop] = compacted; + } + } +}; + +var arrayToObject = function arrayToObject(source, options) { + var obj = options && options.plainObjects ? Object.create(null) : {}; + for (var i = 0; i < source.length; ++i) { + if (typeof source[i] !== 'undefined') { + obj[i] = source[i]; + } + } + + return obj; +}; + +var merge = function merge(target, source, options) { + /* eslint no-param-reassign: 0 */ + if (!source) { + return target; + } + + if (typeof source !== 'object') { + if (isArray(target)) { + target.push(source); + } else if (target && typeof target === 'object') { + if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) { + target[source] = true; + } + } else { + return [target, source]; + } + + return target; + } + + if (!target || typeof target !== 'object') { + return [target].concat(source); + } + + var mergeTarget = target; + if (isArray(target) && !isArray(source)) { + mergeTarget = arrayToObject(target, options); + } + + if (isArray(target) && isArray(source)) { + source.forEach(function (item, i) { + if (has.call(target, i)) { + var targetItem = target[i]; + if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') { + target[i] = merge(targetItem, item, options); + } else { + target.push(item); + } + } else { + target[i] = item; + } + }); + return target; + } + + return Object.keys(source).reduce(function (acc, key) { + var value = source[key]; + + if (has.call(acc, key)) { + acc[key] = merge(acc[key], value, options); + } else { + acc[key] = value; + } + return acc; + }, mergeTarget); +}; + +var assign = function assignSingleSource(target, source) { + return Object.keys(source).reduce(function (acc, key) { + acc[key] = source[key]; + return acc; + }, target); +}; + +var decode = function (str, decoder, charset) { + var strWithoutPlus = str.replace(/\+/g, ' '); + if (charset === 'iso-8859-1') { + // unescape never throws, no try...catch needed: + return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); + } + // utf-8 + try { + return decodeURIComponent(strWithoutPlus); + } catch (e) { + return strWithoutPlus; + } +}; + +var limit = 1024; + +/* eslint operator-linebreak: [2, "before"] */ + +var encode = function encode(str, defaultEncoder, charset, kind, format) { + // This code was originally written by Brian White (mscdex) for the io.js core querystring library. + // It has been adapted here for stricter adherence to RFC 3986 + if (str.length === 0) { + return str; + } + + var string = str; + if (typeof str === 'symbol') { + string = Symbol.prototype.toString.call(str); + } else if (typeof str !== 'string') { + string = String(str); + } + + if (charset === 'iso-8859-1') { + return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) { + return '%26%23' + parseInt($0.slice(2), 16) + '%3B'; + }); + } + + var out = ''; + for (var j = 0; j < string.length; j += limit) { + var segment = string.length >= limit ? string.slice(j, j + limit) : string; + var arr = []; + + for (var i = 0; i < segment.length; ++i) { + var c = segment.charCodeAt(i); + if ( + c === 0x2D // - + || c === 0x2E // . + || c === 0x5F // _ + || c === 0x7E // ~ + || (c >= 0x30 && c <= 0x39) // 0-9 + || (c >= 0x41 && c <= 0x5A) // a-z + || (c >= 0x61 && c <= 0x7A) // A-Z + || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( ) + ) { + arr[arr.length] = segment.charAt(i); + continue; + } + + if (c < 0x80) { + arr[arr.length] = hexTable[c]; + continue; + } + + if (c < 0x800) { + arr[arr.length] = hexTable[0xC0 | (c >> 6)] + + hexTable[0x80 | (c & 0x3F)]; + continue; + } + + if (c < 0xD800 || c >= 0xE000) { + arr[arr.length] = hexTable[0xE0 | (c >> 12)] + + hexTable[0x80 | ((c >> 6) & 0x3F)] + + hexTable[0x80 | (c & 0x3F)]; + continue; + } + + i += 1; + c = 0x10000 + (((c & 0x3FF) << 10) | (segment.charCodeAt(i) & 0x3FF)); + + arr[arr.length] = hexTable[0xF0 | (c >> 18)] + + hexTable[0x80 | ((c >> 12) & 0x3F)] + + hexTable[0x80 | ((c >> 6) & 0x3F)] + + hexTable[0x80 | (c & 0x3F)]; + } + + out += arr.join(''); + } + + return out; +}; + +var compact = function compact(value) { + var queue = [{ obj: { o: value }, prop: 'o' }]; + var refs = []; + + for (var i = 0; i < queue.length; ++i) { + var item = queue[i]; + var obj = item.obj[item.prop]; + + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + var val = obj[key]; + if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { + queue.push({ obj: obj, prop: key }); + refs.push(val); + } + } + } + + compactQueue(queue); + + return value; +}; + +var isRegExp = function isRegExp(obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; +}; + +var isBuffer = function isBuffer(obj) { + if (!obj || typeof obj !== 'object') { + return false; + } + + return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); +}; + +var combine = function combine(a, b) { + return [].concat(a, b); +}; + +var maybeMap = function maybeMap(val, fn) { + if (isArray(val)) { + var mapped = []; + for (var i = 0; i < val.length; i += 1) { + mapped.push(fn(val[i])); + } + return mapped; + } + return fn(val); +}; + +module.exports = { + arrayToObject: arrayToObject, + assign: assign, + combine: combine, + compact: compact, + decode: decode, + encode: encode, + isBuffer: isBuffer, + isRegExp: isRegExp, + maybeMap: maybeMap, + merge: merge +}; + + +/***/ }), + +/***/ "0n0R": +/*!*************************************************!*\ + !*** ./node_modules/antd/es/_util/reactNode.js ***! + \*************************************************/ +/*! exports provided: isValidElement, replaceElement, cloneElement */ +/*! exports used: cloneElement, isValidElement, replaceElement */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isValidElement; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return replaceElement; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return cloneElement; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +var isValidElement = react__WEBPACK_IMPORTED_MODULE_0__["isValidElement"]; + +function replaceElement(element, replacement, props) { + if (!isValidElement(element)) return replacement; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["cloneElement"](element, typeof props === 'function' ? props() : props); +} +function cloneElement(element, props) { + return replaceElement(element, element, props); +} + +/***/ }), + +/***/ "0oug": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/es.symbol.iterator.js ***! + \************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n"); + +// `Symbol.iterator` well-known symbol +// https://tc39.github.io/ecma262/#sec-symbol.iterator +defineWellKnownSymbol('iterator'); + + +/***/ }), + +/***/ "0q/z": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.map.find.js ***! + \*********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk"); +var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE"); +var getMapIterator = __webpack_require__(/*! ../internals/get-map-iterator */ "Sssf"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN"); + +// `Map.prototype.find` method +// https://github.com/tc39/proposal-collection-methods +$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, { + find: function find(callbackfn /* , thisArg */) { + var map = anObject(this); + var iterator = getMapIterator(map); + var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + return iterate(iterator, function (key, value) { + if (boundFunction(value, key, map)) return iterate.stop(value); + }, undefined, true, true).result; + } +}); + + +/***/ }), + +/***/ "0rvr": +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/internals/object-set-prototype-of.js ***! + \*******************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk"); +var aPossiblePrototype = __webpack_require__(/*! ../internals/a-possible-prototype */ "O741"); + +// `Object.setPrototypeOf` method +// https://tc39.github.io/ecma262/#sec-object.setprototypeof +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () { + var CORRECT_SETTER = false; + var test = {}; + var setter; + try { + setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set; + setter.call(test, []); + CORRECT_SETTER = test instanceof Array; + } catch (error) { /* empty */ } + return function setPrototypeOf(O, proto) { + anObject(O); + aPossiblePrototype(proto); + if (CORRECT_SETTER) setter.call(O, proto); + else O.__proto__ = proto; + return O; + }; +}() : undefined); + + +/***/ }), + +/***/ "0vxD": +/*!*****************************************************************!*\ + !*** ./node_modules/react-redux/node_modules/react-is/index.js ***! + \*****************************************************************/ +/*! no static exports found */ +/*! exports used: isContextConsumer */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +if (true) { + module.exports = __webpack_require__(/*! ./cjs/react-is.production.min.js */ "DUzY"); +} else {} + + +/***/ }), + +/***/ 1: +/*!*******************************************!*\ + !*** ./locale-data/complete.js (ignored) ***! + \*******************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +/* (ignored) */ + +/***/ }), + +/***/ "14J3": +/*!*************************************************!*\ + !*** ./node_modules/antd/es/row/style/index.js ***! + \*************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "cIOH"); +/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_index_less__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _grid_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../grid/style */ "1GLa"); + // style dependencies +// deps-lint-skip: grid + + + +/***/ }), + +/***/ "14Sl": +/*!******************************************************************************!*\ + !*** ./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js ***! + \******************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// TODO: Remove from `core-js@4` since it's moved to entry points +__webpack_require__(/*! ../modules/es.regexp.exec */ "rB9j"); +var redefine = __webpack_require__(/*! ../internals/redefine */ "busE"); +var fails = __webpack_require__(/*! ../internals/fails */ "0Dky"); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp"); +var regexpExec = __webpack_require__(/*! ../internals/regexp-exec */ "kmMV"); +var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp"); + +var SPECIES = wellKnownSymbol('species'); + +var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { + // #replace needs built-in support for named groups. + // #match works fine because it just return the exec results, even if it has + // a "grops" property. + var re = /./; + re.exec = function () { + var result = []; + result.groups = { a: '7' }; + return result; + }; + return ''.replace(re, '$') !== '7'; +}); + +// IE <= 11 replaces $0 with the whole match, as if it was $& +// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0 +var REPLACE_KEEPS_$0 = (function () { + return 'a'.replace(/./, '$0') === '$0'; +})(); + +var REPLACE = wellKnownSymbol('replace'); +// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string +var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () { + if (/./[REPLACE]) { + return /./[REPLACE]('a', '$0') === ''; + } + return false; +})(); + +// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec +// Weex JS has frozen built-in prototypes, so use try / catch wrapper +var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () { + var re = /(?:)/; + var originalExec = re.exec; + re.exec = function () { return originalExec.apply(this, arguments); }; + var result = 'ab'.split(re); + return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b'; +}); + +module.exports = function (KEY, length, exec, sham) { + var SYMBOL = wellKnownSymbol(KEY); + + var DELEGATES_TO_SYMBOL = !fails(function () { + // String methods call symbol-named RegEp methods + var O = {}; + O[SYMBOL] = function () { return 7; }; + return ''[KEY](O) != 7; + }); + + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + + if (KEY === 'split') { + // We can't use real regex here since it causes deoptimization + // and serious performance degradation in V8 + // https://github.com/zloirock/core-js/issues/306 + re = {}; + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + re.constructor[SPECIES] = function () { return re; }; + re.flags = ''; + re[SYMBOL] = /./[SYMBOL]; + } + + re.exec = function () { execCalled = true; return null; }; + + re[SYMBOL](''); + return !execCalled; + }); + + if ( + !DELEGATES_TO_SYMBOL || + !DELEGATES_TO_EXEC || + (KEY === 'replace' && !( + REPLACE_SUPPORTS_NAMED_GROUPS && + REPLACE_KEEPS_$0 && + !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE + )) || + (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) + ) { + var nativeRegExpMethod = /./[SYMBOL]; + var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) { + if (regexp.exec === regexpExec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; + } + return { done: true, value: nativeMethod.call(str, regexp, arg2) }; + } + return { done: false }; + }, { + REPLACE_KEEPS_$0: REPLACE_KEEPS_$0, + REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE + }); + var stringMethod = methods[0]; + var regexMethod = methods[1]; + + redefine(String.prototype, KEY, stringMethod); + redefine(RegExp.prototype, SYMBOL, length == 2 + // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + ? function (string, arg) { return regexMethod.call(string, this, arg); } + // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + : function (string) { return regexMethod.call(string, this); } + ); + } + + if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true); +}; + + +/***/ }), + +/***/ "16Al": +/*!*************************************************************!*\ + !*** ./node_modules/prop-types/factoryWithThrowingShims.js ***! + \*************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + +var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "WbBG"); + +function emptyFunction() {} +function emptyFunctionWithReset() {} +emptyFunctionWithReset.resetWarningCache = emptyFunction; + +module.exports = function() { + function shim(props, propName, componentName, location, propFullName, secret) { + if (secret === ReactPropTypesSecret) { + // It is still safe when called from React. + return; + } + var err = new Error( + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use PropTypes.checkPropTypes() to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + err.name = 'Invariant Violation'; + throw err; + }; + shim.isRequired = shim; + function getShim() { + return shim; + }; + // Important! + // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. + var ReactPropTypes = { + array: shim, + bigint: shim, + bool: shim, + func: shim, + number: shim, + object: shim, + string: shim, + symbol: shim, + + any: shim, + arrayOf: getShim, + element: shim, + elementType: shim, + instanceOf: getShim, + node: shim, + objectOf: getShim, + oneOf: getShim, + oneOfType: getShim, + shape: getShim, + exact: getShim, + + checkPropTypes: emptyFunctionWithReset, + resetWarningCache: emptyFunction + }; + + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; +}; + + +/***/ }), + +/***/ "17x9": +/*!******************************************!*\ + !*** ./node_modules/prop-types/index.js ***! + \******************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +if (false) { var throwOnDirectAccess, ReactIs; } else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = __webpack_require__(/*! ./factoryWithThrowingShims */ "16Al")(); +} + + +/***/ }), + +/***/ "1E5z": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/internals/set-to-string-tag.js ***! + \*************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "m/L8").f; +var has = __webpack_require__(/*! ../internals/has */ "UTVS"); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp"); + +var TO_STRING_TAG = wellKnownSymbol('toStringTag'); + +module.exports = function (it, TAG, STATIC) { + if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) { + defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG }); + } +}; + + +/***/ }), + +/***/ "1GLa": +/*!**************************************************!*\ + !*** ./node_modules/antd/es/grid/style/index.js ***! + \**************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "cIOH"); +/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_index_less__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "FIfw"); +/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__); + + + +/***/ }), + +/***/ "1OyB": +/*!*******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/classCallCheck.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 _classCallCheck; }); +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +/***/ }), + +/***/ "1WJl": +/*!********************************************************************************!*\ + !*** ./node_modules/@umijs/plugin-model/node_modules/fast-deep-equal/index.js ***! + \********************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// do not edit .js files directly - edit src/index.jst + + + +module.exports = function equal(a, b) { + if (a === b) return true; + + if (a && b && typeof a == 'object' && typeof b == 'object') { + if (a.constructor !== b.constructor) return false; + + var length, i, keys; + if (Array.isArray(a)) { + length = a.length; + if (length != b.length) return false; + for (i = length; i-- !== 0;) + if (!equal(a[i], b[i])) return false; + return true; + } + + + + if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; + if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); + if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); + + keys = Object.keys(a); + length = keys.length; + if (length !== Object.keys(b).length) return false; + + for (i = length; i-- !== 0;) + if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; + + for (i = length; i-- !== 0;) { + var key = keys[i]; + + if (!equal(a[key], b[key])) return false; + } + + return true; + } + + // true if both NaN, false otherwise + return a!==a && b!==b; +}; + + +/***/ }), + +/***/ "1Y/n": +/*!********************************************************!*\ + !*** ./node_modules/core-js/internals/array-reduce.js ***! + \********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM"); +var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW"); +var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "RK3t"); +var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ"); + +// `Array.prototype.{ reduce, reduceRight }` methods implementation +var createMethod = function (IS_RIGHT) { + return function (that, callbackfn, argumentsLength, memo) { + aFunction(callbackfn); + var O = toObject(that); + var self = IndexedObject(O); + var length = toLength(O.length); + var index = IS_RIGHT ? length - 1 : 0; + var i = IS_RIGHT ? -1 : 1; + if (argumentsLength < 2) while (true) { + if (index in self) { + memo = self[index]; + index += i; + break; + } + index += i; + if (IS_RIGHT ? index < 0 : length <= index) { + throw TypeError('Reduce of empty array with no initial value'); + } + } + for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) { + memo = callbackfn(memo, self[index], index, O); + } + return memo; + }; +}; + +module.exports = { + // `Array.prototype.reduce` method + // https://tc39.github.io/ecma262/#sec-array.prototype.reduce + left: createMethod(false), + // `Array.prototype.reduceRight` method + // https://tc39.github.io/ecma262/#sec-array.prototype.reduceright + right: createMethod(true) +}; + + +/***/ }), + +/***/ "1cmj": +/*!***********************************************************!*\ + !*** ./src/models/shixuns/practiceSetting.ts + 1 modules ***! + \***********************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/pages/metting/home/index.jsx */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// 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/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +var asyncToGenerator = __webpack_require__("9og8"); + +// EXTERNAL MODULE: ./src/utils/fetch.ts +var fetch = __webpack_require__("ErOA"); + +// CONCATENATED MODULE: ./src/service/practiceSetting.ts + +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + +//获取test数据 +function practiceSetting_getTestData(_x) { + return _getTestData.apply(this, arguments); +} + +//获取页面通用数据 +function _getTestData() { + _getTestData = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) { + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", Object(fetch["a" /* default */])("/api/shixuns/new.json", { + method: 'Get', + params: params + })); + case 1: + case "end": + return _context.stop(); + } + }, _callee); + })); + return _getTestData.apply(this, arguments); +} +function practiceSetting_getCommonData(_x2) { + return _getCommonData.apply(this, arguments); +} +function _getCommonData() { + _getCommonData = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", Object(fetch["a" /* default */])("/api/shixuns/".concat(params.id, "/required_status.json"), { + method: 'Get', + params: {} + })); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return _getCommonData.apply(this, arguments); +} +// CONCATENATED MODULE: ./src/models/shixuns/practiceSetting.ts + +function practiceSetting_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ practiceSetting_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + +var PracticeSettingModel = { + namespace: 'practiceSetting', + state: { + data: {}, + is_published: true, + updateIndex: 1, + //渲染题目发状态 + id: '', + //实践项目的Id + questionName: '', + base_info_warning: false, + //基本信息警告 + challenges_warning: false, + //任务关卡警告 + repository_warning: false, + //代码仓库警告 + mirror_warning: false, + //实验环境警告 + service_warning: false, + selectQuestionParams: {}, + newQuestion: null, + //新建任务关卡数据 + user_name: '', + user_image_url: '', + title: '', + windows_vnc: true, + //window vnc数据集 + isExistComplete: false, + sideBar: { + tabsActive: '', + //tabs激活 + selectPath: "", + confirmLeave: false + } + }, + effects: { + setParams: function setParams(_ref, _ref2) { + var payload = _ref.payload; + var call = _ref2.call, + put = _ref2.put; + return /*#__PURE__*/practiceSetting_regeneratorRuntime().mark(function _callee() { + return practiceSetting_regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return put({ + type: 'save', + payload: Object(objectSpread2["a" /* default */])({}, payload) + }); + case 2: + case "end": + return _context.stop(); + } + }, _callee); + })(); + }, + getTestData: function getTestData(_ref3, _ref4) { + var payload = _ref3.payload; + var call = _ref4.call, + put = _ref4.put; + return /*#__PURE__*/practiceSetting_regeneratorRuntime().mark(function _callee2() { + var response; + return practiceSetting_regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return call(practiceSetting_getTestData, payload); + case 2: + response = _context2.sent; + _context2.next = 5; + return put({ + type: 'save', + payload: { + data: response + } + }); + case 5: + case "end": + return _context2.stop(); + } + }, _callee2); + })(); + }, + setUpdateIndex: function setUpdateIndex(_ref5, _ref6) { + var payload = _ref5.payload; + var call = _ref6.call, + put = _ref6.put; + return /*#__PURE__*/practiceSetting_regeneratorRuntime().mark(function _callee3() { + return practiceSetting_regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + _context3.next = 2; + return put({ + type: 'save', + payload: { + updateIndex: Math.random() + } + }); + case 2: + case "end": + return _context3.stop(); + } + }, _callee3); + })(); + }, + getCommonData: function getCommonData(_ref7, _ref8) { + var payload = _ref7.payload; + var call = _ref8.call, + put = _ref8.put; + return /*#__PURE__*/practiceSetting_regeneratorRuntime().mark(function _callee4() { + var response; + return practiceSetting_regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + _context4.next = 2; + return call(practiceSetting_getCommonData, payload); + case 2: + response = _context4.sent; + _context4.next = 5; + return put({ + type: 'save', + payload: Object(objectSpread2["a" /* default */])({}, response.data) + }); + case 5: + case "end": + return _context4.stop(); + } + }, _callee4); + })(); + }, + setSideBarTabs: function setSideBarTabs(_ref9, _ref10) { + var payload = _ref9.payload; + var call = _ref10.call, + put = _ref10.put; + return /*#__PURE__*/practiceSetting_regeneratorRuntime().mark(function _callee5() { + return practiceSetting_regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + _context5.next = 2; + return put({ + type: 'sideBar', + payload: Object(objectSpread2["a" /* default */])({}, payload) + }); + case 2: + case "end": + return _context5.stop(); + } + }, _callee5); + })(); + } + }, + reducers: { + save: function save(state, action) { + return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload); + }, + sideBar: function sideBar(state, action) { + return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), {}, { + sideBar: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state.sideBar), action.payload) + }); + } + }, + subscriptions: { + setup: function setup(_ref11) { + var dispatch = _ref11.dispatch, + history = _ref11.history; + } + } +}; +/* harmony default export */ var practiceSetting = __webpack_exports__["a"] = (PracticeSettingModel); + +/***/ }), + +/***/ "1dYe": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/modules/es.typed-array.for-each.js ***! + \*****************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC"); +var $forEach = __webpack_require__(/*! ../internals/array-iteration */ "tycR").forEach; + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; + +// `%TypedArray%.prototype.forEach` method +// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.foreach +exportTypedArrayMethod('forEach', function forEach(callbackfn /* , thisArg */) { + $forEach(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); +}); + + +/***/ }), + +/***/ "1kQv": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.set.from.js ***! + \*********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var from = __webpack_require__(/*! ../internals/collection-from */ "qY7S"); + +// `Set.from` method +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from +$({ target: 'Set', stat: true }, { + from: from +}); + + +/***/ }), + +/***/ "1t3B": +/*!***********************************************************************!*\ + !*** ./node_modules/core-js/modules/es.reflect.prevent-extensions.js ***! + \***********************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk"); +var FREEZING = __webpack_require__(/*! ../internals/freezing */ "uy83"); + +// `Reflect.preventExtensions` method +// https://tc39.github.io/ecma262/#sec-reflect.preventextensions +$({ target: 'Reflect', stat: true, sham: !FREEZING }, { + preventExtensions: function preventExtensions(target) { + anObject(target); + try { + var objectPreventExtensions = getBuiltIn('Object', 'preventExtensions'); + if (objectPreventExtensions) objectPreventExtensions(target); + return true; + } catch (error) { + return false; + } + } +}); + + +/***/ }), + +/***/ "1vsH": +/*!****************************************!*\ + !*** ./src/utils/util.tsx + 6 modules ***! + \****************************************/ +/*! exports provided: ZimuSort, RomanNumber, StatusTags, formatHomeWorkStatusToName, HomeWorkListStatus, HomeWorkDetailStatus, StatusGraduationProjectTags, ExerciseStatus, PollsStatus, StatusClassroomsTags, exerciseTips, WorkStatus, CommonWorkStatus, timego, timeformat, toTimeFormat, validateLength, handleValidatorNickName, handleValidatorName, getHiddenName, getBase64, setmiyah, getCookie, setCookie, delCookie, downLoadLink, getBlob, saveAs, download, downLoadFileIframe, downLoadFile, setUrlQuery, isPc, isChrome, isChromeOrFirefox, formatMoney, openNewWindow, formatTextMiddleIntercept, HalfPastOne, DayHalfPastOne, isEmpty, rangeNumber, middleEllipsis, formatRate, isUnOrNull, getUrlToken, getMessagesUrl, checkLocalOrPublicIp, startExercise, educationList, messageInfo, base64ToBlob, downloadFile, trackEvent, trackEventCustom, onPreviewImage, getCategoryName, bindPhone, copyTextFuc, getJsonFromUrl, arrTrans, setDocumentTitle, checkIsClientExam */ +/*! exports used: bindPhone, checkIsClientExam, delCookie, downLoadFile, downLoadFileIframe, downLoadLink, downloadFile, getBase64, getCookie, getHiddenName, handleValidatorName, isPc, openNewWindow, setCookie, setDocumentTitle, setUrlQuery, setmiyah, trackEvent */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js because of ./src/pages/metting/information/detail.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/iterableToArray.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js because of ./src/pages/metting/information/detail.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js because of ./src/pages/metting/information/detail.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/service/exercise.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/authority.ts because of ./src/pages/Competitions/Detail/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts because of ./src/pages/Competitions/Update/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/index.js because of ./src/pages/Competitions/components/ClaModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/style/index.js because of ./src/pages/Competitions/components/ClaModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/index.js because of ./src/pages/Competitions/Detail/Downloadpdf.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/style/index.js because of ./src/pages/Competitions/Detail/component/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js because of ./src/pages/metting/information/detail.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js because of ./src/pages/Competitions/Detail/SeeItem.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/style/index.js because of ./src/pages/Competitions/Detail/SeeItem.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/md5/md5.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, "k", function() { return /* binding */ handleValidatorName; }); +__webpack_require__.d(__webpack_exports__, "j", function() { return /* binding */ getHiddenName; }); +__webpack_require__.d(__webpack_exports__, "h", function() { return /* binding */ getBase64; }); +__webpack_require__.d(__webpack_exports__, "q", function() { return /* binding */ setmiyah; }); +__webpack_require__.d(__webpack_exports__, "i", function() { return /* binding */ getCookie; }); +__webpack_require__.d(__webpack_exports__, "n", function() { return /* binding */ setCookie; }); +__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ delCookie; }); +__webpack_require__.d(__webpack_exports__, "f", function() { return /* binding */ downLoadLink; }); +__webpack_require__.d(__webpack_exports__, "e", function() { return /* binding */ downLoadFileIframe; }); +__webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ downLoadFile; }); +__webpack_require__.d(__webpack_exports__, "p", function() { return /* binding */ setUrlQuery; }); +__webpack_require__.d(__webpack_exports__, "l", function() { return /* binding */ isPc; }); +__webpack_require__.d(__webpack_exports__, "m", function() { return /* binding */ openNewWindow; }); +__webpack_require__.d(__webpack_exports__, "g", function() { return /* binding */ downloadFile; }); +__webpack_require__.d(__webpack_exports__, "r", function() { return /* binding */ util_trackEvent; }); +__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ util_bindPhone; }); +__webpack_require__.d(__webpack_exports__, "o", function() { return /* binding */ setDocumentTitle; }); +__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ checkIsClientExam; }); + +// UNUSED EXPORTS: ZimuSort, RomanNumber, StatusTags, formatHomeWorkStatusToName, HomeWorkListStatus, HomeWorkDetailStatus, StatusGraduationProjectTags, ExerciseStatus, PollsStatus, StatusClassroomsTags, exerciseTips, WorkStatus, CommonWorkStatus, timego, timeformat, toTimeFormat, validateLength, handleValidatorNickName, getBlob, saveAs, download, isChrome, isChromeOrFirefox, formatMoney, formatTextMiddleIntercept, HalfPastOne, DayHalfPastOne, isEmpty, rangeNumber, middleEllipsis, formatRate, isUnOrNull, getUrlToken, getMessagesUrl, checkLocalOrPublicIp, startExercise, educationList, messageInfo, base64ToBlob, trackEventCustom, onPreviewImage, getCategoryName, copyTextFuc, getJsonFromUrl, arrTrans + +// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules +var toConsumableArray = __webpack_require__("oBTY"); + +// EXTERNAL MODULE: ./node_modules/antd/es/message/style/index.js +var style = __webpack_require__("miYZ"); + +// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 1 modules +var message = __webpack_require__("tsqr"); + +// 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/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/modal/style/index.js +var modal_style = __webpack_require__("2qtc"); + +// EXTERNAL MODULE: ./node_modules/antd/es/modal/index.js + 14 modules +var es_modal = __webpack_require__("kLXV"); + +// 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/objectSpread2.js +var objectSpread2 = __webpack_require__("k1fw"); + +// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js +var defineProperty = __webpack_require__("jrin"); + +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__("q1tI"); +var react_default = /*#__PURE__*/__webpack_require__.n(react); + +// EXTERNAL MODULE: ./src/utils/authority.ts +var authority = __webpack_require__("xKgJ"); + +// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +var arrayWithHoles = __webpack_require__("+kx5"); + +// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +var iterableToArray = __webpack_require__("Y9hK"); + +// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +var unsupportedIterableToArray = __webpack_require__("Qw5x"); + +// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +var nonIterableRest = __webpack_require__("u6e6"); + +// CONCATENATED MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toArray.js + + + + +function _toArray(arr) { + return Object(arrayWithHoles["a" /* default */])(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || Object(nonIterableRest["a" /* default */])(); +} +// CONCATENATED MODULE: ./src/utils/validate.ts +var isValidIP = function isValidIP(ip) { + var reg = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/; + return reg.test(ip); +}; +var isValidIPPrefix = function isValidIPPrefix(ip) { + var reg = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.$/; + return reg.test(ip); +}; +// CONCATENATED MODULE: ./src/components/Exercise/ip.tsx + + + + + + + + + +var ip_findLocalIp = function findLocalIp(data) { + return new Promise(function (resolve, reject) { + window.RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection; + if (typeof window.RTCPeerConnection == 'undefined') return reject('WebRTC not supported by browser'); + var pc = new RTCPeerConnection(); + var ips = []; + pc.createDataChannel(""); + pc.createOffer().then(function (offer) { + return pc.setLocalDescription(offer); + }).catch(function (err) { + return reject(err); + }); + pc.onicecandidate = function (event) { + console.log("event:", event); + var ipArr = []; + if (!event || !event.candidate) { + // All ICE candidates have been sent. + console.log("ips", ips); + if (ips.length == 0 || !isValidIP(ips[0])) { + var modal = es_modal["a" /* default */].info({ + title: /*#__PURE__*/react_default.a.createElement(row["a" /* default */], null, /*#__PURE__*/react_default.a.createElement(col["a" /* default */], { + flex: "1" + }, "\u63D0\u793A"), /*#__PURE__*/react_default.a.createElement(col["a" /* default */], null, /*#__PURE__*/react_default.a.createElement("span", { + className: "iconfont icon-yiguanbi1 current c-grey-c", + onClick: function onClick() { + return modal.destroy(); + } + }))), + icon: null, + width: 500, + className: "custom-modal-divider", + content: /*#__PURE__*/react_default.a.createElement(row["a" /* default */], null, /*#__PURE__*/react_default.a.createElement(col["a" /* default */], null, "\u5F53\u524D\u8003\u8BD5\u5DF2\u542F\u7528\u9650\u5236\u8003\u8BD5\u8BBF\u95EEIP\uFF08\u9650\u5236\u516C\u5171IP+\u5185\u7F51IP\uFF09\u3002", (data.ip_limit === 'inner' || data.ip_bind) && /*#__PURE__*/react_default.a.createElement(react_default.a.Fragment, null, /*#__PURE__*/react_default.a.createElement("span", { + className: "c-red" + }, "\uFF08\u53EA\u5141\u8BB8\u5728Chrome\u8C37\u6B4C\u6D4F\u89C8\u5668\u4F5C\u7B54\uFF0C\u5E76\u4E14\u9700\u8981\u5B89\u88C5WebRTC Leak Prevent\u63D2\u4EF6\uFF09"), /*#__PURE__*/react_default.a.createElement("br", null), /*#__PURE__*/react_default.a.createElement("a", { + href: "https://www.educoder.net/forums/4478", + target: "_blank" + }, "\u5982\u4F55\u5B89\u88C5WebRTC Leak Prevent\u63D2\u4EF6?")))) + }); + return reject('WebRTC disabled or restricted by browser'); + } + var realIp = ips.filter(function (item) { + return isValidIP(item); + }); + return resolve(realIp.join('')); + } + var parts = event.candidate.candidate.split(' '); + var _parts = _toArray(parts), + base = _parts[0], + componentId = _parts[1], + protocol = _parts[2], + priority = _parts[3], + ip = _parts[4], + port = _parts[5], + type = _parts[7], + attr = _parts.slice(8); + var component = ['rtp', 'rtpc']; + console.log("event:", event); + if (!ips.some(function (e) { + return e == ip; + })) ips.push(ip); + console.log(" candidate: " + base.split(':')[1]); + console.log(" component: " + component[componentId - 1]); + console.log(" protocol: " + protocol); + console.log(" priority: " + priority); + console.log(" ip: " + ip); + console.log(" port: " + port); + console.log(" type: " + type); + if (attr.length) { + console.log("attributes: "); + for (var i = 0; i < attr.length; i += 2) console.log("> " + attr[i] + ": " + attr[i + 1]); + } + }; + }); +}; +// EXTERNAL MODULE: ./src/service/exercise.ts +var exercise = __webpack_require__("V0Rq"); + +// CONCATENATED MODULE: ./src/utils/fullscreen.ts +function requestFullScreen(element) { + try { + if (element.mozRequestFullScreen) { + element.mozRequestFullScreen(); + } else if (element.webkitRequestFullScreen) { + element.webkitRequestFullScreen(); + } + } catch (e) { + console.log(e, ":e"); + } +} +function exitFull() { + if (window.top.document.webkitExitFullscreen) { + window.top.document.webkitExitFullscreen(); + } else if (document.exitFullscreen) { + window.top.document.exitFullscreen(); + } else if (document.msExitFullscreen) { + window.top.document.msExitFullscreen(); + } else if (document.mozCancelFullScreen) { + window.top.document.mozCancelFullScreen(); + } +} + +// esliint disabled +var fullscreenChange = function fullscreenChange() { + //['fullscreenchange','msfullscreenchange','webkitfullscreenchange', 'mozfullscreenchange'] + if (document.webkitExitFullscreen) { + // document.webkitExitFullscreen() + return 'webkitfullscreenchange'; + } else if (document.exitFullscreen) { + // document.exitFullscreen() + return 'fullscreenchange'; + } else if (document.msExitFullscreen) { + // document.msExitFullscreen() + return 'msfullscreenchange'; + } else if (document.mozCancelFullScreen) { + // document.mozCancelFullScreen() + return 'mozfullscreenchange'; + } +}; + +//判断是否全屏 +function IsFull() { + var fullscreenElement = window.top.document.fullscreenElement || window.top.document.mozFullscreenElement || window.top.document.webkitFullscreenElement; + var fullscreenEnabled = document.fullscreenEnabled || document.mozFullscreenEnabled || document.webkitFullscreenEnabled; + if (fullscreenElement == null) { + return false; + } else { + return true; + } +} + +// document.addEventListener("mozfullscreenchange", function (event) { +// console.log("mozfullscreenchange ", event); +// if (IsFull()) { +// console.log('进入全屏') +// $("#closescreen").show(); +// $("#openscreen").hide(); +// } else { +// console.log('退出全屏') +// $("#closescreen").hide(); +// $("#openscreen").show(); +// } +// }); +// document.addEventListener("webkitfullscreenchange", function (event) { +// console.log("webkitfullscreenchange", event); +// if (IsFull()) { +// console.log('进入全屏') +// $("#closescreen").show(); +// $("#openscreen").hide(); +// } else { +// console.log('退出全屏') +// $("#closescreen").hide(); +// $("#openscreen").show(); +// } +// }); +// document.addEventListener("msfullscreenchange", function (event) { +// console.log("msfullscreenchange", event); +// if (IsFull()) { +// console.log('进入全屏') +// $("#closescreen").show(); +// $("#openscreen").hide(); +// } else { +// console.log('退出全屏') +// $("#closescreen").hide(); +// $("#openscreen").show(); +// } +// }); +// CONCATENATED MODULE: ./src/utils/contentType.ts +var contentType = { + "load": "text/html", + "123": "application/vndlotus-1-2-3", + "3ds": "image/x-3ds", + "3g2": "video/3gpp", + "3ga": "video/3gpp", + "3gp": "video/3gpp", + "3gpp": "video/3gpp", + "602": "application/x-t602", + "669": "audio/x-mod", + "7z": "application/x-7z-compressed", + "a": "application/x-archive", + "aac": "audio/mp4", + "abw": "application/x-abiword", + "abwcrashed": "application/x-abiword", + "abwgz": "application/x-abiword", + "ac3": "audio/ac3", + "ace": "application/x-ace", + "adb": "text/x-adasrc", + "ads": "text/x-adasrc", + "afm": "application/x-font-afm", + "ag": "image/x-applix-graphics", + "ai": "application/illustrator", + "aif": "audio/x-aiff", + "aifc": "audio/x-aiff", + "aiff": "audio/x-aiff", + "al": "application/x-perl", + "alz": "application/x-alz", + "amr": "audio/amr", + "ani": "application/x-navi-animation", + "anim[1-9j]": "video/x-anim", + "anx": "application/annodex", + "ape": "audio/x-ape", + "arj": "application/x-arj", + "arw": "image/x-sony-arw", + "as": "application/x-applix-spreadsheet", + "asc": "text/plain", + "asf": "video/x-ms-asf", + "asp": "application/x-asp", + "ass": "text/x-ssa", + "asx": "audio/x-ms-asx", + "atom": "application/atom+xml", + "au": "audio/basic", + "avi": "video/x-msvideo", + "aw": "application/x-applix-word", + "awb": "audio/amr-wb", + "awk": "application/x-awk", + "axa": "audio/annodex", + "axv": "video/annodex", + "bak": "application/x-trash", + "bcpio": "application/x-bcpio", + "bdf": "application/x-font-bdf", + "bib": "text/x-bibtex", + "bin": "application/octet-stream", + "blend": "application/x-blender", + "blender": "application/x-blender", + "bmp": "image/bmp", + "bz": "application/x-bzip", + "bz2": "application/x-bzip", + "c": "text/x-csrc", + "c++": "text/x-c++src", + "cab": "application/vndms-cab-compressed", + "cb7": "application/x-cb7", + "cbr": "application/x-cbr", + "cbt": "application/x-cbt", + "cbz": "application/x-cbz", + "cc": "text/x-c++src", + "cdf": "application/x-netcdf", + "cdr": "application/vndcorel-draw", + "cer": "application/x-x509-ca-cert", + "cert": "application/x-x509-ca-cert", + "cgm": "image/cgm", + "chm": "application/x-chm", + "chrt": "application/x-kchart", + "class": "application/x-java", + "cls": "text/x-tex", + "cmake": "text/x-cmake", + "cpio": "application/x-cpio", + "cpiogz": "application/x-cpio-compressed", + "cpp": "text/x-c++src", + "cr2": "image/x-canon-cr2", + "crt": "application/x-x509-ca-cert", + "crw": "image/x-canon-crw", + "cs": "text/x-csharp", + "csh": "application/x-csh", + "css": "text/css", + "cssl": "text/css", + "csv": "text/csv", + "cue": "application/x-cue", + "cur": "image/x-win-bitmap", + "cxx": "text/x-c++src", + "d": "text/x-dsrc", + "dar": "application/x-dar", + "dbf": "application/x-dbf", + "dc": "application/x-dc-rom", + "dcl": "text/x-dcl", + "dcm": "application/dicom", + "dcr": "image/x-kodak-dcr", + "dds": "image/x-dds", + "deb": "application/x-deb", + "der": "application/x-x509-ca-cert", + "desktop": "application/x-desktop", + "dia": "application/x-dia-diagram", + "diff": "text/x-patch", + "divx": "video/x-msvideo", + "djv": "image/vnddjvu", + "djvu": "image/vnddjvu", + "dng": "image/x-adobe-dng", + "doc": "application/msword", + "docbook": "application/docbook+xml", + "docm": "application/vndopenxmlformats-officedocumentwordprocessingmldocument", + "docx": "application/vndopenxmlformats-officedocumentwordprocessingmldocument", + "dot": "text/vndgraphviz", + "dsl": "text/x-dsl", + "dtd": "application/xml-dtd", + "dtx": "text/x-tex", + "dv": "video/dv", + "dvi": "application/x-dvi", + "dvibz2": "application/x-bzdvi", + "dvigz": "application/x-gzdvi", + "dwg": "image/vnddwg", + "dxf": "image/vnddxf", + "e": "text/x-eiffel", + "egon": "application/x-egon", + "eif": "text/x-eiffel", + "el": "text/x-emacs-lisp", + "emf": "image/x-emf", + "emp": "application/vndemusic-emusic_package", + "ent": "application/xml-external-parsed-entity", + "eps": "image/x-eps", + "epsbz2": "image/x-bzeps", + "epsgz": "image/x-gzeps", + "epsf": "image/x-eps", + "epsfbz2": "image/x-bzeps", + "epsfgz": "image/x-gzeps", + "epsi": "image/x-eps", + "epsibz2": "image/x-bzeps", + "epsigz": "image/x-gzeps", + "epub": "application/epub+zip", + "erl": "text/x-erlang", + "es": "application/ecmascript", + "etheme": "application/x-e-theme", + "etx": "text/x-setext", + "exe": "application/x-ms-dos-executable", + "exr": "image/x-exr", + "ez": "application/andrew-inset", + "f": "text/x-fortran", + "f90": "text/x-fortran", + "f95": "text/x-fortran", + "fb2": "application/x-fictionbook+xml", + "fig": "image/x-xfig", + "fits": "image/fits", + "fl": "application/x-fluid", + "flac": "audio/x-flac", + "flc": "video/x-flic", + "fli": "video/x-flic", + "flv": "video/x-flv", + "flw": "application/x-kivio", + "fo": "text/x-xslfo", + "for": "text/x-fortran", + "g3": "image/fax-g3", + "gb": "application/x-gameboy-rom", + "gba": "application/x-gba-rom", + "gcrd": "text/directory", + "ged": "application/x-gedcom", + "gedcom": "application/x-gedcom", + "gen": "application/x-genesis-rom", + "gf": "application/x-tex-gf", + "gg": "application/x-sms-rom", + "gif": "image/gif", + "glade": "application/x-glade", + "gmo": "application/x-gettext-translation", + "gnc": "application/x-gnucash", + "gnd": "application/gnunet-directory", + "gnucash": "application/x-gnucash", + "gnumeric": "application/x-gnumeric", + "gnuplot": "application/x-gnuplot", + "gp": "application/x-gnuplot", + "gpg": "application/pgp-encrypted", + "gplt": "application/x-gnuplot", + "gra": "application/x-graphite", + "gsf": "application/x-font-type1", + "gsm": "audio/x-gsm", + "gtar": "application/x-tar", + "gv": "text/vndgraphviz", + "gvp": "text/x-google-video-pointer", + "gz": "application/x-gzip", + "h": "text/x-chdr", + "h++": "text/x-c++hdr", + "hdf": "application/x-hdf", + "hh": "text/x-c++hdr", + "hp": "text/x-c++hdr", + "hpgl": "application/vndhp-hpgl", + "hpp": "text/x-c++hdr", + "hs": "text/x-haskell", + "htm": "text/html", + "html": "text/html", + "hwp": "application/x-hwp", + "hwt": "application/x-hwt", + "hxx": "text/x-c++hdr", + "ica": "application/x-ica", + "icb": "image/x-tga", + "icns": "image/x-icns", + "ico": "image/vndmicrosofticon", + "ics": "text/calendar", + "idl": "text/x-idl", + "ief": "image/ief", + "iff": "image/x-iff", + "ilbm": "image/x-ilbm", + "ime": "text/x-imelody", + "imy": "text/x-imelody", + "ins": "text/x-tex", + "iptables": "text/x-iptables", + "iso": "application/x-cd-image", + "iso9660": "application/x-cd-image", + "it": "audio/x-it", + "j2k": "image/jp2", + "jad": "text/vndsunj2meapp-descriptor", + "jar": "application/x-java-archive", + "java": "text/x-java", + "jng": "image/x-jng", + "jnlp": "application/x-java-jnlp-file", + "jp2": "image/jp2", + "jpc": "image/jp2", + "jpe": "image/jpeg", + "jpeg": "image/jpeg", + "jpf": "image/jp2", + "jpg": "image/jpeg", + "jpr": "application/x-jbuilder-project", + "jpx": "image/jp2", + "js": "application/javascript", + "json": "application/json", + "jsonp": "application/jsonp", + "k25": "image/x-kodak-k25", + "kar": "audio/midi", + "karbon": "application/x-karbon", + "kdc": "image/x-kodak-kdc", + "kdelnk": "application/x-desktop", + "kexi": "application/x-kexiproject-sqlite3", + "kexic": "application/x-kexi-connectiondata", + "kexis": "application/x-kexiproject-shortcut", + "kfo": "application/x-kformula", + "kil": "application/x-killustrator", + "kino": "application/smil", + "kml": "application/vndgoogle-earthkml+xml", + "kmz": "application/vndgoogle-earthkmz", + "kon": "application/x-kontour", + "kpm": "application/x-kpovmodeler", + "kpr": "application/x-kpresenter", + "kpt": "application/x-kpresenter", + "kra": "application/x-krita", + "ksp": "application/x-kspread", + "kud": "application/x-kugar", + "kwd": "application/x-kword", + "kwt": "application/x-kword", + "la": "application/x-shared-library-la", + "latex": "text/x-tex", + "ldif": "text/x-ldif", + "lha": "application/x-lha", + "lhs": "text/x-literate-haskell", + "lhz": "application/x-lhz", + "log": "text/x-log", + "ltx": "text/x-tex", + "lua": "text/x-lua", + "lwo": "image/x-lwo", + "lwob": "image/x-lwo", + "lws": "image/x-lws", + "ly": "text/x-lilypond", + "lyx": "application/x-lyx", + "lz": "application/x-lzip", + "lzh": "application/x-lha", + "lzma": "application/x-lzma", + "lzo": "application/x-lzop", + "m": "text/x-matlab", + "m15": "audio/x-mod", + "m2t": "video/mpeg", + "m3u": "audio/x-mpegurl", + "m3u8": "audio/x-mpegurl", + "m4": "application/x-m4", + "m4a": "audio/mp4", + "m4b": "audio/x-m4b", + "m4v": "video/mp4", + "mab": "application/x-markaby", + "man": "application/x-troff-man", + "mbox": "application/mbox", + "md": "application/x-genesis-rom", + "mdb": "application/vndms-access", + "mdi": "image/vndms-modi", + "me": "text/x-troff-me", + "med": "audio/x-mod", + "metalink": "application/metalink+xml", + "mgp": "application/x-magicpoint", + "mid": "audio/midi", + "midi": "audio/midi", + "mif": "application/x-mif", + "minipsf": "audio/x-minipsf", + "mka": "audio/x-matroska", + "mkv": "video/x-matroska", + "ml": "text/x-ocaml", + "mli": "text/x-ocaml", + "mm": "text/x-troff-mm", + "mmf": "application/x-smaf", + "mml": "text/mathml", + "mng": "video/x-mng", + "mo": "application/x-gettext-translation", + "mo3": "audio/x-mo3", + "moc": "text/x-moc", + "mod": "audio/x-mod", + "mof": "text/x-mof", + "moov": "video/quicktime", + "mov": "video/quicktime", + "movie": "video/x-sgi-movie", + "mp+": "audio/x-musepack", + "mp2": "video/mpeg", + "mp3": "audio/mpeg", + "mp4": "video/mp4", + "mpc": "audio/x-musepack", + "mpe": "video/mpeg", + "mpeg": "video/mpeg", + "mpg": "video/mpeg", + "mpga": "audio/mpeg", + "mpp": "audio/x-musepack", + "mrl": "text/x-mrml", + "mrml": "text/x-mrml", + "mrw": "image/x-minolta-mrw", + "ms": "text/x-troff-ms", + "msi": "application/x-msi", + "msod": "image/x-msod", + "msx": "application/x-msx-rom", + "mtm": "audio/x-mod", + "mup": "text/x-mup", + "mxf": "application/mxf", + "n64": "application/x-n64-rom", + "nb": "application/mathematica", + "nc": "application/x-netcdf", + "nds": "application/x-nintendo-ds-rom", + "nef": "image/x-nikon-nef", + "nes": "application/x-nes-rom", + "nfo": "text/x-nfo", + "not": "text/x-mup", + "nsc": "application/x-netshow-channel", + "nsv": "video/x-nsv", + "o": "application/x-object", + "obj": "application/x-tgif", + "ocl": "text/x-ocl", + "oda": "application/oda", + "odb": "application/vndoasisopendocumentdatabase", + "odc": "application/vndoasisopendocumentchart", + "odf": "application/vndoasisopendocumentformula", + "odg": "application/vndoasisopendocumentgraphics", + "odi": "application/vndoasisopendocumentimage", + "odm": "application/vndoasisopendocumenttext-master", + "odp": "application/vndoasisopendocumentpresentation", + "ods": "application/vndoasisopendocumentspreadsheet", + "odt": "application/vndoasisopendocumenttext", + "oga": "audio/ogg", + "ogg": "video/x-theora+ogg", + "ogm": "video/x-ogm+ogg", + "ogv": "video/ogg", + "ogx": "application/ogg", + "old": "application/x-trash", + "oleo": "application/x-oleo", + "opml": "text/x-opml+xml", + "ora": "image/openraster", + "orf": "image/x-olympus-orf", + "otc": "application/vndoasisopendocumentchart-template", + "otf": "application/x-font-otf", + "otg": "application/vndoasisopendocumentgraphics-template", + "oth": "application/vndoasisopendocumenttext-web", + "otp": "application/vndoasisopendocumentpresentation-template", + "ots": "application/vndoasisopendocumentspreadsheet-template", + "ott": "application/vndoasisopendocumenttext-template", + "owl": "application/rdf+xml", + "oxt": "application/vndopenofficeorgextension", + "p": "text/x-pascal", + "p10": "application/pkcs10", + "p12": "application/x-pkcs12", + "p7b": "application/x-pkcs7-certificates", + "p7s": "application/pkcs7-signature", + "pack": "application/x-java-pack200", + "pak": "application/x-pak", + "par2": "application/x-par2", + "pas": "text/x-pascal", + "patch": "text/x-patch", + "pbm": "image/x-portable-bitmap", + "pcd": "image/x-photo-cd", + "pcf": "application/x-cisco-vpn-settings", + "pcfgz": "application/x-font-pcf", + "pcfz": "application/x-font-pcf", + "pcl": "application/vndhp-pcl", + "pcx": "image/x-pcx", + "pdb": "chemical/x-pdb", + "pdc": "application/x-aportisdoc", + "pdf": "application/pdf", + "pdfbz2": "application/x-bzpdf", + "pdfgz": "application/x-gzpdf", + "pef": "image/x-pentax-pef", + "pem": "application/x-x509-ca-cert", + "perl": "application/x-perl", + "pfa": "application/x-font-type1", + "pfb": "application/x-font-type1", + "pfx": "application/x-pkcs12", + "pgm": "image/x-portable-graymap", + "pgn": "application/x-chess-pgn", + "pgp": "application/pgp-encrypted", + "php": "application/x-php", + "php3": "application/x-php", + "php4": "application/x-php", + "pict": "image/x-pict", + "pict1": "image/x-pict", + "pict2": "image/x-pict", + "pickle": "application/python-pickle", + "pk": "application/x-tex-pk", + "pkipath": "application/pkix-pkipath", + "pkr": "application/pgp-keys", + "pl": "application/x-perl", + "pla": "audio/x-iriver-pla", + "pln": "application/x-planperfect", + "pls": "audio/x-scpls", + "pm": "application/x-perl", + "png": "image/png", + "pnm": "image/x-portable-anymap", + "pntg": "image/x-macpaint", + "po": "text/x-gettext-translation", + "por": "application/x-spss-por", + "pot": "text/x-gettext-translation-template", + "ppm": "image/x-portable-pixmap", + "pps": "application/vndms-powerpoint", + "ppt": "application/vndms-powerpoint", + "pptm": "application/vndopenxmlformats-officedocumentpresentationmlpresentation", + "pptx": "application/vndopenxmlformats-officedocumentpresentationmlpresentation", + "ppz": "application/vndms-powerpoint", + "prc": "application/x-palm-database", + "ps": "application/postscript", + "psbz2": "application/x-bzpostscript", + "psgz": "application/x-gzpostscript", + "psd": "image/vndadobephotoshop", + "psf": "audio/x-psf", + "psfgz": "application/x-gz-font-linux-psf", + "psflib": "audio/x-psflib", + "psid": "audio/prssid", + "psw": "application/x-pocket-word", + "pw": "application/x-pw", + "py": "text/x-python", + "pyc": "application/x-python-bytecode", + "pyo": "application/x-python-bytecode", + "qif": "image/x-quicktime", + "qt": "video/quicktime", + "qtif": "image/x-quicktime", + "qtl": "application/x-quicktime-media-link", + "qtvr": "video/quicktime", + "ra": "audio/vndrn-realaudio", + "raf": "image/x-fuji-raf", + "ram": "application/ram", + "rar": "application/x-rar", + "ras": "image/x-cmu-raster", + "raw": "image/x-panasonic-raw", + "rax": "audio/vndrn-realaudio", + "rb": "application/x-ruby", + "rdf": "application/rdf+xml", + "rdfs": "application/rdf+xml", + "reg": "text/x-ms-regedit", + "rej": "application/x-reject", + "rgb": "image/x-rgb", + "rle": "image/rle", + "rm": "application/vndrn-realmedia", + "rmj": "application/vndrn-realmedia", + "rmm": "application/vndrn-realmedia", + "rms": "application/vndrn-realmedia", + "rmvb": "application/vndrn-realmedia", + "rmx": "application/vndrn-realmedia", + "roff": "text/troff", + "rp": "image/vndrn-realpix", + "rpm": "application/x-rpm", + "rss": "application/rss+xml", + "rt": "text/vndrn-realtext", + "rtf": "application/rtf", + "rtx": "text/richtext", + "rv": "video/vndrn-realvideo", + "rvx": "video/vndrn-realvideo", + "s3m": "audio/x-s3m", + "sam": "application/x-amipro", + "sami": "application/x-sami", + "sav": "application/x-spss-sav", + "scm": "text/x-scheme", + "sda": "application/vndstardivisiondraw", + "sdc": "application/vndstardivisioncalc", + "sdd": "application/vndstardivisionimpress", + "sdp": "application/sdp", + "sds": "application/vndstardivisionchart", + "sdw": "application/vndstardivisionwriter", + "sgf": "application/x-go-sgf", + "sgi": "image/x-sgi", + "sgl": "application/vndstardivisionwriter", + "sgm": "text/sgml", + "sgml": "text/sgml", + "sh": "application/x-shellscript", + "shar": "application/x-shar", + "shn": "application/x-shorten", + "siag": "application/x-siag", + "sid": "audio/prssid", + "sik": "application/x-trash", + "sis": "application/vndsymbianinstall", + "sisx": "x-epoc/x-sisx-app", + "sit": "application/x-stuffit", + "siv": "application/sieve", + "sk": "image/x-skencil", + "sk1": "image/x-skencil", + "skr": "application/pgp-keys", + "slk": "text/spreadsheet", + "smaf": "application/x-smaf", + "smc": "application/x-snes-rom", + "smd": "application/vndstardivisionmail", + "smf": "application/vndstardivisionmath", + "smi": "application/x-sami", + "smil": "application/smil", + "sml": "application/smil", + "sms": "application/x-sms-rom", + "snd": "audio/basic", + "so": "application/x-sharedlib", + "spc": "application/x-pkcs7-certificates", + "spd": "application/x-font-speedo", + "spec": "text/x-rpm-spec", + "spl": "application/x-shockwave-flash", + "spx": "audio/x-speex", + "sql": "text/x-sql", + "sr2": "image/x-sony-sr2", + "src": "application/x-wais-source", + "srf": "image/x-sony-srf", + "srt": "application/x-subrip", + "ssa": "text/x-ssa", + "stc": "application/vndsunxmlcalctemplate", + "std": "application/vndsunxmldrawtemplate", + "sti": "application/vndsunxmlimpresstemplate", + "stm": "audio/x-stm", + "stw": "application/vndsunxmlwritertemplate", + "sty": "text/x-tex", + "sub": "text/x-subviewer", + "sun": "image/x-sun-raster", + "sv4cpio": "application/x-sv4cpio", + "sv4crc": "application/x-sv4crc", + "svg": "image/svg+xml", + "svgz": "image/svg+xml-compressed", + "swf": "application/x-shockwave-flash", + "sxc": "application/vndsunxmlcalc", + "sxd": "application/vndsunxmldraw", + "sxg": "application/vndsunxmlwriterglobal", + "sxi": "application/vndsunxmlimpress", + "sxm": "application/vndsunxmlmath", + "sxw": "application/vndsunxmlwriter", + "sylk": "text/spreadsheet", + "t": "text/troff", + "t2t": "text/x-txt2tags", + "tar": "application/x-tar", + "tarbz": "application/x-bzip-compressed-tar", + "tarbz2": "application/x-bzip-compressed-tar", + "targz": "application/x-compressed-tar", + "tarlzma": "application/x-lzma-compressed-tar", + "tarlzo": "application/x-tzo", + "tarxz": "application/x-xz-compressed-tar", + "tarz": "application/x-tarz", + "tbz": "application/x-bzip-compressed-tar", + "tbz2": "application/x-bzip-compressed-tar", + "tcl": "text/x-tcl", + "tex": "text/x-tex", + "texi": "text/x-texinfo", + "texinfo": "text/x-texinfo", + "tga": "image/x-tga", + "tgz": "application/x-compressed-tar", + "theme": "application/x-theme", + "themepack": "application/x-windows-themepack", + "tif": "image/tiff", + "tiff": "image/tiff", + "tk": "text/x-tcl", + "tlz": "application/x-lzma-compressed-tar", + "tnef": "application/vndms-tnef", + "tnf": "application/vndms-tnef", + "toc": "application/x-cdrdao-toc", + "torrent": "application/x-bittorrent", + "tpic": "image/x-tga", + "tr": "text/troff", + "ts": "application/x-linguist", + "tsv": "text/tab-separated-values", + "tta": "audio/x-tta", + "ttc": "application/x-font-ttf", + "ttf": "application/x-font-ttf", + "ttx": "application/x-font-ttx", + "txt": "text/plain", + "txz": "application/x-xz-compressed-tar", + "tzo": "application/x-tzo", + "ufraw": "application/x-ufraw", + "ui": "application/x-designer", + "uil": "text/x-uil", + "ult": "audio/x-mod", + "uni": "audio/x-mod", + "uri": "text/x-uri", + "url": "text/x-uri", + "ustar": "application/x-ustar", + "vala": "text/x-vala", + "vapi": "text/x-vala", + "vcf": "text/directory", + "vcs": "text/calendar", + "vct": "text/directory", + "vda": "image/x-tga", + "vhd": "text/x-vhdl", + "vhdl": "text/x-vhdl", + "viv": "video/vivo", + "vivo": "video/vivo", + "vlc": "audio/x-mpegurl", + "vob": "video/mpeg", + "voc": "audio/x-voc", + "vor": "application/vndstardivisionwriter", + "vst": "image/x-tga", + "wav": "audio/x-wav", + "wax": "audio/x-ms-asx", + "wb1": "application/x-quattropro", + "wb2": "application/x-quattropro", + "wb3": "application/x-quattropro", + "wbmp": "image/vndwapwbmp", + "wcm": "application/vndms-works", + "wdb": "application/vndms-works", + "webm": "video/webm", + "wk1": "application/vndlotus-1-2-3", + "wk3": "application/vndlotus-1-2-3", + "wk4": "application/vndlotus-1-2-3", + "wks": "application/vndms-works", + "wma": "audio/x-ms-wma", + "wmf": "image/x-wmf", + "wml": "text/vndwapwml", + "wmls": "text/vndwapwmlscript", + "wmv": "video/x-ms-wmv", + "wmx": "audio/x-ms-asx", + "wp": "application/vndwordperfect", + "wp4": "application/vndwordperfect", + "wp5": "application/vndwordperfect", + "wp6": "application/vndwordperfect", + "wpd": "application/vndwordperfect", + "wpg": "application/x-wpg", + "wpl": "application/vndms-wpl", + "wpp": "application/vndwordperfect", + "wps": "application/vndms-works", + "wri": "application/x-mswrite", + "wrl": "model/vrml", + "wv": "audio/x-wavpack", + "wvc": "audio/x-wavpack-correction", + "wvp": "audio/x-wavpack", + "wvx": "audio/x-ms-asx", + "x3f": "image/x-sigma-x3f", + "xac": "application/x-gnucash", + "xbel": "application/x-xbel", + "xbl": "application/xml", + "xbm": "image/x-xbitmap", + "xcf": "image/x-xcf", + "xcfbz2": "image/x-compressed-xcf", + "xcfgz": "image/x-compressed-xcf", + "xhtml": "application/xhtml+xml", + "xi": "audio/x-xi", + "xla": "application/vndms-excel", + "xlc": "application/vndms-excel", + "xld": "application/vndms-excel", + "xlf": "application/x-xliff", + "xliff": "application/x-xliff", + "xll": "application/vndms-excel", + "xlm": "application/vndms-excel", + "xls": "application/vndms-excel", + "xlsm": "application/vndopenxmlformats-officedocumentspreadsheetmlsheet", + "xlsx": "application/vndopenxmlformats-officedocumentspreadsheetmlsheet", + "xlt": "application/vndms-excel", + "xlw": "application/vndms-excel", + "xm": "audio/x-xm", + "xmf": "audio/x-xmf", + "xmi": "text/x-xmi", + "xml": "application/xml", + "xpm": "image/x-xpixmap", + "xps": "application/vndms-xpsdocument", + "xsl": "application/xml", + "xslfo": "text/x-xslfo", + "xslt": "application/xml", + "xspf": "application/xspf+xml", + "xul": "application/vndmozillaxul+xml", + "xwd": "image/x-xwindowdump", + "xyz": "chemical/x-pdb", + "xz": "application/x-xz", + "w2p": "application/w2p", + "z": "application/x-compress", + "zabw": "application/x-abiword", + "zip": "application/zip" +}; +// EXTERNAL MODULE: ./node_modules/md5/md5.js +var md5 = __webpack_require__("aCH8"); +var md5_default = /*#__PURE__*/__webpack_require__.n(md5); + +// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules +var env = __webpack_require__("m3rI"); + +// CONCATENATED MODULE: ./src/components/mediator.js +function Mediator(obj) { + var channels = {}; + var mediator = { + channels: channels, + subscribe: function subscribe(channel, cb) { + if (!channels[channel]) { + channels[channel] = []; + } + channels[channel].push(cb); + return this.unsubscribe.bind(null, channel, cb); + }, + unsubscribe: function unsubscribe(channel, cb) { + var rs = channels[channel]; + var index = -1; + if (rs) { + for (var i = 0; i < rs.length; i++) { + if (rs[i].name === cb.name) { + index = i; + break; + } + } + if (index >= 0) { + channels[channel].splice(index, 1); + return true; + } + } + return false; + }, + publish: function publish(channel) { + if (!channels[channel]) { + return false; + } + var args = Array.prototype.slice.call(arguments, 1); + channels[channel].forEach(function (subscription) { + subscription.apply(null, args); + }); + return this; + } + }; + return obj ? Object.assign(obj, mediator) : mediator; +} +var mediator = new Mediator(); +/* harmony default export */ var components_mediator = (mediator); +// CONCATENATED MODULE: ./src/utils/util.tsx + + + + + + + + + + + + + + +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + + + + + + + + + +; +var ZimuSort = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']; +var RomanNumber = ["I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII", "XIII", "XIV", "XV", "XVI", "XVII", "XVIII", "XIX", "XX"]; +/** + *@所有实训tags集合生成 + *status为数组 status=["提交中","补交中"] + */ + +var util_StatusTags = function StatusTags(props) { + var tags = { + 已截止: { + class: 'tag-style bg-pink ml10' + }, + 提交中: { + class: 'tag-style bg-blue ml10' + }, + 进行中: { + class: 'tag-style bg-blue ml10' + }, + 未发布: { + class: 'tag-style bgB8B8B8 ml10' + }, + 补交中: { + class: 'tag-style bg-blue ml10' + } + }; + return props.data && props.data.map(function (v, k) { + return /*#__PURE__*/react_default.a.createElement("span", { + key: k, + className: tags[v] && tags[v]['class'] + }, v); + }); +}; + +/** + *@教学课堂-作业列表状态名字 + *status为 number + */ +var util_formatHomeWorkStatusToName = function formatHomeWorkStatusToName(status) { + var mapping = Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])({}, -1, "重做中"), 0, "未开启"), 1, "未通关"), 2, "按时通关"); + return mapping[status] || "迟交通关"; +}; + +/** + *@教学课堂-作业列表状态 + *status为 number + */ +var util_HomeWorkListStatus = function HomeWorkListStatus(props) { + var _wStatus$props$status, _wStatus$props$status2; + var wStatus = Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])({}, -1, { + name: '重做中', + class: 'c-orange' + }), 0, { + name: '未开启', + class: 'c-black' + }), 1, { + name: '未通关', + class: 'c-red' + }), 2, { + name: '按时通关', + class: 'c-green' + }), 3, { + name: '迟交通关', + class: 'c-orange' + }); + return /*#__PURE__*/react_default.a.createElement("span", { + className: wStatus === null || wStatus === void 0 ? void 0 : (_wStatus$props$status = wStatus[props.status]) === null || _wStatus$props$status === void 0 ? void 0 : _wStatus$props$status['class'] + }, wStatus === null || wStatus === void 0 ? void 0 : (_wStatus$props$status2 = wStatus[props.status]) === null || _wStatus$props$status2 === void 0 ? void 0 : _wStatus$props$status2['name']); +}; + +/** + *@教学课堂-作业心情状态 + *status为 number + */ +var util_HomeWorkDetailStatus = function HomeWorkDetailStatus(props) { + var _wStatus$props$status3, _wStatus$props$status4; + var wStatus = Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])({}, -1, { + name: '重做中', + class: 'c-orange', + color: '#999999' + }), 0, { + name: '未开启', + class: 'c-black', + color: '#999999' + }), 1, { + name: '未通关', + class: 'c-red', + color: '#d4443d' + }), 2, { + name: '按时通关', + class: 'c-green', + color: '#57be40' + }), 3, { + name: '迟交通关', + class: 'c-orange', + color: '#f09143' + }); + return /*#__PURE__*/react_default.a.createElement("span", { + style: { + marginLeft: '10px', + color: '#fff', + background: wStatus === null || wStatus === void 0 ? void 0 : (_wStatus$props$status3 = wStatus[props.status]) === null || _wStatus$props$status3 === void 0 ? void 0 : _wStatus$props$status3['color'], + borderRadius: '20px', + width: "65px", + height: '18px', + justifyContent: 'center', + display: 'inline-flex', + lineHeight: '18px' + } + }, wStatus === null || wStatus === void 0 ? void 0 : (_wStatus$props$status4 = wStatus[props.status]) === null || _wStatus$props$status4 === void 0 ? void 0 : _wStatus$props$status4['name']); +}; + +/** + *@教学课堂-毕设选题tags集合生成 + *status为数组 status=["提交中","补交中"] + */ +var util_StatusGraduationProjectTags = function StatusGraduationProjectTags(props) { + var status = props.status; + var tags = { + 0: { + class: 'tag-style bg-blue ml10', + name: '待选中' + }, + 1: { + class: 'tag-style bg-blue ml10', + name: '待确认' + }, + 2: { + class: 'tag-style bg-pink ml10', + name: '已确认' + } + }; + try { + return /*#__PURE__*/react_default.a.createElement("span", { + className: tags[status]['class'] + }, tags[status]['name']); + } catch (e) { + console.log('utils.StatusGraduationProjectTags', props.status); + } +}; +var ExerciseStatus = { + 1: "未发布", + 2: "考试中", + 3: "已截止", + 4: "已结束", + 99: "模拟考试中" +}; +var PollsStatus = { + 1: "未发布", + 2: "提交中", + 3: "已截止", + 4: "已结束" +}; +/** + *@教学课堂tags集合生成 + *status为数组 status=["提交中","补交中"] + *任务状态数组: 未发布、提交中、评阅中、补交中、未开启补交等 + */ +var util_StatusClassroomsTags = function StatusClassroomsTags(props) { + var tags = { + 模拟考试中: { + class: 'tag-style bg-light-pink ml10' + }, + 已开启防作弊: { + class: 'tag-style-fzb ml10 iconfont icon-fangzuobi' + }, + 公开: { + class: 'tag-style bg-blue ml10' + }, + 已开启补交: { + class: 'tag-style bg-green ml10' + }, + 未开启补交: { + class: 'tag-style bg-pink ml10soft' + }, + 未发布: { + class: 'tag-style bgB8B8B8 ml10soft' + }, + 未开始: { + class: 'tag-style bg-c5d6ff ml10soft' + }, + 匿名作品: { + class: 'tag-style bg-cyan ml10' + }, + 已选择: { + class: 'tag-style bg-grey-ede ml10' + }, + 已结束: { + class: 'tag-style bg-grey-ede ml10soft' + }, + 提交中: { + class: 'tag-style bg-blue ml10soft' + }, + 进行中: { + class: 'tag-style bg-blue ml10soft' + }, + 匿评中: { + class: 'tag-style bg-blue ml10' + }, + 申诉中: { + class: 'tag-style bg-blue ml10' + }, + 考试中: { + class: 'tag-style bg-light-blue ml10' + }, + 补交中: { + class: 'tag-style bg-blue ml10soft' + }, + 评阅中: { + class: 'tag-style bg-blue ml10' + }, + 待选中: { + class: 'tag-style bg-blue ml10' + }, + 交叉评阅中: { + class: 'tag-style bg-light-orange ml10' + }, + 已开启交叉评阅: { + class: 'tag-style bg-lightblue-purple ml10' + }, + 待确认: { + class: 'tag-style bg-lightblue-purple ml10' + }, + 待处理: { + class: 'tag-style bg-lightblue-purple ml10' + }, + 私有: { + class: 'tag-style bg-lightblue-purple ml10' + }, + 未提交: { + class: 'tag-style bg-lightblue-purple ml10' + }, + 已确认: { + class: 'tag-style bg-light-pink ml10' + }, + 已发布: { + class: 'tag-style bg-light-blue ml10' + }, + 已截止: { + class: 'tag-style bg-light-pink ml10soft' + }, + 开发课程: { + class: 'tag-style bg-orange ml10' + }, + 已开播: { + class: 'tag-style-border border-green c-green ml10' + }, + 未开播: { + class: 'tag-style-border border-light-black ml10' + }, + // 样式需要调整 作业列表 + 按时通关: { + class: 'tag-style-border border-light-black ml10' + }, + 迟交通关: { + class: 'tag-style-border border-light-black ml10' + }, + 未通关: { + class: 'tag-style-border border-light-black ml10' + }, + 未开启: { + class: 'tag-style-border border-light-black ml10' + } + }; + var temporaryTags = { + 未发布: { + class: 'tag-style bg-C6CED6 ml10soft' + }, + 未开始: { + class: 'tag-style bg-C1E2FF ml10soft' + }, + 进行中: { + class: 'tag-style bg-1890FF ml10soft' + }, + 已截止: { + class: 'tag-style bg-E53333 ml10soft' + }, + 提交中: { + class: 'tag-style bg-1890FF ml10soft' + }, + 补交中: { + class: 'tag-style bg-44D7B6 ml10soft' + } + }; + if (props.temporary) { + tags = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, tags), temporaryTags); + } + var arr = []; + if (props.is_random) { + arr.push( /*#__PURE__*/react_default.a.createElement("span", { + className: "tag-style bg-blue ml10" + }, "\u968F\u673A")); + } + try { + props.status && props.status.map(function (v, k) { + arr.push( /*#__PURE__*/react_default.a.createElement("span", { + style: (props === null || props === void 0 ? void 0 : props.style) || [], + key: k, + className: tags[v] && tags[v]['class'] + }, v)); + }); + } catch (e) { + console.log('utils.status.tag:', e, props.status); + } + return arr; +}; +var util_exerciseTips = function exerciseTips(v) { + if (v === 1) { + return /*#__PURE__*/react_default.a.createElement("span", { + style: { + backgroundColor: '#B8B8B8' + }, + className: "tag-style ml5" + }, "\u672A\u5F00\u59CB"); + } + if (v === 2) { + return /*#__PURE__*/react_default.a.createElement("span", { + style: { + backgroundColor: '#007AFF' + }, + className: "tag-style ml5" + }, "\u8003\u8BD5\u4E2D"); + } + if (v === 3) { + return /*#__PURE__*/react_default.a.createElement("span", { + style: { + backgroundColor: '#FC2D6B' + }, + className: "tag-style ml5" + }, "\u5DF2\u7ED3\u675F"); + } +}; + +/** + *@教学课堂 实训作业状态 + *status值为number status=0 + *任务状态数组: 未发布、提交中、评阅中、补交中、未开启补交等 + */ +// "work_status": 2, //-1:重做中、 0:未提交、1:未通关,2:按时通关,3:迟交通关 +var util_WorkStatus = function WorkStatus(props) { + var _wStatus$props$status5, _wStatus$props$status6; + var wStatus = Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])({}, -1, { + name: '重做中', + class: 'c-orange' + }), 0, { + name: '未提交', + class: 'c-black' + }), 1, { + name: '未通关', + class: 'c-red' + }), 2, { + name: '按时通关', + class: 'c-green' + }), 3, { + name: '迟交通关', + class: 'c-orange' + }); + return /*#__PURE__*/react_default.a.createElement("span", { + className: (_wStatus$props$status5 = wStatus[props.status]) === null || _wStatus$props$status5 === void 0 ? void 0 : _wStatus$props$status5['class'] + }, (_wStatus$props$status6 = wStatus[props.status]) === null || _wStatus$props$status6 === void 0 ? void 0 : _wStatus$props$status6['name']); +}; + +/** + *@教学课堂 普通/分组作业状态 + *status值为number status=0 + *任务状态数组: 未发布、提交中、评阅中、补交中、未开启补交等 + */ +// "work_status": 2, //-1:重做中、 0:未提交、1:未通关,2:按时通关,3:迟交通关 +var util_CommonWorkStatus = function CommonWorkStatus(props) { + var _wStatus$props$status7, _wStatus$props$status8; + var wStatus = { + 0: { + name: '未提交', + class: 'c-black' + }, + 1: { + name: '按时提交', + class: 'c-green' + }, + 2: { + name: '延时提交', + class: 'c-red' + } + }; + return /*#__PURE__*/react_default.a.createElement("span", { + className: (_wStatus$props$status7 = wStatus[props.status]) === null || _wStatus$props$status7 === void 0 ? void 0 : _wStatus$props$status7['class'] + }, (_wStatus$props$status8 = wStatus[props.status]) === null || _wStatus$props$status8 === void 0 ? void 0 : _wStatus$props$status8['name']); +}; +var timego = function timego(dateTimeStamp) { + dateTimeStamp = new Date(dateTimeStamp).getTime(); + var minute = 1000 * 60; + var hour = minute * 60; + var day = hour * 24; + var result = ''; + var now = new Date().getTime(); + var diffValue = now - dateTimeStamp; + // console.log("diffValue:",now,dateTimeStamp,diffValue) + if (diffValue < 0) { + console.log('时间不对劲,服务器创建时间与当前时间不同步'); + return result = '刚刚'; + } + var dayC = parseInt(diffValue / day, 10); + var hourC = parseInt(diffValue / hour, 10); + var minC = parseInt(diffValue / minute, 10); + if (dayC > 30) { + result = '' + timeformat(dateTimeStamp, 'yyyy-MM-dd'); + } else if (dayC > 1) { + result = '' + dayC + '天前'; + } else if (dayC == 1) { + result = '昨天'; + } else if (hourC >= 1) { + result = '' + hourC + '小时前'; + } else if (minC >= 5) { + result = '' + minC + '分钟前'; + } else result = '刚刚'; + return result; +}; +/** + * 格式化时间 + * @param date Date 时间 + * @param format 格式化 "yyyy-MM-dd HH:mm:ss www"=format + * @returns {string} 格式化后字符串 + */ +var timeformat = function timeformat(date, format) { + if (typeof date == 'string') { + if (date.indexOf('T') >= 0) { + date = date.replace('T', ' '); + } + date = new Date(Date.parse(date.replace(/-/g, '/'))); + } + date = new Date(date); + var o = { + 'M+': date.getMonth() + 1, + 'd+': date.getDate(), + 'h+': date.getHours(), + 'm+': date.getMinutes(), + 's+': date.getSeconds(), + 'q+': Math.floor((date.getMonth() + 3) / 3), + S: date.getMilliseconds() + }; + var w = [['日', '一', '二', '三', '四', '五', '六'], ['周日', '周一', '周二', '周三', '周四', '周五', '周六'], ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']]; + if (/(y+)/.test(format)) { + format = format.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length)); + } + if (/(w+)/.test(format)) { + format = format.replace(RegExp.$1, w[RegExp.$1.length - 1][date.getDay()]); + } + for (var k in o) { + if (new RegExp('(' + k + ')').test(format)) { + format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length)); + } + } + return format; +}; + +/** + * @时间转换 + * @传值为时间 单位s + * @返回值 1分40秒 + * @列子 toTimeFormat(100) 返回 1分40秒 +*/ + +var toTimeFormat = function toTimeFormat(time) { + if (!time || time < 0) return '0秒'; + console.log("time:", time); + var minute = 60; + var hour = minute * 60; + var day = hour * 24; + var dayC = time / day; + var hourC = time / hour; + var minC = time / minute; + var senC = time % 60; + if (dayC >= 1) { + return parseInt(dayC.toString()) + '天' + Math.floor(hourC % 24) + '时' + Math.floor(minC % 60) + "分" + Math.floor(time % 60) + '秒'; + } else if (hourC > 1) { + return parseInt(hourC.toString()) + '时' + Math.floor(minC % 60) + "分" + Math.floor(time % 60) + '秒'; + } else if (minC >= 1) { + return parseInt(minC.toString()) + "分" + Math.floor(time % 60) + '秒'; + } else { + return Math.ceil(time) + '秒'; + } +}; + +/** + * @校验字符串长度 +*/ +var validateLength = function validateLength() { + var str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; + var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; + var len = 0; + if (str) { + len = str.length; + for (var i = 0; i < len; i++) { + var charCode = str.charCodeAt(i); + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + len--; + i++; + } + } + } + return len <= length; +}; +var handleValidatorNickName = function handleValidatorNickName(rule, value, callback) { + if (value) { + var iconRule1 = /[`~!@#$%^&*()\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/im; + // 判断是否含有emoji表情 + var iconRule2 = /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/ig; + // 如果为true,字符串含有emoji表情 ,false不含 + var iconRule2s = iconRule2.test(value); + // 如果为true,字符串含有特殊符号 ,false不 + var iconRule1s = iconRule1.test(value); + if (iconRule2s === true || iconRule1s === true) { + callback('2-20位中英文、数字及下划线'); + } else if (value.length < 2) { + callback('2-20位中英文、数字及下划线'); + } else if (value.length >= 21) { + callback('2-20位中英文、数字及下划线'); + } + } + callback(); +}; +var handleValidatorName = function handleValidatorName(rule, value, callback) { + if (value) { + var iconRule1 = /[`~!@#$%^&()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&()——\-+={}|《》?:“”【】、;‘’,。、]/im; + // 判断是否含有emoji表情 + var iconRule2 = /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/ig; + // 如果为true,字符串含有emoji表情 ,false不含 + var iconRule2s = iconRule2.test(value); + // 如果为true,字符串含有特殊符号 ,false不 + var iconRule1s = iconRule1.test(value); + if (iconRule2s === true || iconRule1s === true) { + callback('2-10位中英文、数字'); + } else if (value.length < 2) { + callback('2-10位中英文、数字'); + } else if (value.length >= 11) { + callback('2-10位中英文、数字'); + } + } + callback(); +}; +var getHiddenName = function getHiddenName(name) { + if (!name) return ''; + var len = name.length - 1; + var str = ""; + for (var i = 0; i < len; i++) { + str += "*"; + } + var newName = name.substr(0, 1) + str; + return newName; +}; +var getBase64 = function getBase64(img, callback) { + var reader = new FileReader(); + reader.addEventListener('load', function () { + return callback(reader.result); + }); + reader.readAsDataURL(img); +}; +function setmiyah(logins) { + var opens = "79e33abd4b6588941ab7622aed1e67e8"; + return md5_default()(opens + logins); +} +var getCookie = function getCookie(key) { + var arr, + reg = RegExp('(^| )' + key + '=([^;]+)(;|$)'); + if (arr = document.cookie.match(reg)) + //["username=liuwei;", "", "liuwei", ";"] + return decodeURIComponent(arr[2]);else return null; +}; +// 设置cookie +function setCookie(cname, cvalue, exdays) { + // exdays = exdays || 30; + var d = new Date(); + d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000); + var expires = "expires=" + d.toUTCString(); + document.cookie = cname + "=" + cvalue + "; " + expires + ";path=/;"; +} +var delCookie = function delCookie(name) { + document.cookie = name + "=; expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/;"; +}; +function downLoadLink(title, url) { + var link = document.createElement('a'); + document.body.appendChild(link); + link.href = url; + if (title) { + link.title = title; + link.download = title; + } + //兼容火狐浏览器 + var evt = document.createEvent("MouseEvents"); + evt.initEvent("click", false, false); + link.dispatchEvent(evt); + document.body.removeChild(link); +} + +/** + * 获取 blob + * @param {String} url 目标文件地址 + * @return {Promise} + */ +function getBlob(url) { + return new Promise(function (resolve) { + var xhr = new window.XMLHttpRequest(); + xhr.open('GET', url, true); + xhr.withCredentials = true; + xhr.responseType = 'blob'; + xhr.onload = function () { + if (xhr.status === 200) { + resolve(xhr.response); + } + }; + xhr.send(); + }); +} + +/** +* 保存 +* @param {Blob} blob +* @param {String} filename 想要保存的文件名称 +*/ +function saveAs(blob, filename) { + if (window.navigator.msSaveOrOpenBlob) { + window.navigator.msSaveBlob(blob, filename); + } else { + var link = document.createElement('a'); + var body = document.querySelector('body'); + link.href = window.URL.createObjectURL(blob); + link.download = filename; + + // fix Firefox + link.style.display = 'none'; + body.appendChild(link); + link.click(); + body.removeChild(link); + window.URL.revokeObjectURL(link.href); + } +} + +/** +* 下载 +* @param {String} url 目标文件地址 +* @param {String} filename 想要保存的文件名称 +*/ +function download(url, filename) { + // if(url?.indexOf("aliyuncs.com") > -1){ + // downLoadLink(filename,url) + // }else{ + getBlob(url).then(function (blob) { + saveAs(blob, filename); + }); + // } +} +function downLoadFileIframe(title, url) { + return new Promise(function (resolve, reject) { + var downloadFileUrl = url; + var elemIF = document.createElement("iframe"); + var time; + document.body.appendChild(elemIF); + elemIF.src = downloadFileUrl; + elemIF.style.display = "none"; + elemIF.addEventListener("load", function () { + setTimeout(function () { + document.body.removeChild(elemIF); + }, 1000); + }, true); + time = setInterval(function () { + if (getCookie("fileDownload")) { + delCookie("fileDownload"); + clearInterval(time); + resolve(); + } + }, 1000); + }); +} +function downLoadFile(title, url) { + downLoadLink(title, url); +} + +/** + *@url参数拼接 + *options为对象 {search=1,page:2} to search=1&page=2 + */ +var setUrlQuery = function setUrlQuery(options) { + var url = options.url, + query = options.query; + if (!url) return ''; + if (query) { + var queryArr = []; + var _loop = function _loop(_key) { + if (query.hasOwnProperty(_key) && !isUnOrNull(query[_key])) { + if (typeof query[_key] === "object") { + query[_key].map(function (v) { + queryArr.push("".concat(_key, "[]=").concat(v)); + }); + } else { + queryArr.push("".concat(_key, "=").concat(query[_key])); + } + } + }; + for (var _key in query) { + _loop(_key); + } + if (url.indexOf('?') !== -1) { + url = "".concat(url, "&").concat(queryArr.join('&')); + } else { + url = "".concat(url, "?").concat(queryArr.join('&')); + } + console.log('url1111', url); + } + return url; +}; +function isPc() { + var userAgentInfo = navigator.userAgent; + var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"]; + var flag = true; + for (var v = 0; v < Agents.length; v++) { + if (userAgentInfo.indexOf(Agents[v]) > 0) { + flag = false; + break; + } + } + return flag; +} +function isChrome() { + var userAgentInfo = navigator.userAgent; + var Agents = ['Chrome']; + return Agents.some(function (item) { + return userAgentInfo.indexOf(item) > -1 ? true : false; + }); +} +function isChromeOrFirefox() { + var userAgentInfo = navigator.userAgent; + var Agents = ['Chrome', 'Firefox']; + return Agents.some(function (item) { + return userAgentInfo.indexOf(item) > -1 ? true : false; + }); +} +var formatMoney = function formatMoney() { + var _value$toString; + var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; + return value === null || value === void 0 ? void 0 : (_value$toString = value.toString()) === null || _value$toString === void 0 ? void 0 : _value$toString.replace(/\B(?=(\d{3})+(?!\d))/g, ','); +}; +var openNewWindow = function openNewWindow(url) { + var link = document.createElement('a'); + link.target = "_blank"; + document.body.appendChild(link); + link.href = url; + var evt = document.createEvent("MouseEvents"); + evt.initEvent("click", false, false); + link.dispatchEvent(evt); + document.body.removeChild(link); +}; +var formatTextMiddleIntercept = function formatTextMiddleIntercept() { + var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; + if (text.length <= 6) { + return text; + } + return "".concat(text.substring(0, 3), "...").concat(text.substring(text.length - 3, text.length)); +}; +var HalfPastOne = function HalfPastOne() { + var hours = new Date().getHours(); + var minute = new Date().getMinutes(); + if (minute >= 30) { + hours++; + minute = "00"; + } else { + minute = "30"; + } + return hours + ':' + minute; +}; +var DayHalfPastOne = function DayHalfPastOne() { + var reg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '-'; + var hours = new Date().getHours(); + var minute = new Date().getMinutes(); + if (minute >= 30) { + hours++; + minute = "00"; + } else { + minute = "30"; + } + return new Date().toLocaleDateString().replace(/\//g, reg) + ' ' + hours + ':' + minute; +}; +var Type = /*#__PURE__*/function (Type) { + Type["Number"] = "Number"; + Type["String"] = "String"; + Type["Boolean"] = "Boolean"; + Type["Object"] = "Object"; + Type["Array"] = "Array"; + Type["Function"] = "Function"; + return Type; +}(Type || {}); +var util_type = function type(obj) { + var type = Object.prototype.toString.call(obj); + return type.substring(8, type.length - 1); +}; +var isEmpty = function isEmpty(obj) { + if (util_type(obj) === Type.Array) { + return obj.length === 0; + } + if (util_type(obj) === Type.Object) { + return Object.keys(obj).length === 0; + } + return !obj; +}; +var rangeNumber = function rangeNumber(start, end) { + var result = []; + for (var i = start; i < end; i++) { + result.push(i); + } + return result; +}; +var middleEllipsis = function middleEllipsis(text) { + var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 12; + var firstStart = len / 2 - 2; + var endStart = len / 2 + 3; + if (text.length > len) { + return text.substr(0, firstStart) + '...' + text.substr(endStart, len); + } else { + return text; + } +}; +var formatRate = function formatRate(rate) { + if (rate > 4.5) { + return 5; + } else if (rate > 4 && rate <= 4.5) { + return 4.5; + } else if (rate > 3.5 && rate <= 4) { + return 4; + } else if (rate > 3 && rate <= 3.5) { + return 3.5; + } else if (rate > 2.5 && rate <= 3) { + return 3; + } else if (rate > 2 && rate <= 2.5) { + return 2.5; + } else if (rate > 1.5 && rate <= 2) { + return 2; + } else if (rate > 1 && rate <= 1.5) { + return 1.5; + } else if (rate > 0.5 && rate <= 1) { + return 1; + } else if (rate > 0 && rate <= 0.5) { + return 0.5; + } else { + return 0; + } +}; +var isUnOrNull = function isUnOrNull(val) { + return val === undefined || val === null; +}; +//获取?号后面的数据 +function getUrlToken(name, str) { + var reg = new RegExp("(^|&)".concat(name, "=([^&]*)(&|$)"), "i"); + var r = str.substr(1).match(reg); + if (r != null) return decodeURIComponent(r[2]); + return null; +} +var util_getMessagesUrl = function getMessagesUrl(item) { + switch (item.container_type) { + case "ApplyUserAuthentication": + if (item.tiding_type === "Apply") { + if (item.auth_type === 1) { + //系统管理页面 + return window.open("/admins/identity_authentications"); + } + if (item.auth_type === 2) { + //系统管理页面 + return window.open("/admins/professional_authentications"); + } + } + if (item.tiding_type === "System") { + // 账号管理页-认证信息 + return window.open("/account/certification"); + } + return; + case "CancelUserAuthentication": + // 账号管理页-认证信息 + return window.open("/account/certification"); + case "CancelUserProCertification": + // 账号管理页-认证信息 + return window.open("/account/certification"); + case "ApplyAddDepartment": + if (item.tiding_type === "Apply") { + //部门审批 + return window.open("/admins/department_applies"); + } + if (item.tiding_type === "System") { + // 账号管理页/account/profile + return window.open("/account/profile"); + } + return; + case "ApplyAddSchools": + if (item.tiding_type === "Apply") { + // 单位审批 + return window.open("/admins/unit_applies"); + } + if (item.tiding_type === "System") { + // 账号管理页 + return window.open("/account/profile"); + } + return; + case "ApplyAction": + switch (item.parent_container_type) { + case "ApplyShixun": + if (item.tiding_type === "Apply") { + return window.open("/admins/shixun_authorizations"); + } + if (item.tiding_type === "System") { + // 实训详情页 :identifier = identifier + return window.open("/shixuns/".concat(item.identifier, "/challenges")); + } + case "ApplySubject": + if (item.tiding_type === "Apply") { + // 实训课程发布 + return window.open("/admins/subject_authorizations"); + } + if (item.tiding_type === "System") { + // 课程汇总详情页 :parent_container_id = parent_container_id + + return window.open("/paths/".concat(item.parent_container_id)); + } + case "TrialAuthorization": + if (item.tiding_type === "Apply") { + // 试用授权页面 + return window.open("/managements/trial_authorization"); + } + if (item.tiding_type === "System") { + // 账号管理页 + return window.open("/account/profile"); + } + } + return; + case 'JoinCourse': + // 课堂详情页 :id = + return window.open("/classrooms/".concat(item.belong_container_id, "/teachers")); + case 'StudentJoinCourse': + // 课堂详情页 :id = container_id + if (item.tiding_type === 'Apply') { + return window.open("/classrooms/".concat(item.belong_container_id, "/teachers")); + } + if (item.tiding_type === 'System') { + //教学案例详情 :id = container_id + return window.open("/classrooms/".concat(item.belong_container_id, "/students")); + } + case 'DealCourse': + // 课堂详情页 :id = container_id + return window.open("/classrooms/".concat(item.belong_container_id, "/shixun_homework/")); + case 'TeacherJoinCourse': + // 课堂详情页 :id = container_id + return window.open("/classrooms/".concat(item.belong_container_id, "/shixun_homework/")); + case 'Course': + // 课堂详情页 :id = container_id + if (item.tiding_type === "Delete") { + return; + } + return window.open("/classrooms/".concat(item.belong_container_id, "/shixun_homework/")); + case 'ArchiveCourse': + // 课堂详情页 :id = container_id + return window.open("/classrooms/".concat(item.belong_container_id, "/shixun_homework/")); + case "Shixun": + return window.open("/shixuns/".concat(item.identifier, "/challenges")); + case "Subject": + // 课程汇总详情页 :id = container_id + return window.open("/paths/".concat(item.container_id)); + case "JournalsForMessage": + switch (item.parent_container_type) { + case "Principal": + // 反馈页 :id = parent_container_id + // 不用跳了 + return ''; + case "HomeworkCommon": + //学生作业页 homework = parent_container_id + if (item.homework_type === "normal") { + //普通作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/common_homework/").concat(item.parent_container_id, "/question")); + } + if (item.homework_type === "group") { + //分组作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/group_homework/").concat(item.parent_container_id, "/question")); + } + if (item.homework_type === "practice") { + //实训作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/shixun_homework/").concat(item.parent_container_id, "/detail?tabs=1")); + } + return ""; + case "GraduationTopic": + // 毕业目标页 parent_container_id + return window.open("/classrooms/".concat(item.belong_container_id, "/graduation_topics/").concat(item.parent_container_id, "/detail")); + case "StudentWorksScore": + //学生作业页 + if (item.homework_type === "normal") { + //普通作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/common_homework/").concat(item.parent_container_id, "/question")); + } + if (item.homework_type === "group") { + //分组作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/group_homework/").concat(item.parent_container_id, "/question")); + } + if (item.homework_type === "practice") { + //实训作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/shixun_homework/").concat(item.parent_container_id, "/detail?tabs=1")); + } + return ""; + } + case "Memo": + // 交流问答页 :id = parent_container_id + return window.open("/forums/".concat(item.parent_container_id)); + case "Message": + // 交流问答页 :id = parent_container_id + return window.open("/forums/"); + case "Watcher": + // 用户个人中心页 :id = item.trigger_user.login + return window.open("/users/".concat(item.trigger_user.login, "/classrooms")); + case "PraiseTread": + // 这块太复杂 不好处理 + return ''; + case "Grade": + //个人中心页 :id = item.trigger_user.login + // return window.open(`/users/${userInfo()?.login}/classrooms`; + return ""; + case "JoinProject": + //项目详情-申请加入项目审核页 :id = container_id + return window.open(env["a" /* default */].FORGE + item.project_url); + // return window.open(`/projects/${item.container_id}`) + case 'ReporterJoinProject': + //项目详情页 :id = container_id + return window.open(env["a" /* default */].FORGE + item.project_url); + // return window.open(`/projects/${item.container_id}`) + case 'DealProject': + //项目详情页 :id = container_id + return window.open(env["a" /* default */].FORGE + item.project_url); + // return window.open(`/projects/${item.container_id}`) + case 'ManagerJoinProject': + //项目详情页 :id = container_id + return window.open(env["a" /* default */].FORGE + item.project_url); + // return window.open(`/projects/${item.container_id}`) + case "Poll": + switch (item.parent_container_type) { + case "CommitPoll": + // 课堂id belong_container_id + //课堂-学生已提交问卷列表 :id = container_id + return window.open("\t/classrooms/".concat(item.belong_container_id, "/poll/").concat(item.container_id, "/detail")); + default: + // 课堂-问卷列表 :id = container_id + return window.open("\t/classrooms/".concat(item.belong_container_id, "/poll/").concat(item.container_id, "/detail")); + } + case "Exercise": + switch (item.parent_container_type) { + case "CommitExercise": + // 课堂-学生试卷详情 :id = container_id :user_id = trigger_user.id + return window.open("\t/classrooms/".concat(item.belong_container_id, "/exercise/").concat(item.container_id, "/detail?tab=0")); + //记得跳评阅页面 + case "ExerciseScore": + // 课堂-学生试卷详情 :id = container_id :user_id = trigger_user.id + return window.open("\t/classrooms/".concat(item.belong_container_id, "/exercise/").concat(item.container_id, "/detail?tab=0")); + //记得跳评阅页面 + default: + // 课堂-试卷列表详情 :id = container_id + return window.open("/classrooms/".concat(item.belong_container_id, "/exercise/").concat(item.container_id, "/detail?tab=0")); + } + case 'StudentGraduationTopic': + //课堂-毕业选题详情 :id = parent_container_id + return window.open("/classrooms/".concat(item.belong_container_id, "/graduation_topics/").concat(item.parent_container_id, "/detail")); + case 'DealStudentTopicSelect': + //课堂-毕业选题详情 :id = parent_container_id + return window.open("/classrooms/".concat(item.belong_container_id, "/graduation_topics/").concat(item.parent_container_id, "/detail")); + case 'GraduationTask': + //课堂-毕业任务页 :id = container_id + return window.open("/classrooms/".concat(item.belong_container_id, "/graduation_tasks/").concat(item.container_id)); + case "GraduationWork": + //课堂-毕业xx页 :id = container_id + return window.open("/classrooms/".concat(item.belong_container_id, "/graduation_tasks/").concat(item.container_id)); + case "GraduationWorkScore": + // 课堂-毕业xx页 :id = parent_container_id + return window.open("/classrooms/".concat(item.belong_container_id, "/graduation_tasks/").concat(item.parent_container_id)); + case "HomeworkCommon": + switch (item.parent_container_type) { + case "AnonymousCommentFail": + // 课堂-作业列表 homework = container_id + if (item.homework_type === "normal") { + //普通作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/common_homework/").concat(item.parent_container_id, "/detail")); + } + if (item.homework_type === "group") { + //分组作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/group_homework/").concat(item.parent_container_id, "/detail")); + } + if (item.homework_type === "practice") { + //实训作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/shixun_homework/").concat(item.parent_container_id, "/detail?tabs=0")); + } + case "HomeworkPublish": + if (item.homework_type === "normal") { + //普通作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/common_homework/").concat(item.parent_container_id, "/detail")); + } + if (item.homework_type === "group") { + //分组作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/group_homework/").concat(item.parent_container_id, "/detail")); + } + if (item.homework_type === "practice") { + //实训作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/shixun_homework/").concat(item.parent_container_id, "/detail?tabs=0")); + } + case "AnonymousAppeal": + if (item.homework_type === "normal") { + //普通作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/common_homework/").concat(item.parent_container_id, "/detail")); + } + if (item.homework_type === "group") { + //分组作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/group_homework/").concat(item.parent_container_id, "/detail")); + } + if (item.homework_type === "practice") { + //实训作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/shixun_homework/").concat(item.parent_container_id, "/detail?tabs=0")); + } + default: + // 课堂-作业列表 homework = container_id + if (item.homework_type === "normal") { + //普通作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/common_homework/").concat(item.parent_container_id, "/detail")); + } + if (item.homework_type === "group") { + //分组作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/group_homework/").concat(item.parent_container_id, "/detail")); + } + if (item.homework_type === "practice") { + //实训作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/shixun_homework/").concat(item.parent_container_id, "/detail?tabs=0")); + } + } + case "StudentWork": + //课堂-作业 :id = container_id + if (item.homework_type === "normal") { + //普通作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/common_homework/").concat(item.parent_container_id, "/review/").concat(item.container_id)); + } + if (item.homework_type === "group") { + //分组作业/classrooms/1208/group_homework/22373/1219130/appraise + return window.open("/classrooms/".concat(item.belong_container_id, "/group_homework/").concat(item.parent_container_id, "/review/").concat(item.container_id)); + } + if (item.homework_type === "practice") { + //实训作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/shixun_homework/").concat(item.parent_container_id, "/detail")); + } + case "StudentWorksScore": + return window.open("/classrooms/".concat(item.belong_container_id, "/common_homework/").concat(item.trigger_user.id, "/review/").concat(item.parent_container_id)); + case "StudentWorksScoresAppeal": + return window.open("/classrooms/".concat(item.belong_container_id, "/common_homework/").concat(item.trigger_user.id, "/review/").concat(item.parent_container_id)); + case "ChallengeWorkScore": + return ''; + case "SendMessage": + // /managements/mirror_repository + // return window.open(`/managements/mirror_repository`) + return window.open("".concat(env["a" /* default */].API_SERVER, "/admins/mirror_repositories")); + case "Journal": + //项目Issue页 :id = parent_container_id + return window.open("/issues/".concat(item.parent_container_id)); + case "Issue": + //项目Issue页 :id = container_id + return window.open("/issues/".concat(item.container_id)); + case "PullRequest": + // 项目pull request页 :id = parent_container_id + return window.open(env["a" /* default */].FORGE + item.project_url); + // return window.open(`/projects/${item.parent_container_id}/pull_requests`) + case "Department": + //账号管理页 + return window.open("/account/profile"); + case "Library": + if (item.tiding_type === 'Apply') { + // /managements/library_applies + return window.open("/admins/library_applies"); + } + if (item.tiding_type === 'System') { + //教学案例详情 :id = container_id + return window.open("/moop_cases/".concat(item.container_id)); + } + case "ProjectPackage": + if (item.tiding_type === "Destroyed") { + return; + } + if (item.tiding_type === "Destroyed_end") { + return; + } else { + if (item.tiding_type === 'Apply') { + ///managements/project_package_applies + return window.open("/admins/project_package_applies"); + } + // if(item.tiding_type === 'System'){ + //众包详情 :id = container_id + return window.open("/crowdsourcing/".concat(item.container_id)); + // } + } + case "Discuss": + if (item.parent_container_type === 'Hack' && item.extra) { + return window.open("/myproblems/".concat(item.extra, "/comment")); + } else { + return window.open("/shixuns/".concat(item.identifier, "/shixun_discuss")); + } + case "Video": + if (item.tiding_type === "Apply") { + return window.open("/admins/video_applies"); + } else if (item.tiding_type === "System") { + var _userInfo; + return window.open("/users/".concat((_userInfo = Object(authority["f" /* userInfo */])()) === null || _userInfo === void 0 ? void 0 : _userInfo.login, "/videos")); + } + return ''; + case "PublicCourseStart": + return window.open("/classrooms/".concat(item.container_id, "/informs")); + case "SubjectStartCourse": + return window.open("/paths/".concat(item.container_id)); + case "ResubmitStudentWork": + if (item.homework_type === "normal") { + //普通作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/common_homework/").concat(item.parent_container_id, "/").concat(item.container_id, "/appraise")); + } + if (item.homework_type === "group") { + //分组作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/group_homework/").concat(item.parent_container_id, "/").concat(item.container_id, "/appraise")); + } + case "AdjustScore": + //belong_container_id course的id + if (item.homework_type === "normal") { + //普通作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/common_homework/").concat(item.parent_container_id)); + } + if (item.homework_type === "group") { + //分组作业 + return window.open("/classrooms/".concat(item.belong_container_id, "/group_homework/").concat(item.parent_container_id)); + } + case 'LiveLink': + return window.open("/classrooms/".concat(item.belong_container_id, "/course_videos?open=live")); + case 'Hack': + if (item.extra && item.parent_container_type !== 'HackDelete') { + return window.open("/problems/".concat(item.extra, "/edit")); + } + default: + return; + } +}; +var util_checkLocalOrPublicIp = function checkLocalOrPublicIp(v) { + var ip, modal; + return new Promise( /*#__PURE__*/function () { + var _ref = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolve, reject) { + var res; + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + if (!(v.ip_limit !== 'no' || v.ip_bind)) { + _context.next = 4; + break; + } + _context.next = 3; + return ip_findLocalIp({ + ip_limit: v === null || v === void 0 ? void 0 : v.ip_limit, + ip_bind: v === null || v === void 0 ? void 0 : v.ip_bind + }); + case 3: + ip = _context.sent; + case 4: + _context.next = 6; + return Object(exercise["d" /* checkIp */])({ + id: v.exerciseId, + ip: ip + }); + case 6: + res = _context.sent; + if (res.status === 0) { + resolve(res); + } else { + reject(res); + } + if (!v.errmsgHide) { + _context.next = 10; + break; + } + return _context.abrupt("return", true); + case 10: + if (!(res.status === -1)) { + _context.next = 15; + break; + } + modal = es_modal["a" /* default */].info({ + title: /*#__PURE__*/react_default.a.createElement(row["a" /* default */], null, /*#__PURE__*/react_default.a.createElement(col["a" /* default */], { + flex: "1" + }, "\u63D0\u793A"), /*#__PURE__*/react_default.a.createElement(col["a" /* default */], null, /*#__PURE__*/react_default.a.createElement("span", { + className: "iconfont icon-yiguanbi1 current c-grey-c", + onClick: function onClick() { + return modal.destroy(); + } + }))), + icon: null, + className: "custom-modal-divider", + content: /*#__PURE__*/react_default.a.createElement("div", { + className: "font16 p20" + }, "\u60A8\u7684IP\u4E0D\u5728\u8003\u8BD5\u5141\u8BB8\u7684\u8303\u56F4\u5185\uFF01"), + okText: "我知道了" + }); + return _context.abrupt("return", false); + case 15: + if (!(res.status === -2)) { + _context.next = 18; + break; + } + modal = es_modal["a" /* default */].info({ + title: /*#__PURE__*/react_default.a.createElement(row["a" /* default */], null, /*#__PURE__*/react_default.a.createElement(col["a" /* default */], { + flex: "1" + }, "\u63D0\u793A"), /*#__PURE__*/react_default.a.createElement(col["a" /* default */], null, /*#__PURE__*/react_default.a.createElement("span", { + className: "iconfont icon-yiguanbi1 current c-grey-c", + onClick: function onClick() { + return modal.destroy(); + } + }))), + icon: null, + className: "custom-modal-divider", + content: /*#__PURE__*/react_default.a.createElement("div", { + className: "font16 p20" + }, "\u60A8\u5DF2\u7ED1\u5B9A\u5F53\u524D\u8003\u8BD5IP\u5730\u5740\uFF1A", /*#__PURE__*/react_default.a.createElement("span", { + className: "c-red" + }, res.ip), "\u8BF7\u4F7F\u7528\u8BE5IP\u5730\u5740\u8FDB\u5165\u8003\u8BD5\u3002"), + okText: "我知道了" + }); + return _context.abrupt("return", false); + case 18: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function (_x, _x2) { + return _ref.apply(this, arguments); + }; + }()); +}; +var startExercise = /*#__PURE__*/function () { + var _ref2 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(v) { + var modal; + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + if (!(location.pathname.indexOf("/classrooms/4RW9CYHY") > -1 && !isPc())) { + _context2.next = 3; + break; + } + es_modal["a" /* default */].info({ + content: "请使用电脑参加考试!" + }); + return _context2.abrupt("return"); + case 3: + if (!(v.ip_limit !== 'no' || v.ip_bind)) { + _context2.next = 9; + break; + } + _context2.next = 6; + return util_checkLocalOrPublicIp(v); + case 6: + if (isChrome()) { + _context2.next = 9; + break; + } + es_modal["a" /* default */].info({ + icon: null, + okText: "确定", + width: 500, + content: /*#__PURE__*/react_default.a.createElement("div", { + className: "font16" + }, "\u672C\u6B21\u8003\u8BD5\u5DF2\u5F00\u542F\u9632\u4F5C\u5F0A\u8BBE\u7F6E\uFF0C\u4EC5\u652F\u6301", /*#__PURE__*/react_default.a.createElement("span", { + className: "c-red" + }, "\u8C37\u6B4C"), "\u3002", /*#__PURE__*/react_default.a.createElement("br", null), "\u8BF7\u4F7F\u7528", /*#__PURE__*/react_default.a.createElement("span", { + className: "c-red" + }, "\u8C37\u6B4C"), "\u6D4F\u89C8\u5668\u5F00\u59CB\u8003\u8BD5\u3002") + }); + return _context2.abrupt("return"); + case 9: + ; + if (!(v.open_camera || v.screen_open || v.ip_limit !== 'no' || v.ip_bind || v.identity_verify)) { + _context2.next = 17; + break; + } + if (isChromeOrFirefox()) { + _context2.next = 14; + break; + } + es_modal["a" /* default */].info({ + icon: null, + okText: "确定", + width: 500, + content: /*#__PURE__*/react_default.a.createElement("div", { + className: "font16" + }, "\u672C\u6B21\u8003\u8BD5\u5DF2\u5F00\u542F\u9632\u4F5C\u5F0A\u8BBE\u7F6E\uFF0C\u4EC5\u652F\u6301", /*#__PURE__*/react_default.a.createElement("span", { + className: "c-red" + }, "\u8C37\u6B4C"), "\u3001", /*#__PURE__*/react_default.a.createElement("span", { + className: "c-red" + }, "\u706B\u72D0"), "\u6D4F\u89C8\u5668\u3002", /*#__PURE__*/react_default.a.createElement("br", null), "\u8BF7\u4F7F\u7528", /*#__PURE__*/react_default.a.createElement("span", { + className: "c-red" + }, "\u8C37\u6B4C"), "\u3001", /*#__PURE__*/react_default.a.createElement("span", { + className: "c-red" + }, "\u706B\u72D0"), "\u6D4F\u89C8\u5668\u5F00\u59CB\u8003\u8BD5\u3002") + }); + return _context2.abrupt("return", false); + case 14: + modal = es_modal["a" /* default */].info({ + title: /*#__PURE__*/react_default.a.createElement(row["a" /* default */], null, /*#__PURE__*/react_default.a.createElement(col["a" /* default */], { + flex: "1" + }, "\u8003\u8BD5\u8BF4\u660E"), /*#__PURE__*/react_default.a.createElement(col["a" /* default */], null, /*#__PURE__*/react_default.a.createElement("span", { + className: "iconfont icon-yiguanbi1 current c-grey-c", + onClick: function onClick() { + return modal.destroy(); + } + }))), + width: 700, + icon: null, + className: "custom-modal-divider", + content: /*#__PURE__*/react_default.a.createElement("div", { + className: "font16 p20" + }, v.identity_verify && /*#__PURE__*/react_default.a.createElement(row["a" /* default */], { + align: "middle", + justify: "start", + className: "mt20" + }, /*#__PURE__*/react_default.a.createElement(col["a" /* default */], { + flex: "45px" + }, /*#__PURE__*/react_default.a.createElement("span", { + className: "iconfont icon-kaiqishexiangtou c-blue mr20 font24" + })), /*#__PURE__*/react_default.a.createElement(col["a" /* default */], { + flex: "1" + }, "\u8FDB\u5165\u8003\u8BD5\u524D\uFF0C\u8BF7\u5141\u8BB8\u6444\u50CF\u5934\u6388\u6743\uFF0C\u6388\u6743\u540E\u9700\u91C7\u96C6\u7167\u7247\u8BA4\u8BC1\uFF0C\u8BA4\u8BC1\u901A\u8FC7\u5E76\u5F00\u542F\u624B\u673A\u5F55\u5236\u624D\u53EF\u4EE5\u8FDB\u5165\u8003\u8BD5\u3002", !checkIsClientExam() && /*#__PURE__*/react_default.a.createElement("a", { + target: "_blank", + href: "https://www.educoder.net/forums/4459" + }, "\u65E0\u6CD5\u8C03\u7528\u6444\u50CF\u5934\uFF1F"))), v.open_camera && /*#__PURE__*/react_default.a.createElement(row["a" /* default */], { + align: "middle", + justify: "start", + className: "mt20" + }, /*#__PURE__*/react_default.a.createElement(col["a" /* default */], null, /*#__PURE__*/react_default.a.createElement("span", { + className: "iconfont icon-kaiqishexiangtou c-blue mr20 font24" + })), /*#__PURE__*/react_default.a.createElement(col["a" /* default */], null, "\u8FDB\u5165\u8003\u8BD5\u540E\uFF0C\u8BF7\u5141\u8BB8\u6444\u50CF\u5934\u6388\u6743\uFF0C\u6388\u6743\u540E\u6253\u5F00\u6444\u50CF\u5934\u65B9\u53EF\u4F5C\u7B54\uFF01", !checkIsClientExam() && /*#__PURE__*/react_default.a.createElement("a", { + target: "_blank", + href: "https://www.educoder.net/forums/4459" + }, "\u65E0\u6CD5\u8C03\u7528\u6444\u50CF\u5934\uFF1F"))), v.screen_open && /*#__PURE__*/react_default.a.createElement(row["a" /* default */], { + justify: "start", + className: "mt20" + }, /*#__PURE__*/react_default.a.createElement(col["a" /* default */], { + flex: "24px", + className: "mr20" + }, /*#__PURE__*/react_default.a.createElement("span", { + className: "iconfont icon-kaiqifangqieping c-blue font24" + })), /*#__PURE__*/react_default.a.createElement(col["a" /* default */], { + flex: "1" + }, "\u5F53\u524D\u8003\u8BD5\u5DF2\u5F00\u542F\u9632\u5207\u5C4F\uFF0C\u5207\u5C4F\u8D85\u8FC7", v.screen_num, "\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377\u3002\uFF08\u9000\u51FA\u5168\u5C4F\u5C06\u5224\u5B9A\u4E3A\u5207\u5C4F\u4E00\u6B21\uFF0C\u8003\u8BD5\u8FC7\u7A0B\u4E2D\u8BF7\u52FF\u9000\u51FA\u5168\u5C4F\uFF09", !checkIsClientExam() && /*#__PURE__*/react_default.a.createElement("a", { + target: "_blank", + href: "https://www.educoder.net/forums/4460" + }, "\u6D4F\u89C8\u5668\u65E0\u6CD5\u81EA\u52A8\u5168\u5C4F\uFF1F"))), (v.inner_ip !== '' || v.public_ip !== '') && v.ip_limit !== 'no' && /*#__PURE__*/react_default.a.createElement(row["a" /* default */], { + justify: "start", + className: "mt20" + }, /*#__PURE__*/react_default.a.createElement(col["a" /* default */], { + flex: "24px", + className: "mr20" + }, /*#__PURE__*/react_default.a.createElement("span", { + className: "iconfont icon-IP c-blue font24" + })), /*#__PURE__*/react_default.a.createElement(col["a" /* default */], { + flex: "1" + }, "\u5F53\u524D\u8003\u8BD5\u5DF2\u5F00\u542FIP\u8303\u56F4\u9650\u5B9A\u3002IP\u5730\u5740\u4E0D\u5728\u8303\u56F4\u5185\u4E0D\u53EF\u53C2\u52A0\u8003\u8BD5\u3002", /*#__PURE__*/react_default.a.createElement("br", null), !checkIsClientExam() && /*#__PURE__*/react_default.a.createElement(react_default.a.Fragment, null, /*#__PURE__*/react_default.a.createElement("span", { + className: "c-red" + }, "\uFF08\u53EA\u5141\u8BB8\u5728Chrome\u8C37\u6B4C\u6D4F\u89C8\u5668\u4F5C\u7B54\uFF0C\u5E76\u4E14\u9700\u8981\u5B89\u88C5WebRTC Leak Prevent\u63D2\u4EF6\uFF09"), /*#__PURE__*/react_default.a.createElement("br", null), /*#__PURE__*/react_default.a.createElement("a", { + href: "https://www.educoder.net/forums/4478", + target: "_blank" + }, "\u5982\u4F55\u5B89\u88C5WebRTC Leak Prevent\u63D2\u4EF6?")))), v.ip_bind && /*#__PURE__*/react_default.a.createElement(row["a" /* default */], { + justify: "start", + className: "mt20" + }, /*#__PURE__*/react_default.a.createElement(col["a" /* default */], { + flex: "24px", + className: "mr20" + }, /*#__PURE__*/react_default.a.createElement("span", { + className: "iconfont icon-IPbangding c-blue font24" + })), /*#__PURE__*/react_default.a.createElement(col["a" /* default */], { + flex: "1" + }, "\u5F53\u524D\u8003\u8BD5\u5DF2\u542F\u7528\u8003\u8BD5\u671F\u95F4IP\u7ED1\u5B9A\u3002\u5F53\u60A8\u5F00\u59CB\u8003\u8BD5\u540E\uFF0C\u5C06\u81EA\u52A8\u7ED1\u5B9AIP\uFF0C\u8003\u8BD5\u671F\u95F4\u53EA\u5141\u8BB8\u4F7F\u7528\u552F\u4E00\u7684IP\u8FDB\u5165\u8003\u8BD5\u3002\u5982\u9047\u7279\u6B8A\u60C5\u51B5\uFF0C\u53EF\u5411\u8001\u5E08\u7533\u8BF7\u89E3\u9664IP\u7ED1\u5B9A\u3002", /*#__PURE__*/react_default.a.createElement("br", null), !checkIsClientExam() && /*#__PURE__*/react_default.a.createElement(react_default.a.Fragment, null, /*#__PURE__*/react_default.a.createElement("span", { + className: "c-red" + }, "\uFF08\u53EA\u5141\u8BB8\u5728Chrome\u8C37\u6B4C\u6D4F\u89C8\u5668\u4F5C\u7B54\uFF0C\u5E76\u4E14\u9700\u8981\u5B89\u88C5WebRTC Leak Prevent\u63D2\u4EF6\uFF09"), /*#__PURE__*/react_default.a.createElement("br", null), /*#__PURE__*/react_default.a.createElement("a", { + href: "https://www.educoder.net/forums/4478", + target: "_blank" + }, "\u5982\u4F55\u5B89\u88C5WebRTC Leak Prevent\u63D2\u4EF6?")))), /*#__PURE__*/react_default.a.createElement("p", { + className: "ml40 mt40" + }, /*#__PURE__*/react_default.a.createElement(es_checkbox["a" /* default */], { + onChange: function onChange(e) { + return modal.update({ + okButtonProps: { + disabled: !e.target.checked + } + }); + } + }, "\u6211\u5DF2\u9605\u8BFB"))), + onOk: function onOk() { + requestFullScreen(document.body); + if (v.identity_verify && v.current_status === 2) { + var _userInfo2; + v.history.push("/classrooms/".concat(v.coursesId, "/exercise/").concat(v.exerciseId, "/users/").concat((_userInfo2 = Object(authority["f" /* userInfo */])()) === null || _userInfo2 === void 0 ? void 0 : _userInfo2.login, "/check")); + } else { + var _userInfo3; + v.history.push("/classrooms/".concat(v.coursesId, "/exercise/").concat(v.exerciseId, "/users/").concat((_userInfo3 = Object(authority["f" /* userInfo */])()) === null || _userInfo3 === void 0 ? void 0 : _userInfo3.login)); + } + }, + okText: "进入考试", + okButtonProps: { + disabled: true + } + }); + _context2.next = 18; + break; + case 17: + if (v.identity_verify && v.current_status === 2) { + v.history.push("/classrooms/".concat(v.coursesId, "/exercise/").concat(v.exerciseId, "/users/").concat(v.login, "/check")); + } else { + v.history.push("/classrooms/".concat(v.coursesId, "/exercise/").concat(v.exerciseId, "/users/").concat(v.login)); + } + case 18: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return function startExercise(_x3) { + return _ref2.apply(this, arguments); + }; +}(); +var educationList = [{ + name: "博士研究生", + id: 8 +}, { + name: "硕士研究生", + id: 7 +}, { + name: "本科", + id: 6 +}, { + name: "大专", + id: 5 +}, { + name: "中专", + id: 4 +}, { + name: "高中", + id: 3 +}, { + name: "初中", + id: 2 +}, { + name: "小学", + id: 1 +}, { + name: "其他", + id: 9 +}]; +var util_messageInfo = function messageInfo(status, date) { + var info = { + 1: '当前实践项目暂未发布,请联系本课堂教师。', + 2: '当前实践项目不存在,请联系本课堂教师。', + 3: '当前实践项目面向指定单位开放,请联系本课堂教师。', + 4: "\u5F53\u524D\u5B9E\u8DF5\u9879\u76EE\u5C06\u4E8E".concat(date, "\u53D1\u5E03\uFF0C\u8BF7\u7B49\u5F85\u3002") + }; + var s = info[status]; + message["b" /* default */].warn(s); +}; +var util_base64ToBlob = function base64ToBlob(code, filename) { + var _filename$split, _filename$split2; + // const parts = code.split(';base64,'); + // const contentType = parts[0].split(':')[1]; + var raw = window.atob(code); + var rawLength = raw.length; + var uInt8Array = new Uint8Array(rawLength); + for (var i = 0; i < rawLength; ++i) { + uInt8Array[i] = raw.charCodeAt(i); + } + console.log("type:", contentType[(_filename$split = filename.split(".")) === null || _filename$split === void 0 ? void 0 : _filename$split[1]] || 'application/octet-stream'); + return new Blob([uInt8Array], { + type: contentType[(_filename$split2 = filename.split(".")) === null || _filename$split2 === void 0 ? void 0 : _filename$split2[1]] || 'application/octet-stream' + }); +}; +var downloadFile = function downloadFile(fileName, content, filename) { + var blob = util_base64ToBlob(content, filename); // new Blob([content]); + if (window.navigator.msSaveOrOpenBlob) { + navigator.msSaveBlob(blob, fileName); + } else { + var link = document.createElement('a'); + link.href = window.URL.createObjectURL(blob); + link.download = fileName; + //此写法兼容可火狐浏览器 + document.body.appendChild(link); + var evt = document.createEvent("MouseEvents"); + evt.initEvent("click", false, false); + link.dispatchEvent(evt); + document.body.removeChild(link); + } +}; +var util_trackEvent = function trackEvent(arr) { + if (!!arr.length) { + try { + var _window, _userInfo4; + window._czc.push(['_trackEvent'].concat(Object(toConsumableArray["a" /* default */])(arr))); + (_window = window) === null || _window === void 0 ? void 0 : _window.gtag('event', arr[1], { + 'event_category': arr[0], + 'event_label': arr[2] || '', + 'value': arr[3] || "", + "user_id": ((_userInfo4 = Object(authority["f" /* userInfo */])()) === null || _userInfo4 === void 0 ? void 0 : _userInfo4.login) || "" + }); + } catch (e) { + console.log("trackEvent:err:", e); + } + } +}; +var util_trackEventCustom = function trackEventCustom(arr) { + if (!!arr.length) { + try { + window._czc.push(['_setCustomVar'].concat(Object(toConsumableArray["a" /* default */])(arr))); + } catch (e) { + console.log("trackEvent:err:", e); + } + } +}; + +//图片预览 +var util_onPreviewImage = function onPreviewImage(e) { + var parentIndexOf = function parentIndexOf(node, parent) { + if (node.localName === parent) { + return node; + } + for (var i = 0, n = node; n = n.parentNode; i++) { + if (n.localName === parent) { + return n; + } + if (n == document.documentElement) { + return false; + } //找不到目标父节点,防止死循环 + } + }; + var t = e.target; + var dom = parentIndexOf(t, 'a'); + if (dom === null || dom === void 0 ? void 0 : dom.href) return; + if (t.tagName.toUpperCase() === 'IMG') { + var url = t.src || t.getAttribute('src'); + if (url && url.indexOf('/images/avatars/User') === -1) { + e.stopPropagation(); + e.preventDefault(); + components_mediator.publish('preview-image', url); + } + } +}; + +// 课堂获取目录名 +var getCategoryName = function getCategoryName(data, categoryId) { + if (data) { + var _data$filter, _res$second_category, _res$second_category$, _res$second_category$2; + var res = data === null || data === void 0 ? void 0 : (_data$filter = data.filter(function (item) { + return item.type === location.pathname.split("/")[3]; + })) === null || _data$filter === void 0 ? void 0 : _data$filter[0]; + if (categoryId) return res === null || res === void 0 ? void 0 : (_res$second_category = res.second_category) === null || _res$second_category === void 0 ? void 0 : (_res$second_category$ = _res$second_category.filter(function (item) { + return item.category_id == categoryId; + })) === null || _res$second_category$ === void 0 ? void 0 : (_res$second_category$2 = _res$second_category$[0]) === null || _res$second_category$2 === void 0 ? void 0 : _res$second_category$2["category_name"];else return res === null || res === void 0 ? void 0 : res["name"]; + } + return null; +}; + +// 绑定手机号码 +var util_bindPhone = function bindPhone(obj) { + var modal = es_modal["a" /* default */].confirm({ + title: "完善手机号码", + content: "开启挑战前,请先绑定手机号码", + okText: "立即绑定", + cancelText: "取消", + onOk: function onOk() { + location.href = '/account/secure'; + }, + onCancel: function onCancel() { + modal.destroy(); + (obj === null || obj === void 0 ? void 0 : obj.onCancel) && obj.onCancel(); + } + }); +}; + +//复制文字,支持window换行 +var util_copyTextFuc = function copyTextFuc() { + var v = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; + var hide = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var input = document.createElement('textarea'); + input.value = v; + document.body.appendChild(input); + input.select(); + document.execCommand('Copy'); + if (!hide) { + message["b" /* default */].success('复制成功'); + } + document.body.removeChild(input); +}; + +//获取URl参数 +var getJsonFromUrl = function getJsonFromUrl(url) { + if (!url) url = window.location.search; + var query = url.substr(1); + var result = {}; + query.split('&').forEach(function (part) { + var item = part.split('='); + result[item[0]] = decodeURIComponent(item[1]); + }); + return result; +}; + +// 一维数组转换为二维数组 +var arrTrans = function arrTrans(num, arr) { + if (!arr) return null; + var iconsArr = []; + arr.forEach(function (item, index) { + var page = Math.floor(index / num); + if (!iconsArr[page]) { + iconsArr[page] = []; + } + iconsArr[page].push(item); + }); + return iconsArr; +}; + +// 设置网页标题 +var setDocumentTitle = function setDocumentTitle(title) { + if (checkIsClientExam()) { + document.title = "头歌考试系统"; + } else { + document.title = title || "forge"; + } +}; + +// 检查是否C/S考试系统端 +var checkIsClientExam = function checkIsClientExam() { + var _window2, _window2$localStorage; + return (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$localStorage = _window2.localStorage) === null || _window2$localStorage === void 0 ? void 0 : _window2$localStorage.isClientExam; +}; + +/***/ }), + +/***/ "1wcP": +/*!*****************************************************!*\ + !*** ./node_modules/antd/es/modal/style/index.less ***! + \*****************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), + +/***/ 2: +/*!********************************!*\ + !*** ./util.inspect (ignored) ***! + \********************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +/* (ignored) */ + +/***/ }), + +/***/ "2/Rp": +/*!**********************************************!*\ + !*** ./node_modules/antd/es/button/index.js ***! + \**********************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./button */ "zvFY"); + +/* harmony default export */ __webpack_exports__["a"] = (_button__WEBPACK_IMPORTED_MODULE_0__[/* default */ "b"]); + +/***/ }), + +/***/ "22qN": +/*!*********************************!*\ + !*** ./src/styles/markdown.css ***! + \*********************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), + +/***/ "25BE": +/*!********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArray.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 _iterableToArray; }); +function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); +} + +/***/ }), + +/***/ "25bX": +/*!******************************************************************!*\ + !*** ./node_modules/core-js/modules/es.reflect.is-extensible.js ***! + \******************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk"); + +var objectIsExtensible = Object.isExtensible; + +// `Reflect.isExtensible` method +// https://tc39.github.io/ecma262/#sec-reflect.isextensible +$({ target: 'Reflect', stat: true }, { + isExtensible: function isExtensible(target) { + anObject(target); + return objectIsExtensible ? objectIsExtensible(target) : true; + } +}); + + +/***/ }), + +/***/ "27RR": +/*!********************************************************************************!*\ + !*** ./node_modules/core-js/modules/es.object.get-own-property-descriptors.js ***! + \********************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/"); +var ownKeys = __webpack_require__(/*! ../internals/own-keys */ "Vu81"); +var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU"); +var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V"); +var createProperty = __webpack_require__(/*! ../internals/create-property */ "hBjN"); + +// `Object.getOwnPropertyDescriptors` method +// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors +$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { + var O = toIndexedObject(object); + var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; + var keys = ownKeys(O); + var result = {}; + var index = 0; + var key, descriptor; + while (keys.length > index) { + descriptor = getOwnPropertyDescriptor(O, key = keys[index++]); + if (descriptor !== undefined) createProperty(result, key, descriptor); + } + return result; + } +}); + + +/***/ }), + +/***/ "2A+d": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.raw.js ***! + \*******************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU"); +var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ"); + +// `String.raw` method +// https://tc39.github.io/ecma262/#sec-string.raw +$({ target: 'String', stat: true }, { + raw: function raw(template) { + var rawTemplate = toIndexedObject(template.raw); + var literalSegments = toLength(rawTemplate.length); + var argumentsLength = arguments.length; + var elements = []; + var i = 0; + while (literalSegments > i) { + elements.push(String(rawTemplate[i++])); + if (i < argumentsLength) elements.push(String(arguments[i])); + } return elements.join(''); + } +}); + + +/***/ }), + +/***/ "2B1R": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/es.array.map.js ***! + \******************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var $map = __webpack_require__(/*! ../internals/array-iteration */ "tycR").map; +var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "Hd5f"); +var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "rkAj"); + +var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map'); +// FF49- issue +var USES_TO_LENGTH = arrayMethodUsesToLength('map'); + +// `Array.prototype.map` method +// https://tc39.github.io/ecma262/#sec-array.prototype.map +// with adding support of @@species +$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, { + map: function map(callbackfn /* , thisArg */) { + return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); + + +/***/ }), + +/***/ "2GS6": +/*!**********************************************************!*\ + !*** ./node_modules/rc-util/es/createChainedFunction.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 createChainedFunction; }); +/** + * Safe chained function + * + * Will only create a new function if needed, + * otherwise will pass back existing functions or null. + * + * @returns {function|null} + */ +function createChainedFunction() { + var args = [].slice.call(arguments, 0); + if (args.length === 1) { + return args[0]; + } + return function chainedFunction() { + for (var i = 0; i < args.length; i++) { + if (args[i] && args[i].apply) { + args[i].apply(this, arguments); + } + } + }; +} + +/***/ }), + +/***/ "2W6z": +/*!*****************************************!*\ + !*** ./node_modules/warning/warning.js ***! + \*****************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + +/** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + +var __DEV__ = "production" !== 'production'; + +var warning = function() {}; + +if (__DEV__) { + var printWarning = function printWarning(format, args) { + var len = arguments.length; + args = new Array(len > 1 ? len - 1 : 0); + for (var key = 1; key < len; key++) { + args[key - 1] = arguments[key]; + } + var argIndex = 0; + var message = 'Warning: ' + + format.replace(/%s/g, function() { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + } + + warning = function(condition, format, args) { + var len = arguments.length; + args = new Array(len > 2 ? len - 2 : 0); + for (var key = 2; key < len; key++) { + args[key - 2] = arguments[key]; + } + if (format === undefined) { + throw new Error( + '`warning(condition, format, ...args)` requires a warning ' + + 'message argument' + ); + } + if (!condition) { + printWarning.apply(null, [format].concat(args)); + } + }; +} + +module.exports = warning; + + +/***/ }), + +/***/ "2j6C": +/*!***************************************************!*\ + !*** ./node_modules/minimalistic-assert/index.js ***! + \***************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +module.exports = assert; + +function assert(val, msg) { + if (!val) + throw new Error(msg || 'Assertion failed'); +} + +assert.equal = function assertEqual(l, r, msg) { + if (l != r) + throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r)); +}; + + +/***/ }), + +/***/ "2mql": +/*!**********************************************************************************!*\ + !*** ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js ***! + \**********************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var reactIs = __webpack_require__(/*! react-is */ "TOwV"); + +/** + * Copyright 2015, Yahoo! Inc. + * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ +var REACT_STATICS = { + childContextTypes: true, + contextType: true, + contextTypes: true, + defaultProps: true, + displayName: true, + getDefaultProps: true, + getDerivedStateFromError: true, + getDerivedStateFromProps: true, + mixins: true, + propTypes: true, + type: true +}; +var KNOWN_STATICS = { + name: true, + length: true, + prototype: true, + caller: true, + callee: true, + arguments: true, + arity: true +}; +var FORWARD_REF_STATICS = { + '$$typeof': true, + render: true, + defaultProps: true, + displayName: true, + propTypes: true +}; +var MEMO_STATICS = { + '$$typeof': true, + compare: true, + defaultProps: true, + displayName: true, + propTypes: true, + type: true +}; +var TYPE_STATICS = {}; +TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS; +TYPE_STATICS[reactIs.Memo] = MEMO_STATICS; + +function getStatics(component) { + // React v16.11 and below + if (reactIs.isMemo(component)) { + return MEMO_STATICS; + } // React v16.12 and above + + + return TYPE_STATICS[component['$$typeof']] || REACT_STATICS; +} + +var defineProperty = Object.defineProperty; +var getOwnPropertyNames = Object.getOwnPropertyNames; +var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; +var getPrototypeOf = Object.getPrototypeOf; +var objectPrototype = Object.prototype; +function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { + if (typeof sourceComponent !== 'string') { + // don't hoist over string (html) components + if (objectPrototype) { + var inheritedComponent = getPrototypeOf(sourceComponent); + + if (inheritedComponent && inheritedComponent !== objectPrototype) { + hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); + } + } + + var keys = getOwnPropertyNames(sourceComponent); + + if (getOwnPropertySymbols) { + keys = keys.concat(getOwnPropertySymbols(sourceComponent)); + } + + var targetStatics = getStatics(targetComponent); + var sourceStatics = getStatics(sourceComponent); + + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + + if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) { + var descriptor = getOwnPropertyDescriptor(sourceComponent, key); + + try { + // Avoid failures from read-only properties + defineProperty(targetComponent, key, descriptor); + } catch (e) {} + } + } + } + + return targetComponent; +} + +module.exports = hoistNonReactStatics; + + +/***/ }), + +/***/ "2oRo": +/*!**************************************************!*\ + !*** ./node_modules/core-js/internals/global.js ***! + \**************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {var check = function (it) { + return it && it.Math == Math && it; +}; + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +module.exports = + // eslint-disable-next-line no-undef + check(typeof globalThis == 'object' && globalThis) || + check(typeof window == 'object' && window) || + check(typeof self == 'object' && self) || + check(typeof global == 'object' && global) || + // eslint-disable-next-line no-new-func + Function('return this')(); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "yLpj"))) + +/***/ }), + +/***/ "2qtc": +/*!***************************************************!*\ + !*** ./node_modules/antd/es/modal/style/index.js ***! + \***************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "cIOH"); +/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_index_less__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "1wcP"); +/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _button_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../button/style */ "+L6B"); + + // style dependencies + + + +/***/ }), + +/***/ "2tOg": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.array.last-item.js ***! + \****************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/"); +var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "RNIs"); +var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW"); +var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ"); +var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "m/L8").f; + +// `Array.prototype.lastIndex` accessor +// https://github.com/keithamus/proposal-array-last +if (DESCRIPTORS && !('lastItem' in [])) { + defineProperty(Array.prototype, 'lastItem', { + configurable: true, + get: function lastItem() { + var O = toObject(this); + var len = toLength(O.length); + return len == 0 ? undefined : O[len - 1]; + }, + set: function lastItem(value) { + var O = toObject(this); + var len = toLength(O.length); + return O[len == 0 ? 0 : len - 1] = value; + } + }); + + addToUnscopables('lastItem'); +} + + +/***/ }), + +/***/ 3: +/*!******************************!*\ + !*** min-document (ignored) ***! + \******************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +/* (ignored) */ + +/***/ }), + +/***/ "33Wh": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/object-keys.js ***! + \*******************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ "yoRg"); +var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "eDl+"); + +// `Object.keys` method +// https://tc39.github.io/ecma262/#sec-object.keys +module.exports = Object.keys || function keys(O) { + return internalObjectKeys(O, enumBugKeys); +}; + + +/***/ }), + +/***/ "33yf": +/*!***********************************************!*\ + !*** ./node_modules/path-browserify/index.js ***! + \***********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1, +// backported and transplited with Babel, with backwards-compat fixes + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// resolves . and .. elements in a path array with directory names there +// must be no slashes, empty elements, or device names (c:\) in the array +// (so also no leading and trailing slashes - it does not distinguish +// relative and absolute paths) +function normalizeArray(parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up--; up) { + parts.unshift('..'); + } + } + + return parts; +} + +// path.resolve([from ...], to) +// posix version +exports.resolve = function() { + var resolvedPath = '', + resolvedAbsolute = false; + + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = (i >= 0) ? arguments[i] : process.cwd(); + + // Skip empty and invalid entries + if (typeof path !== 'string') { + throw new TypeError('Arguments to path.resolve must be strings'); + } else if (!path) { + continue; + } + + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; + } + + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) + + // Normalize the path + resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { + return !!p; + }), !resolvedAbsolute).join('/'); + + return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; +}; + +// path.normalize(path) +// posix version +exports.normalize = function(path) { + var isAbsolute = exports.isAbsolute(path), + trailingSlash = substr(path, -1) === '/'; + + // Normalize the path + path = normalizeArray(filter(path.split('/'), function(p) { + return !!p; + }), !isAbsolute).join('/'); + + if (!path && !isAbsolute) { + path = '.'; + } + if (path && trailingSlash) { + path += '/'; + } + + return (isAbsolute ? '/' : '') + path; +}; + +// posix version +exports.isAbsolute = function(path) { + return path.charAt(0) === '/'; +}; + +// posix version +exports.join = function() { + var paths = Array.prototype.slice.call(arguments, 0); + return exports.normalize(filter(paths, function(p, index) { + if (typeof p !== 'string') { + throw new TypeError('Arguments to path.join must be strings'); + } + return p; + }).join('/')); +}; + + +// path.relative(from, to) +// posix version +exports.relative = function(from, to) { + from = exports.resolve(from).substr(1); + to = exports.resolve(to).substr(1); + + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== '') break; + } + + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== '') break; + } + + if (start > end) return []; + return arr.slice(start, end - start + 1); + } + + var fromParts = trim(from.split('/')); + var toParts = trim(to.split('/')); + + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } + + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + + return outputParts.join('/'); +}; + +exports.sep = '/'; +exports.delimiter = ':'; + +exports.dirname = function (path) { + if (typeof path !== 'string') path = path + ''; + if (path.length === 0) return '.'; + var code = path.charCodeAt(0); + var hasRoot = code === 47 /*/*/; + var end = -1; + var matchedSlash = true; + for (var i = path.length - 1; i >= 1; --i) { + code = path.charCodeAt(i); + if (code === 47 /*/*/) { + if (!matchedSlash) { + end = i; + break; + } + } else { + // We saw the first non-path separator + matchedSlash = false; + } + } + + if (end === -1) return hasRoot ? '/' : '.'; + if (hasRoot && end === 1) { + // return '//'; + // Backwards-compat fix: + return '/'; + } + return path.slice(0, end); +}; + +function basename(path) { + if (typeof path !== 'string') path = path + ''; + + var start = 0; + var end = -1; + var matchedSlash = true; + var i; + + for (i = path.length - 1; i >= 0; --i) { + if (path.charCodeAt(i) === 47 /*/*/) { + // If we reached a path separator that was not part of a set of path + // separators at the end of the string, stop now + if (!matchedSlash) { + start = i + 1; + break; + } + } else if (end === -1) { + // We saw the first non-path separator, mark this as the end of our + // path component + matchedSlash = false; + end = i + 1; + } + } + + if (end === -1) return ''; + return path.slice(start, end); +} + +// Uses a mixed approach for backwards-compatibility, as ext behavior changed +// in new Node.js versions, so only basename() above is backported here +exports.basename = function (path, ext) { + var f = basename(path); + if (ext && f.substr(-1 * ext.length) === ext) { + f = f.substr(0, f.length - ext.length); + } + return f; +}; + +exports.extname = function (path) { + if (typeof path !== 'string') path = path + ''; + var startDot = -1; + var startPart = 0; + var end = -1; + var matchedSlash = true; + // Track the state of characters (if any) we see before our first dot and + // after any path separator we find + var preDotState = 0; + for (var i = path.length - 1; i >= 0; --i) { + var code = path.charCodeAt(i); + if (code === 47 /*/*/) { + // If we reached a path separator that was not part of a set of path + // separators at the end of the string, stop now + if (!matchedSlash) { + startPart = i + 1; + break; + } + continue; + } + if (end === -1) { + // We saw the first non-path separator, mark this as the end of our + // extension + matchedSlash = false; + end = i + 1; + } + if (code === 46 /*.*/) { + // If this is our first dot, mark it as the start of our extension + if (startDot === -1) + startDot = i; + else if (preDotState !== 1) + preDotState = 1; + } else if (startDot !== -1) { + // We saw a non-dot and non-path separator before our dot, so we should + // have a good chance at having a non-empty extension + preDotState = -1; + } + } + + if (startDot === -1 || end === -1 || + // We saw a non-dot character immediately before the dot + preDotState === 0 || + // The (right-most) trimmed path component is exactly '..' + preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { + return ''; + } + return path.slice(startDot, end); +}; + +function filter (xs, f) { + if (xs.filter) return xs.filter(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + if (f(xs[i], i, xs)) res.push(xs[i]); + } + return res; +} + +// String.prototype.substr - negative index don't work in IE8 +var substr = 'ab'.substr(-1) === 'b' + ? function (str, start, len) { return str.substr(start, len) } + : function (str, start, len) { + if (start < 0) start = str.length + start; + return str.substr(start, len); + } +; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ "Q2Ig"))) + +/***/ }), + +/***/ "3I1R": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/modules/es.symbol.has-instance.js ***! + \****************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n"); + +// `Symbol.hasInstance` well-known symbol +// https://tc39.github.io/ecma262/#sec-symbol.hasinstance +defineWellKnownSymbol('hasInstance'); + + +/***/ }), + +/***/ "3JnH": +/*!*****************************************!*\ + !*** ./node_modules/es-errors/range.js ***! + \*****************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** @type {import('./range')} */ +module.exports = RangeError; + + +/***/ }), + +/***/ "3KgV": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/es.object.freeze.js ***! + \**********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var FREEZING = __webpack_require__(/*! ../internals/freezing */ "uy83"); +var fails = __webpack_require__(/*! ../internals/fails */ "0Dky"); +var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v"); +var onFreeze = __webpack_require__(/*! ../internals/internal-metadata */ "8YOa").onFreeze; + +var nativeFreeze = Object.freeze; +var FAILS_ON_PRIMITIVES = fails(function () { nativeFreeze(1); }); + +// `Object.freeze` method +// https://tc39.github.io/ecma262/#sec-object.freeze +$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, { + freeze: function freeze(it) { + return nativeFreeze && isObject(it) ? nativeFreeze(onFreeze(it)) : it; + } +}); + + +/***/ }), + +/***/ "3Mug": +/*!***************************************************!*\ + !*** ./node_modules/rc-util/lib/Dom/canUseDom.js ***! + \***************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = canUseDom; +function canUseDom() { + return !!(typeof window !== 'undefined' && window.document && window.document.createElement); +} + +/***/ }), + +/***/ "3Nzz": +/*!*************************************************************!*\ + !*** ./node_modules/antd/es/config-provider/SizeContext.js ***! + \*************************************************************/ +/*! exports provided: SizeContextProvider, default */ +/*! exports used: SizeContextProvider, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SizeContextProvider; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +var SizeContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createContext"](undefined); +var SizeContextProvider = function SizeContextProvider(_ref) { + var children = _ref.children, + size = _ref.size; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SizeContext.Consumer, null, function (originSize) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SizeContext.Provider, { + value: size || originSize + }, children); + }); +}; +/* harmony default export */ __webpack_exports__["b"] = (SizeContext); + +/***/ }), + +/***/ "3bBZ": +/*!**********************************************************************!*\ + !*** ./node_modules/core-js/modules/web.dom-collections.iterator.js ***! + \**********************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(/*! ../internals/global */ "2oRo"); +var DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ "/byt"); +var ArrayIteratorMethods = __webpack_require__(/*! ../modules/es.array.iterator */ "4mDm"); +var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp"); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp"); + +var ITERATOR = wellKnownSymbol('iterator'); +var TO_STRING_TAG = wellKnownSymbol('toStringTag'); +var ArrayValues = ArrayIteratorMethods.values; + +for (var COLLECTION_NAME in DOMIterables) { + var Collection = global[COLLECTION_NAME]; + var CollectionPrototype = Collection && Collection.prototype; + if (CollectionPrototype) { + // some Chrome versions have non-configurable methods on DOMTokenList + if (CollectionPrototype[ITERATOR] !== ArrayValues) try { + createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues); + } catch (error) { + CollectionPrototype[ITERATOR] = ArrayValues; + } + if (!CollectionPrototype[TO_STRING_TAG]) { + createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME); + } + if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) { + // some Chrome versions have non-configurable methods on DOMTokenList + if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try { + createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]); + } catch (error) { + CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME]; + } + } + } +} + + +/***/ }), + +/***/ "3blH": +/*!******************************************!*\ + !*** ./src/models/competitions/index.ts ***! + \******************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw"); +/* harmony import */ var _service_competitions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/service/competitions */ "hJwl"); + +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + +var CompetitionsModel = { + namespace: 'competitions', + state: { + name: '', + loading: true, + listParams: { + page: 1, + //第一页开始 + per_page: 20, + category: "" + }, + competitions: [], + hongshanInfos: [], + count: '' + }, + effects: { + // 获取页面数据 + getList: function getList(_ref, _ref2) { + var payload = _ref.payload; + var call = _ref2.call, + put = _ref2.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { + var listParams, response; + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + listParams = payload; + _context.next = 3; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getCompetitionsList */ "x"], payload); + case 3: + response = _context.sent; + _context.next = 6; + return put({ + type: "save", + payload: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ + listParams: listParams + }, response) + }); + case 6: + return _context.abrupt("return", response); + case 7: + case "end": + return _context.stop(); + } + }, _callee); + })(); + }, + getWorkSubmitUpdateRes: function getWorkSubmitUpdateRes(_ref3, _ref4) { + var payload = _ref3.payload, + callback = _ref3.callback; + var call = _ref4.call, + put = _ref4.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() { + var response; + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getWorkSubmitUpdateRes */ "J"], payload); + case 2: + response = _context2.sent; + return _context2.abrupt("return", response); + case 4: + case "end": + return _context2.stop(); + } + }, _callee2); + })(); + }, + //提交学生数据 + addApplytojoincourse: function addApplytojoincourse(_ref5, _ref6) { + var payload = _ref5.payload, + callback = _ref5.callback; + var call = _ref6.call, + put = _ref6.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() { + var response; + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + _context3.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* addApplytojoincourse */ "t"], payload); + case 2: + response = _context3.sent; + return _context3.abrupt("return", response); + case 4: + case "end": + return _context3.stop(); + } + }, _callee3); + })(); + }, + //报名 + competitionTeams: function competitionTeams(_ref7, _ref8) { + var payload = _ref7.payload, + callback = _ref7.callback; + var call = _ref8.call, + put = _ref8.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() { + var response; + return _regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + _context4.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* competitionTeams */ "u"], payload); + case 2: + response = _context4.sent; + return _context4.abrupt("return", response); + case 4: + case "end": + return _context4.stop(); + } + }, _callee4); + })(); + }, + //获取限制 + getStaff: function getStaff(_ref9, _ref10) { + var payload = _ref9.payload, + callback = _ref9.callback; + var call = _ref10.call, + put = _ref10.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() { + var response; + return _regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + _context5.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getStaff */ "D"], payload); + case 2: + response = _context5.sent; + return _context5.abrupt("return", response); + case 4: + case "end": + return _context5.stop(); + } + }, _callee5); + })(); + }, + //获取头部信息 + getHeader: function getHeader(_ref11, _ref12) { + var payload = _ref11.payload, + callback = _ref11.callback; + var call = _ref12.call, + put = _ref12.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() { + var response; + return _regeneratorRuntime().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + _context6.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getHeader */ "A"], payload); + case 2: + response = _context6.sent; + return _context6.abrupt("return", response); + case 4: + case "end": + return _context6.stop(); + } + }, _callee6); + })(); + }, + //获取竞赛底部item信息 + getItem: function getItem(_ref13, _ref14) { + var payload = _ref13.payload, + callback = _ref13.callback; + var call = _ref14.call, + put = _ref14.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() { + var response; + return _regeneratorRuntime().wrap(function _callee7$(_context7) { + while (1) switch (_context7.prev = _context7.next) { + case 0: + _context7.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getItem */ "B"], payload); + case 2: + response = _context7.sent; + return _context7.abrupt("return", response); + case 4: + case "end": + return _context7.stop(); + } + }, _callee7); + })(); + }, + getHSCompetitionInfo: function getHSCompetitionInfo(_ref15, _ref16) { + var payload = _ref15.payload, + callback = _ref15.callback; + var call = _ref16.call, + put = _ref16.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() { + var response; + return _regeneratorRuntime().wrap(function _callee8$(_context8) { + while (1) switch (_context8.prev = _context8.next) { + case 0: + _context8.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getHSCompetitionInfo */ "z"], payload); + case 2: + response = _context8.sent; + _context8.next = 5; + return put({ + type: "save", + payload: { + hongshanInfos: response.data + } + }); + case 5: + return _context8.abrupt("return", response); + case 6: + case "end": + return _context8.stop(); + } + }, _callee8); + })(); + }, + //修改item updateMdContent + updateMdContent: function updateMdContent(_ref17, _ref18) { + var payload = _ref17.payload, + callback = _ref17.callback; + var call = _ref18.call, + put = _ref18.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() { + var response; + return _regeneratorRuntime().wrap(function _callee9$(_context9) { + while (1) switch (_context9.prev = _context9.next) { + case 0: + _context9.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* updateMdContent */ "L"], payload); + case 2: + response = _context9.sent; + return _context9.abrupt("return", response); + case 4: + case "end": + return _context9.stop(); + } + }, _callee9); + })(); + }, + //获取战队列表 + getTeamList: function getTeamList(_ref19, _ref20) { + var payload = _ref19.payload, + callback = _ref19.callback; + var call = _ref20.call, + put = _ref20.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() { + var response; + return _regeneratorRuntime().wrap(function _callee10$(_context10) { + while (1) switch (_context10.prev = _context10.next) { + case 0: + _context10.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getTeamList */ "H"], payload); + case 2: + response = _context10.sent; + return _context10.abrupt("return", response); + case 4: + case "end": + return _context10.stop(); + } + }, _callee10); + })(); + }, + //获取战队头像 Edit + getTeamDetail: function getTeamDetail(_ref21, _ref22) { + var payload = _ref21.payload, + callback = _ref21.callback; + var call = _ref22.call, + put = _ref22.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() { + var response; + return _regeneratorRuntime().wrap(function _callee11$(_context11) { + while (1) switch (_context11.prev = _context11.next) { + case 0: + _context11.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getTeamDetail */ "G"], payload); + case 2: + response = _context11.sent; + return _context11.abrupt("return", response); + case 4: + case "end": + return _context11.stop(); + } + }, _callee11); + })(); + }, + //修改战队信息 + UpTeam: function UpTeam(_ref23, _ref24) { + var payload = _ref23.payload, + callback = _ref23.callback; + var call = _ref24.call, + put = _ref24.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() { + var response; + return _regeneratorRuntime().wrap(function _callee12$(_context12) { + while (1) switch (_context12.prev = _context12.next) { + case 0: + _context12.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* UpTeam */ "s"], payload); + case 2: + response = _context12.sent; + return _context12.abrupt("return", response); + case 4: + case "end": + return _context12.stop(); + } + }, _callee12); + })(); + }, + //删除战队 + DeleteTeam: function DeleteTeam(_ref25, _ref26) { + var payload = _ref25.payload, + callback = _ref25.callback; + var call = _ref26.call, + put = _ref26.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() { + var response; + return _regeneratorRuntime().wrap(function _callee13$(_context13) { + while (1) switch (_context13.prev = _context13.next) { + case 0: + _context13.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* DeleteTeam */ "f"], payload); + case 2: + response = _context13.sent; + return _context13.abrupt("return", response); + case 4: + case "end": + return _context13.stop(); + } + }, _callee13); + })(); + }, + //退出战队 ExitTeam + ExitTeam: function ExitTeam(_ref27, _ref28) { + var payload = _ref27.payload, + callback = _ref27.callback; + var call = _ref28.call, + put = _ref28.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() { + var response; + return _regeneratorRuntime().wrap(function _callee14$(_context14) { + while (1) switch (_context14.prev = _context14.next) { + case 0: + _context14.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* ExitTeam */ "h"], payload); + case 2: + response = _context14.sent; + return _context14.abrupt("return", response); + case 4: + case "end": + return _context14.stop(); + } + }, _callee14); + })(); + }, + //新增战队 AddTeam + AddTeam: function AddTeam(_ref29, _ref30) { + var payload = _ref29.payload, + callback = _ref29.callback; + var call = _ref30.call, + put = _ref30.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() { + var response; + return _regeneratorRuntime().wrap(function _callee15$(_context15) { + while (1) switch (_context15.prev = _context15.next) { + case 0: + _context15.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* AddTeam */ "b"], payload); + case 2: + response = _context15.sent; + return _context15.abrupt("return", response); + case 4: + case "end": + return _context15.stop(); + } + }, _callee15); + })(); + }, + //加入战队 JoinTeam + JoinTeam: function JoinTeam(_ref31, _ref32) { + var payload = _ref31.payload, + callback = _ref31.callback; + var call = _ref32.call, + put = _ref32.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() { + var response; + return _regeneratorRuntime().wrap(function _callee16$(_context16) { + while (1) switch (_context16.prev = _context16.next) { + case 0: + _context16.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* JoinTeam */ "j"], payload); + case 2: + response = _context16.sent; + return _context16.abrupt("return", response); + case 4: + case "end": + return _context16.stop(); + } + }, _callee16); + })(); + }, + // 签署CLA协议 + SignCLA: function SignCLA(_ref33, _ref34) { + var payload = _ref33.payload, + callback = _ref33.callback; + var call = _ref34.call, + put = _ref34.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() { + var response; + return _regeneratorRuntime().wrap(function _callee17$(_context17) { + while (1) switch (_context17.prev = _context17.next) { + case 0: + _context17.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* SignCLA */ "p"], payload); + case 2: + response = _context17.sent; + return _context17.abrupt("return", response); + case 4: + case "end": + return _context17.stop(); + } + }, _callee17); + })(); + }, + // 获取kylin竞赛ID + GetKylinId: function GetKylinId(_ref35, _ref36) { + var payload = _ref35.payload, + callback = _ref35.callback; + var call = _ref36.call, + put = _ref36.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() { + var response; + return _regeneratorRuntime().wrap(function _callee18$(_context18) { + while (1) switch (_context18.prev = _context18.next) { + case 0: + _context18.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* GetKylinId */ "i"], payload); + case 2: + response = _context18.sent; + return _context18.abrupt("return", response); + case 4: + case "end": + return _context18.stop(); + } + }, _callee18); + })(); + }, + //查找老师 getTeacher + getTeacher: function getTeacher(_ref37, _ref38) { + var payload = _ref37.payload, + callback = _ref37.callback; + var call = _ref38.call, + put = _ref38.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() { + var response; + return _regeneratorRuntime().wrap(function _callee19$(_context19) { + while (1) switch (_context19.prev = _context19.next) { + case 0: + _context19.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getTeacher */ "F"], payload); + case 2: + response = _context19.sent; + return _context19.abrupt("return", response); + case 4: + case "end": + return _context19.stop(); + } + }, _callee19); + })(); + }, + //查找学生 getStudents + getStudents: function getStudents(_ref39, _ref40) { + var payload = _ref39.payload, + callback = _ref39.callback; + var call = _ref40.call, + put = _ref40.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() { + var response; + return _regeneratorRuntime().wrap(function _callee20$(_context20) { + while (1) switch (_context20.prev = _context20.next) { + case 0: + _context20.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getStudents */ "E"], payload); + case 2: + response = _context20.sent; + return _context20.abrupt("return", response); + case 4: + case "end": + return _context20.stop(); + } + }, _callee20); + })(); + }, + //提交战队成员 SubmitTeam + SubmitTeam: function SubmitTeam(_ref41, _ref42) { + var payload = _ref41.payload, + callback = _ref41.callback; + var call = _ref42.call, + put = _ref42.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() { + var response; + return _regeneratorRuntime().wrap(function _callee21$(_context21) { + while (1) switch (_context21.prev = _context21.next) { + case 0: + _context21.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* SubmitTeam */ "q"], payload); + case 2: + response = _context21.sent; + return _context21.abrupt("return", response); + case 4: + case "end": + return _context21.stop(); + } + }, _callee21); + })(); + }, + //领取代金劵 Reward + Reward: function Reward(_ref43, _ref44) { + var payload = _ref43.payload, + callback = _ref43.callback; + var call = _ref44.call, + put = _ref44.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee22() { + var response; + return _regeneratorRuntime().wrap(function _callee22$(_context22) { + while (1) switch (_context22.prev = _context22.next) { + case 0: + _context22.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* Reward */ "o"], payload); + case 2: + response = _context22.sent; + return _context22.abrupt("return", response); + case 4: + case "end": + return _context22.stop(); + } + }, _callee22); + })(); + }, + //获取排行榜头部 ChartRules + ChartRules: function ChartRules(_ref45, _ref46) { + var payload = _ref45.payload, + callback = _ref45.callback; + var call = _ref46.call, + put = _ref46.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee23() { + var response; + return _regeneratorRuntime().wrap(function _callee23$(_context23) { + while (1) switch (_context23.prev = _context23.next) { + case 0: + _context23.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* ChartRules */ "d"], payload); + case 2: + response = _context23.sent; + return _context23.abrupt("return", response); + case 4: + case "end": + return _context23.stop(); + } + }, _callee23); + })(); + }, + //获取战队信息 Charts + Charts: function Charts(_ref47, _ref48) { + var payload = _ref47.payload, + callback = _ref47.callback; + var call = _ref48.call, + put = _ref48.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee24() { + var response; + return _regeneratorRuntime().wrap(function _callee24$(_context24) { + while (1) switch (_context24.prev = _context24.next) { + case 0: + _context24.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* Charts */ "e"], payload); + case 2: + response = _context24.sent; + return _context24.abrupt("return", response); + case 4: + case "end": + return _context24.stop(); + } + }, _callee24); + })(); + }, + //获取战队信息 TabResults + TabResults: function TabResults(_ref49, _ref50) { + var payload = _ref49.payload, + callback = _ref49.callback; + var call = _ref50.call, + put = _ref50.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee25() { + var response; + return _regeneratorRuntime().wrap(function _callee25$(_context25) { + while (1) switch (_context25.prev = _context25.next) { + case 0: + _context25.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* TabResults */ "r"], payload); + case 2: + response = _context25.sent; + return _context25.abrupt("return", response); + case 4: + case "end": + return _context25.stop(); + } + }, _callee25); + })(); + }, + //获取战队信息 Results + Results: function Results(_ref51, _ref52) { + var payload = _ref51.payload, + callback = _ref51.callback; + var call = _ref52.call, + put = _ref52.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee26() { + var response; + return _regeneratorRuntime().wrap(function _callee26$(_context26) { + while (1) switch (_context26.prev = _context26.next) { + case 0: + _context26.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* Results */ "n"], payload); + case 2: + response = _context26.sent; + return _context26.abrupt("return", response); + case 4: + case "end": + return _context26.stop(); + } + }, _callee26); + })(); + }, + //获取获奖证书 Prize + Prize: function Prize(_ref53, _ref54) { + var payload = _ref53.payload, + callback = _ref53.callback; + var call = _ref54.call, + put = _ref54.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee27() { + var response; + return _regeneratorRuntime().wrap(function _callee27$(_context27) { + while (1) switch (_context27.prev = _context27.next) { + case 0: + _context27.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* Prize */ "l"], payload); + case 2: + response = _context27.sent; + return _context27.abrupt("return", response); + case 4: + case "end": + return _context27.stop(); + } + }, _callee27); + })(); + }, + //获取用户信息 Accounts + Accounts: function Accounts(_ref55, _ref56) { + var payload = _ref55.payload, + callback = _ref55.callback; + var call = _ref56.call, + put = _ref56.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee28() { + var response; + return _regeneratorRuntime().wrap(function _callee28$(_context28) { + while (1) switch (_context28.prev = _context28.next) { + case 0: + _context28.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* Accounts */ "a"], payload); + case 2: + response = _context28.sent; + return _context28.abrupt("return", response); + case 4: + case "end": + return _context28.stop(); + } + }, _callee28); + })(); + }, + //获取验证码 getVerification + getVerification: function getVerification(_ref57, _ref58) { + var payload = _ref57.payload, + callback = _ref57.callback; + var call = _ref58.call, + put = _ref58.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee29() { + var response; + return _regeneratorRuntime().wrap(function _callee29$(_context29) { + while (1) switch (_context29.prev = _context29.next) { + case 0: + _context29.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getVerification */ "I"], payload); + case 2: + response = _context29.sent; + return _context29.abrupt("return", response); + case 4: + case "end": + return _context29.stop(); + } + }, _callee29); + })(); + }, + //绑定手机 + PhoneBind: function PhoneBind(_ref59, _ref60) { + var payload = _ref59.payload, + callback = _ref59.callback; + var call = _ref60.call, + put = _ref60.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee30() { + var response; + return _regeneratorRuntime().wrap(function _callee30$(_context30) { + while (1) switch (_context30.prev = _context30.next) { + case 0: + _context30.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* PhoneBind */ "k"], payload); + case 2: + response = _context30.sent; + return _context30.abrupt("return", response); + case 4: + case "end": + return _context30.stop(); + } + }, _callee30); + })(); + }, + //绑定邮箱 + EmailBind: function EmailBind(_ref61, _ref62) { + var payload = _ref61.payload, + callback = _ref61.callback; + var call = _ref62.call, + put = _ref62.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee31() { + var response; + return _regeneratorRuntime().wrap(function _callee31$(_context31) { + while (1) switch (_context31.prev = _context31.next) { + case 0: + _context31.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* EmailBind */ "g"], payload); + case 2: + response = _context31.sent; + return _context31.abrupt("return", response); + case 4: + case "end": + return _context31.stop(); + } + }, _callee31); + })(); + }, + //撤销认证 Authentication, Professional + Authentication: function Authentication(_ref63, _ref64) { + var payload = _ref63.payload, + callback = _ref63.callback; + var call = _ref64.call, + put = _ref64.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee32() { + var response; + return _regeneratorRuntime().wrap(function _callee32$(_context32) { + while (1) switch (_context32.prev = _context32.next) { + case 0: + _context32.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* Authentication */ "c"], payload); + case 2: + response = _context32.sent; + return _context32.abrupt("return", response); + case 4: + case "end": + return _context32.stop(); + } + }, _callee32); + })(); + }, + Professional: function Professional(_ref65, _ref66) { + var payload = _ref65.payload, + callback = _ref65.callback; + var call = _ref66.call, + put = _ref66.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee33() { + var response; + return _regeneratorRuntime().wrap(function _callee33$(_context33) { + while (1) switch (_context33.prev = _context33.next) { + case 0: + _context33.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* Professional */ "m"], payload); + case 2: + response = _context33.sent; + return _context33.abrupt("return", response); + case 4: + case "end": + return _context33.stop(); + } + }, _callee33); + })(); + }, + //提交银行卡信息 + setleader: function setleader(_ref67, _ref68) { + var payload = _ref67.payload, + callback = _ref67.callback; + var call = _ref68.call, + put = _ref68.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee34() { + var response; + return _regeneratorRuntime().wrap(function _callee34$(_context34) { + while (1) switch (_context34.prev = _context34.next) { + case 0: + _context34.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* setleader */ "K"], payload); + case 2: + response = _context34.sent; + return _context34.abrupt("return", response); + case 4: + case "end": + return _context34.stop(); + } + }, _callee34); + })(); + }, + //获取实训 getShixun + getShixun: function getShixun(_ref69, _ref70) { + var payload = _ref69.payload, + callback = _ref69.callback; + var call = _ref70.call, + put = _ref70.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee35() { + var response; + return _regeneratorRuntime().wrap(function _callee35$(_context35) { + while (1) switch (_context35.prev = _context35.next) { + case 0: + _context35.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getShixun */ "C"], payload); + case 2: + response = _context35.sent; + return _context35.abrupt("return", response); + case 4: + case "end": + return _context35.stop(); + } + }, _callee35); + })(); + }, + //获取课堂 getCourse + getCourse: function getCourse(_ref71, _ref72) { + var payload = _ref71.payload, + callback = _ref71.callback; + var call = _ref72.call, + put = _ref72.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee36() { + var response; + return _regeneratorRuntime().wrap(function _callee36$(_context36) { + while (1) switch (_context36.prev = _context36.next) { + case 0: + _context36.next = 2; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getCourse */ "y"], payload); + case 2: + response = _context36.sent; + return _context36.abrupt("return", response); + case 4: + case "end": + return _context36.stop(); + } + }, _callee36); + })(); + } + }, + reducers: { + save: function save(state, action) { + // console.log("reducers:",state,action) + return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, state), action.payload); + } + }, + subscriptions: { + setup: function setup(_ref73) { + var dispatch = _ref73.dispatch, + history = _ref73.history; + // console.log("subscriptions:", dispatch, history) + return history.listen(function (_ref74) { + var pathname = _ref74.pathname; + if (pathname === '/') { + dispatch({ + type: 'query' + }); + } + }); + } + } +}; +/* harmony default export */ __webpack_exports__["a"] = (CompetitionsModel); + +/***/ }), + +/***/ "3cYt": +/*!************************************************!*\ + !*** ./node_modules/lodash/_basePropertyOf.js ***! + \************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +/** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; +} + +module.exports = basePropertyOf; + + +/***/ }), + +/***/ "3tO9": +/*!**************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/objectSpread2.js ***! + \**************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var defineProperty = __webpack_require__(/*! ./defineProperty.js */ "lSNA"); +function ownKeys(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function (r) { + return Object.getOwnPropertyDescriptor(e, r).enumerable; + })), t.push.apply(t, o); + } + return t; +} +function _objectSpread2(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { + defineProperty(e, r, t[r]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); + }); + } + return e; +} +module.exports = _objectSpread2, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "3uUd": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.set.filter.js ***! + \***********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR"); +var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM"); +var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE"); +var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh"); +var getSetIterator = __webpack_require__(/*! ../internals/get-set-iterator */ "WGBp"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN"); + +// `Set.prototype.filter` method +// https://github.com/tc39/proposal-collection-methods +$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { + filter: function filter(callbackfn /* , thisArg */) { + var set = anObject(this); + var iterator = getSetIterator(set); + var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var newSet = new (speciesConstructor(set, getBuiltIn('Set')))(); + var adder = aFunction(newSet.add); + iterate(iterator, function (value) { + if (boundFunction(value, value, set)) adder.call(newSet, value); + }, undefined, false, true); + return newSet; + } +}); + + +/***/ }), + +/***/ "49+q": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.set.add-all.js ***! + \************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR"); +var collectionAddAll = __webpack_require__(/*! ../internals/collection-add-all */ "fXLg"); + +// `Set.prototype.addAll` method +// https://github.com/tc39/proposal-collection-methods +$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { + addAll: function addAll(/* ...elements */) { + return collectionAddAll.apply(this, arguments); + } +}); + + +/***/ }), + +/***/ "49sm": +/*!***************************************!*\ + !*** ./node_modules/isarray/index.js ***! + \***************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; +}; + + +/***/ }), + +/***/ "4Brf": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/es.symbol.description.js ***! + \***************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// `Symbol.prototype.description` getter +// https://tc39.github.io/ecma262/#sec-symbol.prototype.description + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/"); +var global = __webpack_require__(/*! ../internals/global */ "2oRo"); +var has = __webpack_require__(/*! ../internals/has */ "UTVS"); +var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v"); +var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "m/L8").f; +var copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ "6JNq"); + +var NativeSymbol = global.Symbol; + +if (DESCRIPTORS && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) || + // Safari 12 bug + NativeSymbol().description !== undefined +)) { + var EmptyStringDescriptionStore = {}; + // wrap Symbol constructor for correct work with undefined description + var SymbolWrapper = function Symbol() { + var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]); + var result = this instanceof SymbolWrapper + ? new NativeSymbol(description) + // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)' + : description === undefined ? NativeSymbol() : NativeSymbol(description); + if (description === '') EmptyStringDescriptionStore[result] = true; + return result; + }; + copyConstructorProperties(SymbolWrapper, NativeSymbol); + var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype; + symbolPrototype.constructor = SymbolWrapper; + + var symbolToString = symbolPrototype.toString; + var native = String(NativeSymbol('test')) == 'Symbol(test)'; + var regexp = /^Symbol\((.*)\)[^)]+$/; + defineProperty(symbolPrototype, 'description', { + configurable: true, + get: function description() { + var symbol = isObject(this) ? this.valueOf() : this; + var string = symbolToString.call(symbol); + if (has(EmptyStringDescriptionStore, symbol)) return ''; + var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1'); + return desc === '' ? undefined : desc; + } + }); + + $({ global: true, forced: true }, { + Symbol: SymbolWrapper + }); +} + + +/***/ }), + +/***/ "4IlW": +/*!********************************************!*\ + !*** ./node_modules/rc-util/es/KeyCode.js ***! + \********************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * @ignore + * some key-codes definition and utils from closure-library + * @author yiminghe@gmail.com + */ + +var KeyCode = { + /** + * MAC_ENTER + */ + MAC_ENTER: 3, + /** + * BACKSPACE + */ + BACKSPACE: 8, + /** + * TAB + */ + TAB: 9, + /** + * NUMLOCK on FF/Safari Mac + */ + NUM_CENTER: 12, + // NUMLOCK on FF/Safari Mac + /** + * ENTER + */ + ENTER: 13, + /** + * SHIFT + */ + SHIFT: 16, + /** + * CTRL + */ + CTRL: 17, + /** + * ALT + */ + ALT: 18, + /** + * PAUSE + */ + PAUSE: 19, + /** + * CAPS_LOCK + */ + CAPS_LOCK: 20, + /** + * ESC + */ + ESC: 27, + /** + * SPACE + */ + SPACE: 32, + /** + * PAGE_UP + */ + PAGE_UP: 33, + // also NUM_NORTH_EAST + /** + * PAGE_DOWN + */ + PAGE_DOWN: 34, + // also NUM_SOUTH_EAST + /** + * END + */ + END: 35, + // also NUM_SOUTH_WEST + /** + * HOME + */ + HOME: 36, + // also NUM_NORTH_WEST + /** + * LEFT + */ + LEFT: 37, + // also NUM_WEST + /** + * UP + */ + UP: 38, + // also NUM_NORTH + /** + * RIGHT + */ + RIGHT: 39, + // also NUM_EAST + /** + * DOWN + */ + DOWN: 40, + // also NUM_SOUTH + /** + * PRINT_SCREEN + */ + PRINT_SCREEN: 44, + /** + * INSERT + */ + INSERT: 45, + // also NUM_INSERT + /** + * DELETE + */ + DELETE: 46, + // also NUM_DELETE + /** + * ZERO + */ + ZERO: 48, + /** + * ONE + */ + ONE: 49, + /** + * TWO + */ + TWO: 50, + /** + * THREE + */ + THREE: 51, + /** + * FOUR + */ + FOUR: 52, + /** + * FIVE + */ + FIVE: 53, + /** + * SIX + */ + SIX: 54, + /** + * SEVEN + */ + SEVEN: 55, + /** + * EIGHT + */ + EIGHT: 56, + /** + * NINE + */ + NINE: 57, + /** + * QUESTION_MARK + */ + QUESTION_MARK: 63, + // needs localization + /** + * A + */ + A: 65, + /** + * B + */ + B: 66, + /** + * C + */ + C: 67, + /** + * D + */ + D: 68, + /** + * E + */ + E: 69, + /** + * F + */ + F: 70, + /** + * G + */ + G: 71, + /** + * H + */ + H: 72, + /** + * I + */ + I: 73, + /** + * J + */ + J: 74, + /** + * K + */ + K: 75, + /** + * L + */ + L: 76, + /** + * M + */ + M: 77, + /** + * N + */ + N: 78, + /** + * O + */ + O: 79, + /** + * P + */ + P: 80, + /** + * Q + */ + Q: 81, + /** + * R + */ + R: 82, + /** + * S + */ + S: 83, + /** + * T + */ + T: 84, + /** + * U + */ + U: 85, + /** + * V + */ + V: 86, + /** + * W + */ + W: 87, + /** + * X + */ + X: 88, + /** + * Y + */ + Y: 89, + /** + * Z + */ + Z: 90, + /** + * META + */ + META: 91, + // WIN_KEY_LEFT + /** + * WIN_KEY_RIGHT + */ + WIN_KEY_RIGHT: 92, + /** + * CONTEXT_MENU + */ + CONTEXT_MENU: 93, + /** + * NUM_ZERO + */ + NUM_ZERO: 96, + /** + * NUM_ONE + */ + NUM_ONE: 97, + /** + * NUM_TWO + */ + NUM_TWO: 98, + /** + * NUM_THREE + */ + NUM_THREE: 99, + /** + * NUM_FOUR + */ + NUM_FOUR: 100, + /** + * NUM_FIVE + */ + NUM_FIVE: 101, + /** + * NUM_SIX + */ + NUM_SIX: 102, + /** + * NUM_SEVEN + */ + NUM_SEVEN: 103, + /** + * NUM_EIGHT + */ + NUM_EIGHT: 104, + /** + * NUM_NINE + */ + NUM_NINE: 105, + /** + * NUM_MULTIPLY + */ + NUM_MULTIPLY: 106, + /** + * NUM_PLUS + */ + NUM_PLUS: 107, + /** + * NUM_MINUS + */ + NUM_MINUS: 109, + /** + * NUM_PERIOD + */ + NUM_PERIOD: 110, + /** + * NUM_DIVISION + */ + NUM_DIVISION: 111, + /** + * F1 + */ + F1: 112, + /** + * F2 + */ + F2: 113, + /** + * F3 + */ + F3: 114, + /** + * F4 + */ + F4: 115, + /** + * F5 + */ + F5: 116, + /** + * F6 + */ + F6: 117, + /** + * F7 + */ + F7: 118, + /** + * F8 + */ + F8: 119, + /** + * F9 + */ + F9: 120, + /** + * F10 + */ + F10: 121, + /** + * F11 + */ + F11: 122, + /** + * F12 + */ + F12: 123, + /** + * NUMLOCK + */ + NUMLOCK: 144, + /** + * SEMICOLON + */ + SEMICOLON: 186, + // needs localization + /** + * DASH + */ + DASH: 189, + // needs localization + /** + * EQUALS + */ + EQUALS: 187, + // needs localization + /** + * COMMA + */ + COMMA: 188, + // needs localization + /** + * PERIOD + */ + PERIOD: 190, + // needs localization + /** + * SLASH + */ + SLASH: 191, + // needs localization + /** + * APOSTROPHE + */ + APOSTROPHE: 192, + // needs localization + /** + * SINGLE_QUOTE + */ + SINGLE_QUOTE: 222, + // needs localization + /** + * OPEN_SQUARE_BRACKET + */ + OPEN_SQUARE_BRACKET: 219, + // needs localization + /** + * BACKSLASH + */ + BACKSLASH: 220, + // needs localization + /** + * CLOSE_SQUARE_BRACKET + */ + CLOSE_SQUARE_BRACKET: 221, + // needs localization + /** + * WIN_KEY + */ + WIN_KEY: 224, + /** + * MAC_FF_META + */ + MAC_FF_META: 224, + // Firefox (Gecko) fires this for the meta key instead of 91 + /** + * WIN_IME + */ + WIN_IME: 229, + // ======================== Function ======================== + /** + * whether text and modified key is entered at the same time. + */ + isTextModifyingKeyEvent: function isTextModifyingKeyEvent(e) { + var keyCode = e.keyCode; + if (e.altKey && !e.ctrlKey || e.metaKey || + // Function keys don't generate text + keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) { + return false; + } + + // The following keys are quite harmless, even in combination with + // CTRL, ALT or SHIFT. + switch (keyCode) { + case KeyCode.ALT: + case KeyCode.CAPS_LOCK: + case KeyCode.CONTEXT_MENU: + case KeyCode.CTRL: + case KeyCode.DOWN: + case KeyCode.END: + case KeyCode.ESC: + case KeyCode.HOME: + case KeyCode.INSERT: + case KeyCode.LEFT: + case KeyCode.MAC_FF_META: + case KeyCode.META: + case KeyCode.NUMLOCK: + case KeyCode.NUM_CENTER: + case KeyCode.PAGE_DOWN: + case KeyCode.PAGE_UP: + case KeyCode.PAUSE: + case KeyCode.PRINT_SCREEN: + case KeyCode.RIGHT: + case KeyCode.SHIFT: + case KeyCode.UP: + case KeyCode.WIN_KEY: + case KeyCode.WIN_KEY_RIGHT: + return false; + default: + return true; + } + }, + /** + * whether character is entered. + */ + isCharacterKey: function isCharacterKey(keyCode) { + if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) { + return true; + } + if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) { + return true; + } + if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) { + return true; + } + + // Safari sends zero key code for non-latin characters. + if (window.navigator.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) { + return true; + } + switch (keyCode) { + case KeyCode.SPACE: + case KeyCode.QUESTION_MARK: + case KeyCode.NUM_PLUS: + case KeyCode.NUM_MINUS: + case KeyCode.NUM_PERIOD: + case KeyCode.NUM_DIVISION: + case KeyCode.SEMICOLON: + case KeyCode.DASH: + case KeyCode.EQUALS: + case KeyCode.COMMA: + case KeyCode.PERIOD: + case KeyCode.SLASH: + case KeyCode.APOSTROPHE: + case KeyCode.SINGLE_QUOTE: + case KeyCode.OPEN_SQUARE_BRACKET: + case KeyCode.BACKSLASH: + case KeyCode.CLOSE_SQUARE_BRACKET: + return true; + default: + return false; + } + } +}; +/* harmony default export */ __webpack_exports__["a"] = (KeyCode); + +/***/ }), + +/***/ "4MGa": +/*!********************************************!*\ + !*** ./src/styles/iconeditor/iconfont.css ***! + \********************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), + +/***/ "4RId": +/*!************************************************************************!*\ + !*** ./node_modules/dva-immer/node_modules/immer/dist/immer.module.js ***! + \************************************************************************/ +/*! exports provided: default, Immer, applyPatches, createDraft, finishDraft, immerable, isDraft, isDraftable, nothing, original, produce, setAutoFreeze, setUseProxies */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module uses injected variables (process) */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Immer", function() { return Immer; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applyPatches", function() { return applyPatches$1; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createDraft", function() { return createDraft; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "finishDraft", function() { return finishDraft; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "immerable", function() { return DRAFTABLE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDraft", function() { return isDraft; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDraftable", function() { return isDraftable; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nothing", function() { return NOTHING; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "original", function() { return original; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "produce", function() { return produce; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAutoFreeze", function() { return setAutoFreeze; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setUseProxies", function() { return setUseProxies; }); +var obj; +var NOTHING = typeof Symbol !== "undefined" ? Symbol("immer-nothing") : ( obj = {}, obj["immer-nothing"] = true, obj ); +var DRAFTABLE = typeof Symbol !== "undefined" ? Symbol.for("immer-draftable") : "__$immer_draftable"; +var DRAFT_STATE = typeof Symbol !== "undefined" ? Symbol.for("immer-state") : "__$immer_state"; +function isDraft(value) { + return !!value && !!value[DRAFT_STATE]; +} +function isDraftable(value) { + if (!value || typeof value !== "object") { return false; } + if (Array.isArray(value)) { return true; } + var proto = Object.getPrototypeOf(value); + if (!proto || proto === Object.prototype) { return true; } + return !!value[DRAFTABLE] || !!value.constructor[DRAFTABLE]; +} +function original(value) { + if (value && value[DRAFT_STATE]) { + return value[DRAFT_STATE].base; + } // otherwise return undefined + +} +var assign = Object.assign || function assign(target, value) { + for (var key in value) { + if (has(value, key)) { + target[key] = value[key]; + } + } + + return target; +}; +var ownKeys = typeof Reflect !== "undefined" && Reflect.ownKeys ? Reflect.ownKeys : typeof Object.getOwnPropertySymbols !== "undefined" ? function (obj) { return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj)); } : Object.getOwnPropertyNames; +function shallowCopy(base, invokeGetters) { + if ( invokeGetters === void 0 ) invokeGetters = false; + + if (Array.isArray(base)) { return base.slice(); } + var clone = Object.create(Object.getPrototypeOf(base)); + ownKeys(base).forEach(function (key) { + if (key === DRAFT_STATE) { + return; // Never copy over draft state. + } + + var desc = Object.getOwnPropertyDescriptor(base, key); + var value = desc.value; + + if (desc.get) { + if (!invokeGetters) { + throw new Error("Immer drafts cannot have computed properties"); + } + + value = desc.get.call(base); + } + + if (desc.enumerable) { + clone[key] = value; + } else { + Object.defineProperty(clone, key, { + value: value, + writable: true, + configurable: true + }); + } + }); + return clone; +} +function each(value, cb) { + if (Array.isArray(value)) { + for (var i = 0; i < value.length; i++) { cb(i, value[i], value); } + } else { + ownKeys(value).forEach(function (key) { return cb(key, value[key], value); }); + } +} +function isEnumerable(base, prop) { + return Object.getOwnPropertyDescriptor(base, prop).enumerable; +} +function has(thing, prop) { + return Object.prototype.hasOwnProperty.call(thing, prop); +} +function is(x, y) { + // From: https://github.com/facebook/fbjs/blob/c69904a511b900266935168223063dd8772dfc40/packages/fbjs/src/core/shallowEqual.js + if (x === y) { + return x !== 0 || 1 / x === 1 / y; + } else { + return x !== x && y !== y; + } +} + +/** Each scope represents a `produce` call. */ + +var ImmerScope = function ImmerScope(parent) { + this.drafts = []; + this.parent = parent; // Whenever the modified draft contains a draft from another scope, we + // need to prevent auto-freezing so the unowned draft can be finalized. + + this.canAutoFreeze = true; // To avoid prototype lookups: + + this.patches = null; +}; + +ImmerScope.prototype.usePatches = function usePatches (patchListener) { + if (patchListener) { + this.patches = []; + this.inversePatches = []; + this.patchListener = patchListener; + } +}; + +ImmerScope.prototype.revoke = function revoke$1 () { + this.leave(); + this.drafts.forEach(revoke); + this.drafts = null; // Make draft-related methods throw. +}; + +ImmerScope.prototype.leave = function leave () { + if (this === ImmerScope.current) { + ImmerScope.current = this.parent; + } +}; +ImmerScope.current = null; + +ImmerScope.enter = function () { + return this.current = new ImmerScope(this.current); +}; + +function revoke(draft) { + draft[DRAFT_STATE].revoke(); +} + +// but share them all instead + +var descriptors = {}; +function willFinalize(scope, result, isReplaced) { + scope.drafts.forEach(function (draft) { + draft[DRAFT_STATE].finalizing = true; + }); + + if (!isReplaced) { + if (scope.patches) { + markChangesRecursively(scope.drafts[0]); + } // This is faster when we don't care about which attributes changed. + + + markChangesSweep(scope.drafts); + } // When a child draft is returned, look for changes. + else if (isDraft(result) && result[DRAFT_STATE].scope === scope) { + markChangesSweep(scope.drafts); + } +} +function createProxy(base, parent) { + var isArray = Array.isArray(base); + var draft = clonePotentialDraft(base); + each(draft, function (prop) { + proxyProperty(draft, prop, isArray || isEnumerable(base, prop)); + }); // See "proxy.js" for property documentation. + + var scope = parent ? parent.scope : ImmerScope.current; + var state = { + scope: scope, + modified: false, + finalizing: false, + // es5 only + finalized: false, + assigned: {}, + parent: parent, + base: base, + draft: draft, + copy: null, + revoke: revoke$1, + revoked: false // es5 only + + }; + createHiddenProperty(draft, DRAFT_STATE, state); + scope.drafts.push(draft); + return draft; +} + +function revoke$1() { + this.revoked = true; +} + +function source(state) { + return state.copy || state.base; +} // Access a property without creating an Immer draft. + + +function peek(draft, prop) { + var state = draft[DRAFT_STATE]; + + if (state && !state.finalizing) { + state.finalizing = true; + var value = draft[prop]; + state.finalizing = false; + return value; + } + + return draft[prop]; +} + +function get(state, prop) { + assertUnrevoked(state); + var value = peek(source(state), prop); + if (state.finalizing) { return value; } // Create a draft if the value is unmodified. + + if (value === peek(state.base, prop) && isDraftable(value)) { + prepareCopy(state); + return state.copy[prop] = createProxy(value, state); + } + + return value; +} + +function set(state, prop, value) { + assertUnrevoked(state); + state.assigned[prop] = true; + + if (!state.modified) { + if (is(value, peek(source(state), prop))) { return; } + markChanged(state); + prepareCopy(state); + } + + state.copy[prop] = value; +} + +function markChanged(state) { + if (!state.modified) { + state.modified = true; + if (state.parent) { markChanged(state.parent); } + } +} + +function prepareCopy(state) { + if (!state.copy) { state.copy = clonePotentialDraft(state.base); } +} + +function clonePotentialDraft(base) { + var state = base && base[DRAFT_STATE]; + + if (state) { + state.finalizing = true; + var draft = shallowCopy(state.draft, true); + state.finalizing = false; + return draft; + } + + return shallowCopy(base); +} + +function proxyProperty(draft, prop, enumerable) { + var desc = descriptors[prop]; + + if (desc) { + desc.enumerable = enumerable; + } else { + descriptors[prop] = desc = { + configurable: true, + enumerable: enumerable, + + get: function get$1() { + return get(this[DRAFT_STATE], prop); + }, + + set: function set$1(value) { + set(this[DRAFT_STATE], prop, value); + } + + }; + } + + Object.defineProperty(draft, prop, desc); +} + +function assertUnrevoked(state) { + if (state.revoked === true) { throw new Error("Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? " + JSON.stringify(source(state))); } +} // This looks expensive, but only proxies are visited, and only objects without known changes are scanned. + + +function markChangesSweep(drafts) { + // The natural order of drafts in the `scope` array is based on when they + // were accessed. By processing drafts in reverse natural order, we have a + // better chance of processing leaf nodes first. When a leaf node is known to + // have changed, we can avoid any traversal of its ancestor nodes. + for (var i = drafts.length - 1; i >= 0; i--) { + var state = drafts[i][DRAFT_STATE]; + + if (!state.modified) { + if (Array.isArray(state.base)) { + if (hasArrayChanges(state)) { markChanged(state); } + } else if (hasObjectChanges(state)) { markChanged(state); } + } + } +} + +function markChangesRecursively(object) { + if (!object || typeof object !== "object") { return; } + var state = object[DRAFT_STATE]; + if (!state) { return; } + var base = state.base; + var draft = state.draft; + var assigned = state.assigned; + + if (!Array.isArray(object)) { + // Look for added keys. + Object.keys(draft).forEach(function (key) { + // The `undefined` check is a fast path for pre-existing keys. + if (base[key] === undefined && !has(base, key)) { + assigned[key] = true; + markChanged(state); + } else if (!assigned[key]) { + // Only untouched properties trigger recursion. + markChangesRecursively(draft[key]); + } + }); // Look for removed keys. + + Object.keys(base).forEach(function (key) { + // The `undefined` check is a fast path for pre-existing keys. + if (draft[key] === undefined && !has(draft, key)) { + assigned[key] = false; + markChanged(state); + } + }); + } else if (hasArrayChanges(state)) { + markChanged(state); + assigned.length = true; + + if (draft.length < base.length) { + for (var i = draft.length; i < base.length; i++) { assigned[i] = false; } + } else { + for (var i$1 = base.length; i$1 < draft.length; i$1++) { assigned[i$1] = true; } + } + + for (var i$2 = 0; i$2 < draft.length; i$2++) { + // Only untouched indices trigger recursion. + if (assigned[i$2] === undefined) { markChangesRecursively(draft[i$2]); } + } + } +} + +function hasObjectChanges(state) { + var base = state.base; + var draft = state.draft; // Search for added keys and changed keys. Start at the back, because + // non-numeric keys are ordered by time of definition on the object. + + var keys = Object.keys(draft); + + for (var i = keys.length - 1; i >= 0; i--) { + var key = keys[i]; + var baseValue = base[key]; // The `undefined` check is a fast path for pre-existing keys. + + if (baseValue === undefined && !has(base, key)) { + return true; + } // Once a base key is deleted, future changes go undetected, because its + // descriptor is erased. This branch detects any missed changes. + else { + var value = draft[key]; + var state$1 = value && value[DRAFT_STATE]; + + if (state$1 ? state$1.base !== baseValue : !is(value, baseValue)) { + return true; + } + } + } // At this point, no keys were added or changed. + // Compare key count to determine if keys were deleted. + + + return keys.length !== Object.keys(base).length; +} + +function hasArrayChanges(state) { + var draft = state.draft; + if (draft.length !== state.base.length) { return true; } // See #116 + // If we first shorten the length, our array interceptors will be removed. + // If after that new items are added, result in the same original length, + // those last items will have no intercepting property. + // So if there is no own descriptor on the last position, we know that items were removed and added + // N.B.: splice, unshift, etc only shift values around, but not prop descriptors, so we only have to check + // the last one + + var descriptor = Object.getOwnPropertyDescriptor(draft, draft.length - 1); // descriptor can be null, but only for newly created sparse arrays, eg. new Array(10) + + if (descriptor && !descriptor.get) { return true; } // For all other cases, we don't have to compare, as they would have been picked up by the index setters + + return false; +} + +function createHiddenProperty(target, prop, value) { + Object.defineProperty(target, prop, { + value: value, + enumerable: false, + writable: true + }); +} + +var legacyProxy = /*#__PURE__*/Object.freeze({ + willFinalize: willFinalize, + createProxy: createProxy +}); + +function willFinalize$1() {} +function createProxy$1(base, parent) { + var scope = parent ? parent.scope : ImmerScope.current; + var state = { + // Track which produce call this is associated with. + scope: scope, + // True for both shallow and deep changes. + modified: false, + // Used during finalization. + finalized: false, + // Track which properties have been assigned (true) or deleted (false). + assigned: {}, + // The parent draft state. + parent: parent, + // The base state. + base: base, + // The base proxy. + draft: null, + // Any property proxies. + drafts: {}, + // The base copy with any updated values. + copy: null, + // Called by the `produce` function. + revoke: null + }; + var ref = Array.isArray(base) ? // [state] is used for arrays, to make sure the proxy is array-ish and not violate invariants, + // although state itself is an object + Proxy.revocable([state], arrayTraps) : Proxy.revocable(state, objectTraps); + var revoke = ref.revoke; + var proxy = ref.proxy; + state.draft = proxy; + state.revoke = revoke; + scope.drafts.push(proxy); + return proxy; +} +var objectTraps = { + get: get$1, + + has: function has(target, prop) { + return prop in source$1(target); + }, + + ownKeys: function ownKeys(target) { + return Reflect.ownKeys(source$1(target)); + }, + + set: set$1, + deleteProperty: deleteProperty, + getOwnPropertyDescriptor: getOwnPropertyDescriptor, + + defineProperty: function defineProperty() { + throw new Error("Object.defineProperty() cannot be used on an Immer draft"); // prettier-ignore + }, + + getPrototypeOf: function getPrototypeOf(target) { + return Object.getPrototypeOf(target.base); + }, + + setPrototypeOf: function setPrototypeOf() { + throw new Error("Object.setPrototypeOf() cannot be used on an Immer draft"); // prettier-ignore + } + +}; +var arrayTraps = {}; +each(objectTraps, function (key, fn) { + arrayTraps[key] = function () { + arguments[0] = arguments[0][0]; + return fn.apply(this, arguments); + }; +}); + +arrayTraps.deleteProperty = function (state, prop) { + if (isNaN(parseInt(prop))) { + throw new Error("Immer only supports deleting array indices"); // prettier-ignore + } + + return objectTraps.deleteProperty.call(this, state[0], prop); +}; + +arrayTraps.set = function (state, prop, value) { + if (prop !== "length" && isNaN(parseInt(prop))) { + throw new Error("Immer only supports setting array indices and the 'length' property"); // prettier-ignore + } + + return objectTraps.set.call(this, state[0], prop, value); +}; // returns the object we should be reading the current value from, which is base, until some change has been made + + +function source$1(state) { + return state.copy || state.base; +} // Access a property without creating an Immer draft. + + +function peek$1(draft, prop) { + var state = draft[DRAFT_STATE]; + var desc = Reflect.getOwnPropertyDescriptor(state ? source$1(state) : draft, prop); + return desc && desc.value; +} + +function get$1(state, prop) { + if (prop === DRAFT_STATE) { return state; } + var drafts = state.drafts; // Check for existing draft in unmodified state. + + if (!state.modified && has(drafts, prop)) { + return drafts[prop]; + } + + var value = source$1(state)[prop]; + + if (state.finalized || !isDraftable(value)) { + return value; + } // Check for existing draft in modified state. + + + if (state.modified) { + // Assigned values are never drafted. This catches any drafts we created, too. + if (value !== peek$1(state.base, prop)) { return value; } // Store drafts on the copy (when one exists). + + drafts = state.copy; + } + + return drafts[prop] = createProxy$1(value, state); +} + +function set$1(state, prop, value) { + if (!state.modified) { + var baseValue = peek$1(state.base, prop); // Optimize based on value's truthiness. Truthy values are guaranteed to + // never be undefined, so we can avoid the `in` operator. Lastly, truthy + // values may be drafts, but falsy values are never drafts. + + var isUnchanged = value ? is(baseValue, value) || value === state.drafts[prop] : is(baseValue, value) && prop in state.base; + if (isUnchanged) { return true; } + markChanged$1(state); + } + + state.assigned[prop] = true; + state.copy[prop] = value; + return true; +} + +function deleteProperty(state, prop) { + // The `undefined` check is a fast path for pre-existing keys. + if (peek$1(state.base, prop) !== undefined || prop in state.base) { + state.assigned[prop] = false; + markChanged$1(state); + } + + if (state.copy) { delete state.copy[prop]; } + return true; +} // Note: We never coerce `desc.value` into an Immer draft, because we can't make +// the same guarantee in ES5 mode. + + +function getOwnPropertyDescriptor(state, prop) { + var owner = source$1(state); + var desc = Reflect.getOwnPropertyDescriptor(owner, prop); + + if (desc) { + desc.writable = true; + desc.configurable = !Array.isArray(owner) || prop !== "length"; + } + + return desc; +} + +function markChanged$1(state) { + if (!state.modified) { + state.modified = true; + state.copy = assign(shallowCopy(state.base), state.drafts); + state.drafts = null; + if (state.parent) { markChanged$1(state.parent); } + } +} + +var modernProxy = /*#__PURE__*/Object.freeze({ + willFinalize: willFinalize$1, + createProxy: createProxy$1 +}); + +function generatePatches(state, basePath, patches, inversePatches) { + Array.isArray(state.base) ? generateArrayPatches(state, basePath, patches, inversePatches) : generateObjectPatches(state, basePath, patches, inversePatches); +} + +function generateArrayPatches(state, basePath, patches, inversePatches) { + var assign, assign$1; + + var base = state.base; + var copy = state.copy; + var assigned = state.assigned; // Reduce complexity by ensuring `base` is never longer. + + if (copy.length < base.length) { + (assign = [copy, base], base = assign[0], copy = assign[1]); + (assign$1 = [inversePatches, patches], patches = assign$1[0], inversePatches = assign$1[1]); + } + + var delta = copy.length - base.length; // Find the first replaced index. + + var start = 0; + + while (base[start] === copy[start] && start < base.length) { + ++start; + } // Find the last replaced index. Search from the end to optimize splice patches. + + + var end = base.length; + + while (end > start && base[end - 1] === copy[end + delta - 1]) { + --end; + } // Process replaced indices. + + + for (var i = start; i < end; ++i) { + if (assigned[i] && copy[i] !== base[i]) { + var path = basePath.concat([i]); + patches.push({ + op: "replace", + path: path, + value: copy[i] + }); + inversePatches.push({ + op: "replace", + path: path, + value: base[i] + }); + } + } + + var useRemove = end != base.length; + var replaceCount = patches.length; // Process added indices. + + for (var i$1 = end + delta - 1; i$1 >= end; --i$1) { + var path$1 = basePath.concat([i$1]); + patches[replaceCount + i$1 - end] = { + op: "add", + path: path$1, + value: copy[i$1] + }; + + if (useRemove) { + inversePatches.push({ + op: "remove", + path: path$1 + }); + } + } // One "replace" patch reverses all non-splicing "add" patches. + + + if (!useRemove) { + inversePatches.push({ + op: "replace", + path: basePath.concat(["length"]), + value: base.length + }); + } +} + +function generateObjectPatches(state, basePath, patches, inversePatches) { + var base = state.base; + var copy = state.copy; + each(state.assigned, function (key, assignedValue) { + var origValue = base[key]; + var value = copy[key]; + var op = !assignedValue ? "remove" : key in base ? "replace" : "add"; + if (origValue === value && op === "replace") { return; } + var path = basePath.concat(key); + patches.push(op === "remove" ? { + op: op, + path: path + } : { + op: op, + path: path, + value: value + }); + inversePatches.push(op === "add" ? { + op: "remove", + path: path + } : op === "remove" ? { + op: "add", + path: path, + value: origValue + } : { + op: "replace", + path: path, + value: origValue + }); + }); +} + +function applyPatches(draft, patches) { + for (var i = 0; i < patches.length; i++) { + var patch = patches[i]; + var path = patch.path; + + if (path.length === 0 && patch.op === "replace") { + draft = patch.value; + } else { + var base = draft; + + for (var i$1 = 0; i$1 < path.length - 1; i$1++) { + base = base[path[i$1]]; + if (!base || typeof base !== "object") { throw new Error("Cannot apply patch, path doesn't resolve: " + path.join("/")); } // prettier-ignore + } + + var key = path[path.length - 1]; + + switch (patch.op) { + case "replace": + base[key] = patch.value; + break; + + case "add": + if (Array.isArray(base)) { + // TODO: support "foo/-" paths for appending to an array + base.splice(key, 0, patch.value); + } else { + base[key] = patch.value; + } + + break; + + case "remove": + if (Array.isArray(base)) { + base.splice(key, 1); + } else { + delete base[key]; + } + + break; + + default: + throw new Error("Unsupported patch operation: " + patch.op); + } + } + } + + return draft; +} + +function verifyMinified() {} + +var configDefaults = { + useProxies: typeof Proxy !== "undefined" && typeof Reflect !== "undefined", + autoFreeze: typeof process !== "undefined" ? "production" !== "production" : verifyMinified.name === "verifyMinified", + onAssign: null, + onDelete: null, + onCopy: null +}; +var Immer = function Immer(config) { + assign(this, configDefaults, config); + this.setUseProxies(this.useProxies); + this.produce = this.produce.bind(this); +}; + +Immer.prototype.produce = function produce (base, recipe, patchListener) { + var this$1 = this; + + // curried invocation + if (typeof base === "function" && typeof recipe !== "function") { + var defaultBase = recipe; + recipe = base; // prettier-ignore + + return function (base) { + if ( base === void 0 ) base = defaultBase; + var args = [], len = arguments.length - 1; + while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ]; + + return this$1.produce(base, function (draft) { return recipe.call.apply(recipe, [ draft, draft ].concat( args )); }); + }; + } // prettier-ignore + + + { + if (typeof recipe !== "function") { + throw new Error("The first or second argument to `produce` must be a function"); + } + + if (patchListener !== undefined && typeof patchListener !== "function") { + throw new Error("The third argument to `produce` must be a function or undefined"); + } + } + var result; // Only plain objects, arrays, and "immerable classes" are drafted. + + if (isDraftable(base)) { + var scope = ImmerScope.enter(); + var proxy = this.createProxy(base); + var hasError = true; + + try { + result = recipe.call(proxy, proxy); + hasError = false; + } finally { + // finally instead of catch + rethrow better preserves original stack + if (hasError) { scope.revoke(); }else { scope.leave(); } + } + + if (result instanceof Promise) { + return result.then(function (result) { + scope.usePatches(patchListener); + return this$1.processResult(result, scope); + }, function (error) { + scope.revoke(); + throw error; + }); + } + + scope.usePatches(patchListener); + return this.processResult(result, scope); + } else { + result = recipe(base); + if (result === undefined) { return base; } + return result !== NOTHING ? result : undefined; + } +}; + +Immer.prototype.createDraft = function createDraft (base) { + if (!isDraftable(base)) { + throw new Error("First argument to `createDraft` must be a plain object, an array, or an immerable object"); // prettier-ignore + } + + var scope = ImmerScope.enter(); + var proxy = this.createProxy(base); + proxy[DRAFT_STATE].isManual = true; + scope.leave(); + return proxy; +}; + +Immer.prototype.finishDraft = function finishDraft (draft, patchListener) { + var state = draft && draft[DRAFT_STATE]; + + if (!state || !state.isManual) { + throw new Error("First argument to `finishDraft` must be a draft returned by `createDraft`"); // prettier-ignore + } + + if (state.finalized) { + throw new Error("The given draft is already finalized"); // prettier-ignore + } + + var scope = state.scope; + scope.usePatches(patchListener); + return this.processResult(undefined, scope); +}; + +Immer.prototype.setAutoFreeze = function setAutoFreeze (value) { + this.autoFreeze = value; +}; + +Immer.prototype.setUseProxies = function setUseProxies (value) { + this.useProxies = value; + assign(this, value ? modernProxy : legacyProxy); +}; + +Immer.prototype.applyPatches = function applyPatches$1 (base, patches) { + // Mutate the base state when a draft is passed. + if (isDraft(base)) { + return applyPatches(base, patches); + } // Otherwise, produce a copy of the base state. + + + return this.produce(base, function (draft) { return applyPatches(draft, patches); }); +}; +/** @internal */ + + +Immer.prototype.processResult = function processResult (result, scope) { + var baseDraft = scope.drafts[0]; + var isReplaced = result !== undefined && result !== baseDraft; + this.willFinalize(scope, result, isReplaced); + + if (isReplaced) { + if (baseDraft[DRAFT_STATE].modified) { + scope.revoke(); + throw new Error("An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."); // prettier-ignore + } + + if (isDraftable(result)) { + // Finalize the result in case it contains (or is) a subset of the draft. + result = this.finalize(result, null, scope); + } + + if (scope.patches) { + scope.patches.push({ + op: "replace", + path: [], + value: result + }); + scope.inversePatches.push({ + op: "replace", + path: [], + value: baseDraft[DRAFT_STATE].base + }); + } + } else { + // Finalize the base draft. + result = this.finalize(baseDraft, [], scope); + } + + scope.revoke(); + + if (scope.patches) { + scope.patchListener(scope.patches, scope.inversePatches); + } + + return result !== NOTHING ? result : undefined; +}; +/** + * @internal + * Finalize a draft, returning either the unmodified base state or a modified + * copy of the base state. + */ + + +Immer.prototype.finalize = function finalize (draft, path, scope) { + var this$1 = this; + + var state = draft[DRAFT_STATE]; + + if (!state) { + if (Object.isFrozen(draft)) { return draft; } + return this.finalizeTree(draft, null, scope); + } // Never finalize drafts owned by another scope. + + + if (state.scope !== scope) { + return draft; + } + + if (!state.modified) { + return state.base; + } + + if (!state.finalized) { + state.finalized = true; + this.finalizeTree(state.draft, path, scope); + + if (this.onDelete) { + // The `assigned` object is unreliable with ES5 drafts. + if (this.useProxies) { + var assigned = state.assigned; + + for (var prop in assigned) { + if (!assigned[prop]) { this.onDelete(state, prop); } + } + } else { + var base = state.base; + var copy = state.copy; + each(base, function (prop) { + if (!has(copy, prop)) { this$1.onDelete(state, prop); } + }); + } + } + + if (this.onCopy) { + this.onCopy(state); + } // At this point, all descendants of `state.copy` have been finalized, + // so we can be sure that `scope.canAutoFreeze` is accurate. + + + if (this.autoFreeze && scope.canAutoFreeze) { + Object.freeze(state.copy); + } + + if (path && scope.patches) { + generatePatches(state, path, scope.patches, scope.inversePatches); + } + } + + return state.copy; +}; +/** + * @internal + * Finalize all drafts in the given state tree. + */ + + +Immer.prototype.finalizeTree = function finalizeTree (root, rootPath, scope) { + var this$1 = this; + + var state = root[DRAFT_STATE]; + + if (state) { + if (!this.useProxies) { + // Create the final copy, with added keys and without deleted keys. + state.copy = shallowCopy(state.draft, true); + } + + root = state.copy; + } + + var needPatches = !!rootPath && !!scope.patches; + + var finalizeProperty = function (prop, value, parent) { + if (value === parent) { + throw Error("Immer forbids circular references"); + } // In the `finalizeTree` method, only the `root` object may be a draft. + + + var isDraftProp = !!state && parent === root; + + if (isDraft(value)) { + var path = isDraftProp && needPatches && !state.assigned[prop] ? rootPath.concat(prop) : null; // Drafts owned by `scope` are finalized here. + + value = this$1.finalize(value, path, scope); // Drafts from another scope must prevent auto-freezing. + + if (isDraft(value)) { + scope.canAutoFreeze = false; + } // Preserve non-enumerable properties. + + + if (Array.isArray(parent) || isEnumerable(parent, prop)) { + parent[prop] = value; + } else { + Object.defineProperty(parent, prop, { + value: value + }); + } // Unchanged drafts are never passed to the `onAssign` hook. + + + if (isDraftProp && value === state.base[prop]) { return; } + } // Unchanged draft properties are ignored. + else if (isDraftProp && is(value, state.base[prop])) { + return; + } // Search new objects for unfinalized drafts. Frozen objects should never contain drafts. + else if (isDraftable(value) && !Object.isFrozen(value)) { + each(value, finalizeProperty); + } + + if (isDraftProp && this$1.onAssign) { + this$1.onAssign(state, prop, value); + } + }; + + each(root, finalizeProperty); + return root; +}; + +var immer = new Immer(); +/** + * The `produce` function takes a value and a "recipe function" (whose + * return value often depends on the base state). The recipe function is + * free to mutate its first argument however it wants. All mutations are + * only ever applied to a __copy__ of the base state. + * + * Pass only a function to create a "curried producer" which relieves you + * from passing the recipe function every time. + * + * Only plain objects and arrays are made mutable. All other objects are + * considered uncopyable. + * + * Note: This function is __bound__ to its `Immer` instance. + * + * @param {any} base - the initial state + * @param {Function} producer - function that receives a proxy of the base state as first argument and which can be freely modified + * @param {Function} patchListener - optional function that will be called with all the patches produced here + * @returns {any} a new state, or the initial state if nothing was modified + */ + +var produce = immer.produce; +/** + * Pass true to automatically freeze all copies created by Immer. + * + * By default, auto-freezing is disabled in production. + */ + +var setAutoFreeze = immer.setAutoFreeze.bind(immer); +/** + * Pass true to use the ES2015 `Proxy` class when creating drafts, which is + * always faster than using ES5 proxies. + * + * By default, feature detection is used, so calling this is rarely necessary. + */ + +var setUseProxies = immer.setUseProxies.bind(immer); +/** + * Apply an array of Immer patches to the first argument. + * + * This function is a producer, which means copy-on-write is in effect. + */ + +var applyPatches$1 = immer.applyPatches.bind(immer); +/** + * Create an Immer draft from the given base state, which may be a draft itself. + * The draft can be modified until you finalize it with the `finishDraft` function. + */ + +var createDraft = immer.createDraft.bind(immer); +/** + * Finalize an Immer draft from a `createDraft` call, returning the base state + * (if no changes were made) or a modified copy. The draft must *not* be + * mutated afterwards. + * + * Pass a function as the 2nd argument to generate Immer patches based on the + * changes that were made. + */ + +var finishDraft = immer.finishDraft.bind(immer); + +/* harmony default export */ __webpack_exports__["default"] = (produce); + +//# sourceMappingURL=immer.module.js.map + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node-libs-browser/mock/process.js */ "Q2Ig"))) + +/***/ }), + +/***/ "4WOD": +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/internals/object-get-prototype-of.js ***! + \*******************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(/*! ../internals/has */ "UTVS"); +var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW"); +var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "93I0"); +var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ "4Xet"); + +var IE_PROTO = sharedKey('IE_PROTO'); +var ObjectPrototype = Object.prototype; + +// `Object.getPrototypeOf` method +// https://tc39.github.io/ecma262/#sec-object.getprototypeof +module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectPrototype : null; +}; + + +/***/ }), + +/***/ "4XaG": +/*!******************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.symbol.observable.js ***! + \******************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n"); + +// `Symbol.observable` well-known symbol +// https://github.com/tc39/proposal-observable +defineWellKnownSymbol('observable'); + + +/***/ }), + +/***/ "4Xet": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/internals/correct-prototype-getter.js ***! + \********************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var fails = __webpack_require__(/*! ../internals/fails */ "0Dky"); + +module.exports = !fails(function () { + function F() { /* empty */ } + F.prototype.constructor = null; + return Object.getPrototypeOf(new F()) !== F.prototype; +}); + + +/***/ }), + +/***/ "4h0Y": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/es.object.is-frozen.js ***! + \*************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var fails = __webpack_require__(/*! ../internals/fails */ "0Dky"); +var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v"); + +var nativeIsFrozen = Object.isFrozen; +var FAILS_ON_PRIMITIVES = fails(function () { nativeIsFrozen(1); }); + +// `Object.isFrozen` method +// https://tc39.github.io/ecma262/#sec-object.isfrozen +$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, { + isFrozen: function isFrozen(it) { + return isObject(it) ? nativeIsFrozen ? nativeIsFrozen(it) : false : true; + } +}); + + +/***/ }), + +/***/ "4mDm": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es.array.iterator.js ***! + \***********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU"); +var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "RNIs"); +var Iterators = __webpack_require__(/*! ../internals/iterators */ "P4y1"); +var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "afO8"); +var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "fdAy"); + +var ARRAY_ITERATOR = 'Array Iterator'; +var setInternalState = InternalStateModule.set; +var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR); + +// `Array.prototype.entries` method +// https://tc39.github.io/ecma262/#sec-array.prototype.entries +// `Array.prototype.keys` method +// https://tc39.github.io/ecma262/#sec-array.prototype.keys +// `Array.prototype.values` method +// https://tc39.github.io/ecma262/#sec-array.prototype.values +// `Array.prototype[@@iterator]` method +// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator +// `CreateArrayIterator` internal method +// https://tc39.github.io/ecma262/#sec-createarrayiterator +module.exports = defineIterator(Array, 'Array', function (iterated, kind) { + setInternalState(this, { + type: ARRAY_ITERATOR, + target: toIndexedObject(iterated), // target + index: 0, // next index + kind: kind // kind + }); +// `%ArrayIteratorPrototype%.next` method +// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next +}, function () { + var state = getInternalState(this); + var target = state.target; + var kind = state.kind; + var index = state.index++; + if (!target || index >= target.length) { + state.target = undefined; + return { value: undefined, done: true }; + } + if (kind == 'keys') return { value: index, done: false }; + if (kind == 'values') return { value: target[index], done: false }; + return { value: [index, target[index]], done: false }; +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% +// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject +// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject +Iterators.Arguments = Iterators.Array; + +// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); + + +/***/ }), + +/***/ "4oU/": +/*!************************************************************!*\ + !*** ./node_modules/core-js/internals/number-is-finite.js ***! + \************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(/*! ../internals/global */ "2oRo"); + +var globalIsFinite = global.isFinite; + +// `Number.isFinite` method +// https://tc39.github.io/ecma262/#sec-number.isfinite +module.exports = Number.isFinite || function isFinite(it) { + return typeof it == 'number' && globalIsFinite(it); +}; + + +/***/ }), + +/***/ "4syw": +/*!********************************************************!*\ + !*** ./node_modules/core-js/internals/redefine-all.js ***! + \********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var redefine = __webpack_require__(/*! ../internals/redefine */ "busE"); + +module.exports = function (target, src, options) { + for (var key in src) redefine(target, key, src[key], options); + return target; +}; + + +/***/ }), + +/***/ "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 */ "q1tI"); +/* 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 _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "wx14"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "zLVn"); +/* harmony import */ var tiny_invariant__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tiny-invariant */ "9R94"); + + + + + + + + + + + +/** + * The public API for a 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 */ "e"], { + history: this.history, + children: this.props.children + }); + }; + + return BrowserRouter; +}(react__WEBPACK_IMPORTED_MODULE_2___default.a.Component); + +if (false) {} + +/** + * The public API for a 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 */ "e"], { + 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_5__[/* default */ "a"])(_ref, ["innerRef", "navigate", "onClick"]); + + var target = rest.target; + + var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__[/* 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 . + */ + + +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_5__[/* default */ "a"])(_ref2, ["component", "replace", "to", "innerRef"]); + + return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[/* __RouterContext */ "h"].Consumer, null, function (context) { + !context ? false ? undefined : Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[/* 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_4__[/* 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 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_5__[/* 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 */ "h"].Consumer, null, function (context) { + !context ? false ? undefined : Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[/* 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 */ "i"])(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_4__[/* default */ "a"])({}, styleProp, {}, activeStyle) : styleProp; + + var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__[/* 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 + + +/***/ }), + +/***/ "58Ye": +/*!******************************!*\ + !*** ./src/styles/base.less ***! + \******************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), + +/***/ "5921": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.map.of.js ***! + \*******************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var of = __webpack_require__(/*! ../internals/collection-of */ "P940"); + +// `Map.of` method +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of +$({ target: 'Map', stat: true }, { + of: of +}); + + +/***/ }), + +/***/ "5D5o": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/es.object.is-sealed.js ***! + \*************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var fails = __webpack_require__(/*! ../internals/fails */ "0Dky"); +var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v"); + +var nativeIsSealed = Object.isSealed; +var FAILS_ON_PRIMITIVES = fails(function () { nativeIsSealed(1); }); + +// `Object.isSealed` method +// https://tc39.github.io/ecma262/#sec-object.issealed +$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, { + isSealed: function isSealed(it) { + return isObject(it) ? nativeIsSealed ? nativeIsSealed(it) : false : true; + } +}); + + +/***/ }), + +/***/ "5DmW": +/*!*******************************************************************************!*\ + !*** ./node_modules/core-js/modules/es.object.get-own-property-descriptor.js ***! + \*******************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var fails = __webpack_require__(/*! ../internals/fails */ "0Dky"); +var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU"); +var nativeGetOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V").f; +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/"); + +var FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); }); +var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES; + +// `Object.getOwnPropertyDescriptor` method +// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor +$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) { + return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key); + } +}); + + +/***/ }), + +/***/ "5FVT": +/*!*************************************!*\ + !*** ./src/models/forums/detail.ts ***! + \*************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw"); +/* harmony import */ var _service_forums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/service/forums */ "h+Ho"); + +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + +var ForumsDetailModal = { + namespace: 'forumsDetail', + state: { + forumsDetailData: {} + }, + effects: { + getForumsDetailData: function getForumsDetailData(_ref, _ref2) { + var payload = _ref.payload; + var call = _ref2.call, + put = _ref2.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { + var response; + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return call(_service_forums__WEBPACK_IMPORTED_MODULE_1__[/* getForumsDetailData */ "b"], payload); + case 2: + response = _context.sent; + _context.next = 5; + return put({ + type: "save", + payload: { + forumsDetailData: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response) + } + }); + case 5: + return _context.abrupt("return", response); + case 6: + case "end": + return _context.stop(); + } + }, _callee); + })(); + }, + setForumsDetailData: function setForumsDetailData(_ref3, _ref4) { + var payload = _ref3.payload; + var call = _ref4.call, + put = _ref4.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return put({ + type: "save", + payload: { + forumsDetailData: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload) + } + }); + case 2: + case "end": + return _context2.stop(); + } + }, _callee2); + })(); + } + }, + reducers: { + save: function save(state, action) { + return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, state), action.payload); + } + }, + subscriptions: { + setup: function setup(_ref5) { + var dispatch = _ref5.dispatch, + history = _ref5.history; + return history.listen(function (_ref6) { + var pathname = _ref6.pathname; + if (pathname === '/') { + dispatch({ + type: 'query' + }); + } + }); + } + } +}; +/* harmony default export */ __webpack_exports__["a"] = (ForumsDetailModal); + +/***/ }), + +/***/ "5GeT": +/*!******************************************************!*\ + !*** ./node_modules/axios/lib/helpers/toFormData.js ***! + \******************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module uses injected variables (Buffer) */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(Buffer) {/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "xTJ+"); +/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosError.js */ "eRe6"); +/* harmony import */ var _platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../platform/node/classes/FormData.js */ "RYHr"); + + + + +// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored + + +/** + * Determines if the given thing is a array or js object. + * + * @param {string} thing - The object or array to be visited. + * + * @returns {boolean} + */ +function isVisitable(thing) { + return _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isPlainObject(thing) || _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isArray(thing); +} + +/** + * It removes the brackets from the end of a string + * + * @param {string} key - The key of the parameter. + * + * @returns {string} the key without the brackets. + */ +function removeBrackets(key) { + return _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].endsWith(key, '[]') ? key.slice(0, -2) : key; +} + +/** + * It takes a path, a key, and a boolean, and returns a string + * + * @param {string} path - The path to the current key. + * @param {string} key - The key of the current object being iterated over. + * @param {string} dots - If true, the key will be rendered with dots instead of brackets. + * + * @returns {string} The path to the current key. + */ +function renderKey(path, key, dots) { + if (!path) return key; + return path.concat(key).map(function each(token, i) { + // eslint-disable-next-line no-param-reassign + token = removeBrackets(token); + return !dots && i ? '[' + token + ']' : token; + }).join(dots ? '.' : ''); +} + +/** + * If the array is an array and none of its elements are visitable, then it's a flat array. + * + * @param {Array} arr - The array to check + * + * @returns {boolean} + */ +function isFlatArray(arr) { + return _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isArray(arr) && !arr.some(isVisitable); +} + +const predicates = _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].toFlatObject(_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"], {}, null, function filter(prop) { + return /^is[A-Z]/.test(prop); +}); + +/** + * Convert a data object to FormData + * + * @param {Object} obj + * @param {?Object} [formData] + * @param {?Object} [options] + * @param {Function} [options.visitor] + * @param {Boolean} [options.metaTokens = true] + * @param {Boolean} [options.dots = false] + * @param {?Boolean} [options.indexes = false] + * + * @returns {Object} + **/ + +/** + * It converts an object into a FormData object + * + * @param {Object} obj - The object to convert to form data. + * @param {string} formData - The FormData object to append to. + * @param {Object} options + * + * @returns + */ +function toFormData(obj, formData, options) { + if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isObject(obj)) { + throw new TypeError('target must be an object'); + } + + // eslint-disable-next-line no-param-reassign + formData = formData || new (_platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"] || FormData)(); + + // eslint-disable-next-line no-param-reassign + options = _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].toFlatObject(options, { + metaTokens: true, + dots: false, + indexes: false + }, false, function defined(option, source) { + // eslint-disable-next-line no-eq-null,eqeqeq + return !_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isUndefined(source[option]); + }); + + const metaTokens = options.metaTokens; + // eslint-disable-next-line no-use-before-define + const visitor = options.visitor || defaultVisitor; + const dots = options.dots; + const indexes = options.indexes; + const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob; + const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isSpecCompliantForm(formData); + + if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isFunction(visitor)) { + throw new TypeError('visitor must be a function'); + } + + function convertValue(value) { + if (value === null) return ''; + + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isDate(value)) { + return value.toISOString(); + } + + if (!useBlob && _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isBlob(value)) { + throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]('Blob is not supported. Use a Buffer instead.'); + } + + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isArrayBuffer(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isTypedArray(value)) { + return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value); + } + + return value; + } + + /** + * Default visitor. + * + * @param {*} value + * @param {String|Number} key + * @param {Array} path + * @this {FormData} + * + * @returns {boolean} return true to visit the each prop of the value recursively + */ + function defaultVisitor(value, key, path) { + let arr = value; + + if (value && !path && typeof value === 'object') { + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].endsWith(key, '{}')) { + // eslint-disable-next-line no-param-reassign + key = metaTokens ? key : key.slice(0, -2); + // eslint-disable-next-line no-param-reassign + value = JSON.stringify(value); + } else if ( + (_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isArray(value) && isFlatArray(value)) || + ((_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isFileList(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].endsWith(key, '[]')) && (arr = _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].toArray(value)) + )) { + // eslint-disable-next-line no-param-reassign + key = removeBrackets(key); + + arr.forEach(function each(el, index) { + !(_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isUndefined(el) || el === null) && formData.append( + // eslint-disable-next-line no-nested-ternary + indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'), + convertValue(el) + ); + }); + return false; + } + } + + if (isVisitable(value)) { + return true; + } + + formData.append(renderKey(path, key, dots), convertValue(value)); + + return false; + } + + const stack = []; + + const exposedHelpers = Object.assign(predicates, { + defaultVisitor, + convertValue, + isVisitable + }); + + function build(value, path) { + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isUndefined(value)) return; + + if (stack.indexOf(value) !== -1) { + throw Error('Circular reference detected in ' + path.join('.')); + } + + stack.push(value); + + _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].forEach(value, function each(el, key) { + const result = !(_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isUndefined(el) || el === null) && visitor.call( + formData, el, _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isString(key) ? key.trim() : key, path, exposedHelpers + ); + + if (result === true) { + build(el, path ? path.concat(key) : [key]); + } + }); + + stack.pop(); + } + + if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isObject(obj)) { + throw new TypeError('data must be an object'); + } + + build(obj); + + return formData; +} + +/* harmony default export */ __webpack_exports__["a"] = (toFormData); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node-libs-browser/node_modules/buffer/index.js */ "HDXh").Buffer)) + +/***/ }), + +/***/ "5JV0": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.set.join.js ***! + \*********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk"); +var getSetIterator = __webpack_require__(/*! ../internals/get-set-iterator */ "WGBp"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN"); + +// `Set.prototype.join` method +// https://github.com/tc39/proposal-collection-methods +$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { + join: function join(separator) { + var set = anObject(this); + var iterator = getSetIterator(set); + var sep = separator === undefined ? ',' : String(separator); + var result = []; + iterate(iterator, result.push, result, false, true); + return result.join(sep); + } +}); + + +/***/ }), + +/***/ "5Q0V": +/*!************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***! + \************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var _typeof = __webpack_require__(/*! ./typeof.js */ "cDf5")["default"]; +function toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); +} +module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "5Tg+": +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/internals/well-known-symbol-wrapped.js ***! + \*********************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp"); + +exports.f = wellKnownSymbol; + + +/***/ }), + +/***/ "5Yz+": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/internals/array-last-index-of.js ***! + \***************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU"); +var toInteger = __webpack_require__(/*! ../internals/to-integer */ "ppGB"); +var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ"); +var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "pkCn"); +var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "rkAj"); + +var min = Math.min; +var nativeLastIndexOf = [].lastIndexOf; +var NEGATIVE_ZERO = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0; +var STRICT_METHOD = arrayMethodIsStrict('lastIndexOf'); +// For preventing possible almost infinite loop in non-standard implementations, test the forward version of the method +var USES_TO_LENGTH = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 }); +var FORCED = NEGATIVE_ZERO || !STRICT_METHOD || !USES_TO_LENGTH; + +// `Array.prototype.lastIndexOf` method implementation +// https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof +module.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { + // convert -0 to +0 + if (NEGATIVE_ZERO) return nativeLastIndexOf.apply(this, arguments) || 0; + var O = toIndexedObject(this); + var length = toLength(O.length); + var index = length - 1; + if (arguments.length > 1) index = min(index, toInteger(arguments[1])); + if (index < 0) index = length + index; + for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0; + return -1; +} : nativeLastIndexOf; + + +/***/ }), + +/***/ "5mCs": +/*!****************************************!*\ + !*** ./src/models/classrooms/index.ts ***! + \****************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */ "oBTY"); +/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw"); +/* harmony import */ var _service_classrooms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/service/classrooms */ "oUNq"); + + +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + +var ClassroomsListModel = { + namespace: 'classroomList', + state: { + name: '', + loading: true, + detailTopBanner: { + // 课堂详情页面头部数据 + }, + detailLeftMenus: { + // 课堂详情页面左侧menus + }, + // 实训作业 + detailShixunsList: {}, + detailGraduationTopicsList: {}, + detailGraduationTaskList: {}, + detailExerciseList: {}, + detailPollsList: {}, + // 普通作业 + detailCommonHomeworksList: {}, + detailAttendancesList: {}, + detailAttendancesDetail: {}, + detailAnnouncementList: {}, + // 资源 + detailAttachmentList: {}, + detailCourseware: {}, + // 我的课堂 + courseMine: {}, + // 视频 + detailVideoList: {}, + //直播 + detailLiveVideoList: {}, + // 问卷 + detailBoardList: {}, + // 课堂分组 + courseGroups: {}, + allCourseGroups: {}, + // 分班 + detailCourseGroupsList: {}, + // 学生 + detailCoursStudentsList: {}, + // 统计 + detailCourseStatisticsList: {}, + // 签到统计 + detailAttendancesStatistic: {}, + // 学习成绩 + detailCourseWorkscore: {}, + // 课堂活跃度 + detailCourseActscore: {}, + // 所有课程列表 + coursesLists: {}, + // 实训所有列表 + shixunLists: {}, + // 学校列表 + schoolList: {}, + taskList: [], + searchMemberList: {}, + //记录操作的action key值 + actionTabs: { + key: '' + }, + listParams: { + order: 'all', + page: 1, + //第一页开始 + limit: 16, + search: '' + }, + shareStatus: false + }, + effects: { + // 教学课堂首页 + getClassroom: function getClassroom(_ref, _ref2) { + var payload = _ref.payload; + var call = _ref2.call, + put = _ref2.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { + var listParams, response; + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + listParams = payload; + _context.next = 3; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomList */ "B"], payload); + case 3: + response = _context.sent; + _context.next = 6; + return put({ + type: 'save', + payload: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ + listParams: listParams + }, response) + }); + case 6: + return _context.abrupt("return", response); + case 7: + case "end": + return _context.stop(); + } + }, _callee); + })(); + }, + // 教学课堂详情头部信息 + getClassroomTopBanner: function getClassroomTopBanner(_ref3, _ref4) { + var payload = _ref3.payload; + var call = _ref4.call, + put = _ref4.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() { + var response; + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomTopBanner */ "F"], payload); + case 2: + response = _context2.sent; + _context2.next = 5; + return put({ + type: 'save', + payload: { + detailTopBanner: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + case "end": + return _context2.stop(); + } + }, _callee2); + })(); + }, + // 教学客堂详情左侧banner + getClassroomLeftMenus: function getClassroomLeftMenus(_ref5, _ref6) { + var payload = _ref5.payload; + var call = _ref6.call, + put = _ref6.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() { + var response; + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + _context3.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomLeftMenus */ "A"], payload); + case 2: + response = _context3.sent; + _context3.next = 5; + return put({ + type: 'save', + payload: { + detailLeftMenus: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + return _context3.abrupt("return", response); + case 6: + case "end": + return _context3.stop(); + } + }, _callee3); + })(); + }, + //教学课堂详情-实训列表 + getClassroomShixunsList: function getClassroomShixunsList(_ref7, _ref8) { + var payload = _ref7.payload; + var call = _ref8.call, + put = _ref8.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() { + var response; + return _regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + _context4.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomShixunsList */ "D"], payload); + case 2: + response = _context4.sent; + _context4.next = 5; + return put({ + type: 'save', + payload: { + detailShixunsList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + case "end": + return _context4.stop(); + } + }, _callee4); + })(); + }, + //教学课堂详情-实训列表老师 + getClassroomTeacherShixunsList: function getClassroomTeacherShixunsList(_ref9, _ref10) { + var payload = _ref9.payload; + var call = _ref10.call, + put = _ref10.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() { + var response; + return _regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + _context5.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomTeacherShixunsList */ "E"], payload); + case 2: + response = _context5.sent; + _context5.next = 5; + return put({ + type: 'save', + payload: { + detailShixunsList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + return _context5.abrupt("return", response); + case 6: + case "end": + return _context5.stop(); + } + }, _callee5); + })(); + }, + //教学课堂详情-普通作业列表 + getClassroomCommonList: function getClassroomCommonList(_ref11, _ref12) { + var payload = _ref11.payload; + var call = _ref12.call, + put = _ref12.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() { + var response; + return _regeneratorRuntime().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + _context6.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomShixunsList */ "D"], payload); + case 2: + response = _context6.sent; + _context6.next = 5; + return put({ + type: 'save', + payload: { + detailCommonHomeworksList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + case "end": + return _context6.stop(); + } + }, _callee6); + })(); + }, + //教学课堂详情-普通作业列表老师 + getClassroomTeacherCommonList: function getClassroomTeacherCommonList(_ref13, _ref14) { + var payload = _ref13.payload; + var call = _ref14.call, + put = _ref14.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() { + var response; + return _regeneratorRuntime().wrap(function _callee7$(_context7) { + while (1) switch (_context7.prev = _context7.next) { + case 0: + _context7.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomTeacherShixunsList */ "E"], payload); + case 2: + response = _context7.sent; + _context7.next = 5; + return put({ + type: 'save', + payload: { + detailCommonHomeworksList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + return _context7.abrupt("return", response); + case 6: + case "end": + return _context7.stop(); + } + }, _callee7); + })(); + }, + //教学课堂详情-毕业设计-毕设选题 + getClassroomGraduationTopicsList: function getClassroomGraduationTopicsList(_ref15, _ref16) { + var payload = _ref15.payload; + var call = _ref16.call, + put = _ref16.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() { + var response; + return _regeneratorRuntime().wrap(function _callee8$(_context8) { + while (1) switch (_context8.prev = _context8.next) { + case 0: + _context8.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomGraduationTopicsList */ "z"], payload); + case 2: + response = _context8.sent; + _context8.next = 5; + return put({ + type: 'save', + payload: { + detailGraduationTopicsList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + case "end": + return _context8.stop(); + } + }, _callee8); + })(); + }, + //教学课堂详情-毕业设计-毕设任务 + getClassroomGraduationTaskList: function getClassroomGraduationTaskList(_ref17, _ref18) { + var payload = _ref17.payload; + var call = _ref18.call, + put = _ref18.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() { + var response; + return _regeneratorRuntime().wrap(function _callee9$(_context9) { + while (1) switch (_context9.prev = _context9.next) { + case 0: + _context9.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomGraduationTaskList */ "y"], payload); + case 2: + response = _context9.sent; + _context9.next = 5; + return put({ + type: 'save', + payload: { + detailGraduationTaskList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + case "end": + return _context9.stop(); + } + }, _callee9); + })(); + }, + //教学课堂详情-试卷 + getClassroomExercisesList: function getClassroomExercisesList(_ref19, _ref20) { + var payload = _ref19.payload; + var call = _ref20.call, + put = _ref20.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() { + var response; + return _regeneratorRuntime().wrap(function _callee10$(_context10) { + while (1) switch (_context10.prev = _context10.next) { + case 0: + _context10.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomExercisesList */ "x"], payload); + case 2: + response = _context10.sent; + _context10.next = 5; + return put({ + type: 'save', + payload: { + detailExerciseList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + case "end": + return _context10.stop(); + } + }, _callee10); + })(); + }, + //教学课堂详情-问卷 + getClassroomPollsList: function getClassroomPollsList(_ref21, _ref22) { + var payload = _ref21.payload; + var call = _ref22.call, + put = _ref22.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() { + var response; + return _regeneratorRuntime().wrap(function _callee11$(_context11) { + while (1) switch (_context11.prev = _context11.next) { + case 0: + _context11.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomPollsList */ "C"], payload); + case 2: + response = _context11.sent; + _context11.next = 5; + return put({ + type: 'save', + payload: { + detailPollsList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + case "end": + return _context11.stop(); + } + }, _callee11); + })(); + }, + // 教学课堂-获取课堂班级 + getCourseGroups: function getCourseGroups(_ref23, _ref24) { + var payload = _ref23.payload; + var call = _ref24.call, + put = _ref24.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() { + var response; + return _regeneratorRuntime().wrap(function _callee12$(_context12) { + while (1) switch (_context12.prev = _context12.next) { + case 0: + _context12.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getCourseGroups */ "H"], payload); + case 2: + response = _context12.sent; + _context12.next = 5; + return put({ + type: 'save', + payload: { + courseGroups: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + case "end": + return _context12.stop(); + } + }, _callee12); + })(); + }, + // 教学课堂-获取课堂班级 + getAllCourseGroup: function getAllCourseGroup(_ref25, _ref26) { + var payload = _ref25.payload; + var call = _ref26.call, + put = _ref26.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() { + var response; + return _regeneratorRuntime().wrap(function _callee13$(_context13) { + while (1) switch (_context13.prev = _context13.next) { + case 0: + _context13.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getAllCourseGroup */ "o"], payload); + case 2: + response = _context13.sent; + _context13.next = 5; + return put({ + type: 'save', + payload: { + allCourseGroups: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + case "end": + return _context13.stop(); + } + }, _callee13); + })(); + }, + // 教学课堂 - 普通作业 + getClassroomCommonHomeworksList: function getClassroomCommonHomeworksList(_ref27, _ref28) { + var payload = _ref27.payload; + var call = _ref28.call, + put = _ref28.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() { + var response; + return _regeneratorRuntime().wrap(function _callee14$(_context14) { + while (1) switch (_context14.prev = _context14.next) { + case 0: + _context14.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomCommonHomeworksList */ "w"], payload); + case 2: + response = _context14.sent; + _context14.next = 5; + return put({ + type: 'save', + payload: { + detailCommonHomeworksList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + case "end": + return _context14.stop(); + } + }, _callee14); + })(); + }, + // 教学课堂 - 签到 + getClassroomAttendancesList: function getClassroomAttendancesList(_ref29, _ref30) { + var payload = _ref29.payload; + var call = _ref30.call, + put = _ref30.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() { + var response; + return _regeneratorRuntime().wrap(function _callee15$(_context15) { + while (1) switch (_context15.prev = _context15.next) { + case 0: + _context15.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomAttendancesList */ "u"], payload); + case 2: + response = _context15.sent; + _context15.next = 5; + return put({ + type: 'save', + payload: { + detailAttendancesList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + case "end": + return _context15.stop(); + } + }, _callee15); + })(); + }, + // 教学课堂 - 签到统计 + getClassroomAttendancesStatistic: function getClassroomAttendancesStatistic(_ref31, _ref32) { + var payload = _ref31.payload; + var call = _ref32.call, + put = _ref32.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() { + var response; + return _regeneratorRuntime().wrap(function _callee16$(_context16) { + while (1) switch (_context16.prev = _context16.next) { + case 0: + _context16.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomAttendancesStatistic */ "v"], payload); + case 2: + response = _context16.sent; + _context16.next = 5; + return put({ + type: 'save', + payload: { + detailAttendancesStatistic: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + case "end": + return _context16.stop(); + } + }, _callee16); + })(); + }, + // 教学课堂 - 签到详情 + getAttendanceDetail: function getAttendanceDetail(_ref33, _ref34) { + var payload = _ref33.payload; + var call = _ref34.call, + put = _ref34.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() { + var response; + return _regeneratorRuntime().wrap(function _callee17$(_context17) { + while (1) switch (_context17.prev = _context17.next) { + case 0: + _context17.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getAttendanceDetail */ "s"], payload); + case 2: + response = _context17.sent; + _context17.next = 5; + return put({ + type: 'save', + payload: { + detailAttendancesDetail: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + return _context17.abrupt("return", response); + case 6: + case "end": + return _context17.stop(); + } + }, _callee17); + })(); + }, + // 教学课堂 - 公告列表 + getAnnouncementList: function getAnnouncementList(_ref35, _ref36) { + var payload = _ref35.payload; + var call = _ref36.call, + put = _ref36.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() { + var response; + return _regeneratorRuntime().wrap(function _callee18$(_context18) { + while (1) switch (_context18.prev = _context18.next) { + case 0: + _context18.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getAnnouncementList */ "q"], payload); + case 2: + response = _context18.sent; + _context18.next = 5; + return put({ + type: 'save', + payload: { + detailAnnouncementList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + case "end": + return _context18.stop(); + } + }, _callee18); + })(); + }, + //教学课堂 - 资源 + getAttachmentList: function getAttachmentList(_ref37, _ref38) { + var payload = _ref37.payload; + var call = _ref38.call, + put = _ref38.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() { + var response; + return _regeneratorRuntime().wrap(function _callee19$(_context19) { + while (1) switch (_context19.prev = _context19.next) { + case 0: + _context19.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getAttachmentList */ "r"], payload); + case 2: + response = _context19.sent; + _context19.next = 5; + return put({ + type: 'save', + payload: { + detailAttachmentList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response.data) + } + }); + case 5: + case "end": + return _context19.stop(); + } + }, _callee19); + })(); + }, + //教学课堂 - 资源 需求回滚 + getCourseware: function getCourseware(_ref39, _ref40) { + var payload = _ref39.payload; + var call = _ref40.call, + put = _ref40.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() { + var response; + return _regeneratorRuntime().wrap(function _callee20$(_context20) { + while (1) switch (_context20.prev = _context20.next) { + case 0: + _context20.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getCourseware */ "O"], payload); + case 2: + response = _context20.sent; + _context20.next = 5; + return put({ + type: 'save', + payload: { + detailCourseware: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response.data) + } + }); + case 5: + case "end": + return _context20.stop(); + } + }, _callee20); + })(); + }, + //教学课堂 - 视频 + getVideoList: function getVideoList(_ref41, _ref42) { + var payload = _ref41.payload; + var call = _ref42.call, + put = _ref42.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() { + var response; + return _regeneratorRuntime().wrap(function _callee21$(_context21) { + while (1) switch (_context21.prev = _context21.next) { + case 0: + _context21.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getVideoList */ "V"], payload); + case 2: + response = _context21.sent; + _context21.next = 5; + return put({ + type: 'save', + payload: { + detailVideoList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + case "end": + return _context21.stop(); + } + }, _callee21); + })(); + }, + //教学课堂 - 直播 + getLiveVideoList: function getLiveVideoList(_ref43, _ref44) { + var payload = _ref43.payload; + var call = _ref44.call, + put = _ref44.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee22() { + var response; + return _regeneratorRuntime().wrap(function _callee22$(_context22) { + while (1) switch (_context22.prev = _context22.next) { + case 0: + _context22.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getLiveVideoList */ "Q"], payload); + case 2: + response = _context22.sent; + _context22.next = 5; + return put({ + type: 'save', + payload: { + detailLiveVideoList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + case "end": + return _context22.stop(); + } + }, _callee22); + })(); + }, + // 教学课堂 我的课堂 + getCoursesMine: function getCoursesMine(_ref45, _ref46) { + var payload = _ref45.payload, + callback = _ref45.callback; + var call = _ref46.call, + put = _ref46.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee23() { + var response; + return _regeneratorRuntime().wrap(function _callee23$(_context23) { + while (1) switch (_context23.prev = _context23.next) { + case 0: + _context23.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getCoursesMine */ "N"], payload); + case 2: + response = _context23.sent; + _context23.next = 5; + return put({ + type: 'save', + payload: { + courseMine: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + return _context23.abrupt("return", response.data); + case 6: + case "end": + return _context23.stop(); + } + }, _callee23); + })(); + }, + // 教学课堂 讨论 + getBoardList: function getBoardList(_ref47, _ref48) { + var payload = _ref47.payload, + callback = _ref47.callback; + var call = _ref48.call, + put = _ref48.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee24() { + var response; + return _regeneratorRuntime().wrap(function _callee24$(_context24) { + while (1) switch (_context24.prev = _context24.next) { + case 0: + _context24.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getBoardList */ "t"], payload); + case 2: + response = _context24.sent; + _context24.next = 5; + return put({ + type: 'save', + payload: { + detailBoardList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response.data) + } + }); + case 5: + return _context24.abrupt("return", response.data); + case 6: + case "end": + return _context24.stop(); + } + }, _callee24); + })(); + }, + // 教学课堂 分班 + getCourseGroupsList: function getCourseGroupsList(_ref49, _ref50) { + var payload = _ref49.payload, + callback = _ref49.callback; + var call = _ref50.call, + put = _ref50.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee25() { + var response; + return _regeneratorRuntime().wrap(function _callee25$(_context25) { + while (1) switch (_context25.prev = _context25.next) { + case 0: + _context25.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getCourseGroupsList */ "I"], payload); + case 2: + response = _context25.sent; + _context25.next = 5; + return put({ + type: 'save', + payload: { + detailCourseGroupsList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + return _context25.abrupt("return", response); + case 6: + case "end": + return _context25.stop(); + } + }, _callee25); + })(); + }, + // 教学课堂- 学生列表 + getCourseStudentsList: function getCourseStudentsList(_ref51, _ref52) { + var payload = _ref51.payload, + callback = _ref51.callback; + var call = _ref52.call, + put = _ref52.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee26() { + var response; + return _regeneratorRuntime().wrap(function _callee26$(_context26) { + while (1) switch (_context26.prev = _context26.next) { + case 0: + _context26.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getCourseStudentsList */ "K"], payload); + case 2: + response = _context26.sent; + _context26.next = 5; + return put({ + type: 'save', + payload: { + detailCoursStudentsList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + return _context26.abrupt("return", response.data); + case 6: + case "end": + return _context26.stop(); + } + }, _callee26); + })(); + }, + // 教学课堂 - 统计 + getCourseStatistics: function getCourseStatistics(_ref53, _ref54) { + var payload = _ref53.payload, + callback = _ref53.callback; + var call = _ref54.call, + put = _ref54.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee27() { + var response; + return _regeneratorRuntime().wrap(function _callee27$(_context27) { + while (1) switch (_context27.prev = _context27.next) { + case 0: + _context27.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getCourseStatistics */ "J"], payload); + case 2: + response = _context27.sent; + _context27.next = 5; + return put({ + type: 'save', + payload: { + detailCourseStatisticsList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + return _context27.abrupt("return", response); + case 6: + case "end": + return _context27.stop(); + } + }, _callee27); + })(); + }, + // 教学课堂 - 课堂活跃度 + getCourseActscore: function getCourseActscore(_ref55, _ref56) { + var payload = _ref55.payload, + callback = _ref55.callback; + var call = _ref56.call, + put = _ref56.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee28() { + var response; + return _regeneratorRuntime().wrap(function _callee28$(_context28) { + while (1) switch (_context28.prev = _context28.next) { + case 0: + _context28.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getCourseActscore */ "G"], payload); + case 2: + response = _context28.sent; + _context28.next = 5; + return put({ + type: 'save', + payload: { + detailCourseActscore: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + return _context28.abrupt("return", response); + case 6: + case "end": + return _context28.stop(); + } + }, _callee28); + })(); + }, + // 教学课堂 - 学生成绩 + getCourseWorkscore: function getCourseWorkscore(_ref57, _ref58) { + var payload = _ref57.payload, + callback = _ref57.callback; + var call = _ref58.call, + put = _ref58.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee29() { + var response; + return _regeneratorRuntime().wrap(function _callee29$(_context29) { + while (1) switch (_context29.prev = _context29.next) { + case 0: + _context29.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getCourseWorkscore */ "L"], payload); + case 2: + response = _context29.sent; + _context29.next = 5; + return put({ + type: 'save', + payload: { + detailCourseWorkscore: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + return _context29.abrupt("return", response); + case 6: + case "end": + return _context29.stop(); + } + }, _callee29); + })(); + }, + // 教学课堂 全部实训列表 + getShixunLists: function getShixunLists(_ref59, _ref60) { + var payload = _ref59.payload, + callback = _ref59.callback; + var call = _ref60.call, + put = _ref60.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee30() { + var response; + return _regeneratorRuntime().wrap(function _callee30$(_context30) { + while (1) switch (_context30.prev = _context30.next) { + case 0: + _context30.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getShixunLists */ "U"], payload); + case 2: + response = _context30.sent; + _context30.next = 5; + return put({ + type: 'save', + payload: { + shixunLists: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + return _context30.abrupt("return", response); + case 6: + case "end": + return _context30.stop(); + } + }, _callee30); + })(); + }, + // 从课堂实验添加 + getExperimentLists: function getExperimentLists(_ref61, _ref62) { + var payload = _ref61.payload, + callback = _ref61.callback; + var call = _ref62.call, + put = _ref62.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee31() { + var response; + return _regeneratorRuntime().wrap(function _callee31$(_context31) { + while (1) switch (_context31.prev = _context31.next) { + case 0: + _context31.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getExperimentLists */ "P"], payload); + case 2: + response = _context31.sent; + _context31.next = 5; + return put({ + type: 'save', + payload: { + shixunLists: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + return _context31.abrupt("return", response); + case 6: + case "end": + return _context31.stop(); + } + }, _callee31); + })(); + }, + getShixunAiRecommendLists: function getShixunAiRecommendLists(_ref63, _ref64) { + var payload = _ref63.payload, + callback = _ref63.callback; + var call = _ref64.call, + put = _ref64.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee32() { + var response; + return _regeneratorRuntime().wrap(function _callee32$(_context32) { + while (1) switch (_context32.prev = _context32.next) { + case 0: + _context32.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getShixunAiRecommendLists */ "T"], payload); + case 2: + response = _context32.sent; + _context32.next = 5; + return put({ + type: 'save', + payload: { + shixunAiRecommendLists: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + return _context32.abrupt("return", response); + case 6: + case "end": + return _context32.stop(); + } + }, _callee32); + })(); + }, + // 教学课堂 全部课程列表 + getCoursesLists: function getCoursesLists(_ref65, _ref66) { + var payload = _ref65.payload, + callback = _ref65.callback; + var call = _ref66.call, + put = _ref66.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee33() { + var response; + return _regeneratorRuntime().wrap(function _callee33$(_context33) { + while (1) switch (_context33.prev = _context33.next) { + case 0: + _context33.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getCoursesLists */ "M"], payload); + case 2: + response = _context33.sent; + _context33.next = 5; + return put({ + type: 'save', + payload: { + coursesLists: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + return _context33.abrupt("return", response); + case 6: + case "end": + return _context33.stop(); + } + }, _callee33); + })(); + }, + // 教学课堂 创建课程 + createCoursesHomework: function createCoursesHomework(_ref67, _ref68) { + var payload = _ref67.payload, + callback = _ref67.callback; + var call = _ref68.call, + put = _ref68.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee34() { + var response; + return _regeneratorRuntime().wrap(function _callee34$(_context34) { + while (1) switch (_context34.prev = _context34.next) { + case 0: + _context34.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* createCoursesHomework */ "b"], payload); + case 2: + response = _context34.sent; + return _context34.abrupt("return", response); + case 4: + case "end": + return _context34.stop(); + } + }, _callee34); + })(); + }, + // 教学课堂 创建实训作业 + createShixunHomework: function createShixunHomework(_ref69, _ref70) { + var payload = _ref69.payload, + callback = _ref69.callback; + var call = _ref70.call, + put = _ref70.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee35() { + var response; + return _regeneratorRuntime().wrap(function _callee35$(_context35) { + while (1) switch (_context35.prev = _context35.next) { + case 0: + _context35.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* createShixunHomework */ "d"], payload); + case 2: + response = _context35.sent; + return _context35.abrupt("return", response); + case 4: + case "end": + return _context35.stop(); + } + }, _callee35); + })(); + }, + // 教学课堂 创建实训作业 + createExperiment: function createExperiment(_ref71, _ref72) { + var payload = _ref71.payload, + callback = _ref71.callback; + var call = _ref72.call, + put = _ref72.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee36() { + var response; + return _regeneratorRuntime().wrap(function _callee36$(_context36) { + while (1) switch (_context36.prev = _context36.next) { + case 0: + _context36.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* createExperiment */ "c"], payload); + case 2: + response = _context36.sent; + return _context36.abrupt("return", response); + case 4: + case "end": + return _context36.stop(); + } + }, _callee36); + })(); + }, + getSchoolList: function getSchoolList(_ref73, _ref74) { + var payload = _ref73.payload, + callback = _ref73.callback; + var call = _ref74.call, + put = _ref74.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee37() { + var response; + return _regeneratorRuntime().wrap(function _callee37$(_context37) { + while (1) switch (_context37.prev = _context37.next) { + case 0: + _context37.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getSchoolList */ "R"], payload); + case 2: + response = _context37.sent; + _context37.next = 5; + return put({ + type: 'save', + payload: { + schoolList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response.school_names) + } + }); + case 5: + return _context37.abrupt("return", response.school_names); + case 6: + case "end": + return _context37.stop(); + } + }, _callee37); + })(); + }, + searchSchoolTeacherList: function searchSchoolTeacherList(_ref75, _ref76) { + var payload = _ref75.payload, + callback = _ref75.callback; + var call = _ref76.call, + put = _ref76.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee38() { + var response; + return _regeneratorRuntime().wrap(function _callee38$(_context38) { + while (1) switch (_context38.prev = _context38.next) { + case 0: + _context38.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* searchSchoolTeacherList */ "X"], payload); + case 2: + response = _context38.sent; + _context38.next = 5; + return put({ + type: 'save', + payload: { + searchMemberList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + case 5: + return _context38.abrupt("return", response); + case 6: + case "end": + return _context38.stop(); + } + }, _callee38); + })(); + }, + // 教学课堂 全部课程列表 + getAllTaskList: function getAllTaskList(_ref77, _ref78) { + var payload = _ref77.payload, + callback = _ref77.callback; + var call = _ref78.call, + put = _ref78.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee39() { + var response; + return _regeneratorRuntime().wrap(function _callee39$(_context39) { + while (1) switch (_context39.prev = _context39.next) { + case 0: + _context39.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getAllTasks */ "p"], payload); + case 2: + response = _context39.sent; + _context39.next = 5; + return put({ + type: 'save', + payload: { + taskList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(response.tasks) + } + }); + case 5: + return _context39.abrupt("return", response); + case 6: + case "end": + return _context39.stop(); + } + }, _callee39); + })(); + }, + updateTaskPosition: function updateTaskPosition(_ref79, _ref80) { + var payload = _ref79.payload, + callback = _ref79.callback; + var call = _ref80.call, + put = _ref80.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee40() { + var response; + return _regeneratorRuntime().wrap(function _callee40$(_context40) { + while (1) switch (_context40.prev = _context40.next) { + case 0: + _context40.next = 2; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* updateTaskPosition */ "Z"], payload); + case 2: + response = _context40.sent; + _context40.next = 5; + return put({ + type: 'save', + payload: { + actionTabs: { + key: '' + } + } + }); + case 5: + return _context40.abrupt("return", response); + case 6: + case "end": + return _context40.stop(); + } + }, _callee40); + })(); + }, + // 设置操做action + setActionTabs: function setActionTabs(_ref81, _ref82) { + var payload = _ref81.payload; + var call = _ref82.call, + put = _ref82.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee41() { + return _regeneratorRuntime().wrap(function _callee41$(_context41) { + while (1) switch (_context41.prev = _context41.next) { + case 0: + _context41.next = 2; + return put({ + type: 'save', + payload: { + actionTabs: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, payload) + } + }); + case 2: + case "end": + return _context41.stop(); + } + }, _callee41); + })(); + } + }, + reducers: { + save: function save(state, action) { + return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, state), action.payload); + } + }, + subscriptions: { + setup: function setup(_ref83) { + var dispatch = _ref83.dispatch, + history = _ref83.history; + // console.log("subscriptions:", dispatch, history) + return history.listen(function (_ref84) { + var pathname = _ref84.pathname; + if (pathname === '/') { + dispatch({ + type: 'query' + }); + } + }); + } + } +}; +/* harmony default export */ __webpack_exports__["a"] = (ClassroomsListModel); + +/***/ }), + +/***/ "5mdu": +/*!***************************************************!*\ + !*** ./node_modules/core-js/internals/perform.js ***! + \***************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return { error: false, value: exec() }; + } catch (error) { + return { error: true, value: error }; + } +}; + + +/***/ }), + +/***/ "5r1n": +/*!*************************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.reflect.get-own-metadata.js ***! + \*************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ "eDxR"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk"); + +var ordinaryGetOwnMetadata = ReflectMetadataModule.get; +var toMetadataKey = ReflectMetadataModule.toKey; + +// `Reflect.getOwnMetadata` method +// https://github.com/rbuckton/reflect-metadata +$({ target: 'Reflect', stat: true }, { + getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) { + var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]); + return ordinaryGetOwnMetadata(metadataKey, anObject(target), targetKey); + } +}); + + +/***/ }), + +/***/ "5s+n": +/*!****************************************************!*\ + !*** ./node_modules/core-js/modules/es.promise.js ***! + \****************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR"); +var global = __webpack_require__(/*! ../internals/global */ "2oRo"); +var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY"); +var NativePromise = __webpack_require__(/*! ../internals/native-promise-constructor */ "/qmn"); +var redefine = __webpack_require__(/*! ../internals/redefine */ "busE"); +var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "4syw"); +var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "1E5z"); +var setSpecies = __webpack_require__(/*! ../internals/set-species */ "JiZb"); +var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM"); +var anInstance = __webpack_require__(/*! ../internals/an-instance */ "GarU"); +var classof = __webpack_require__(/*! ../internals/classof-raw */ "xrYK"); +var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "iSVu"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN"); +var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "HH4o"); +var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh"); +var task = __webpack_require__(/*! ../internals/task */ "LPSS").set; +var microtask = __webpack_require__(/*! ../internals/microtask */ "tXUg"); +var promiseResolve = __webpack_require__(/*! ../internals/promise-resolve */ "zfnd"); +var hostReportErrors = __webpack_require__(/*! ../internals/host-report-errors */ "RN6c"); +var newPromiseCapabilityModule = __webpack_require__(/*! ../internals/new-promise-capability */ "8GlL"); +var perform = __webpack_require__(/*! ../internals/perform */ "5mdu"); +var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "afO8"); +var isForced = __webpack_require__(/*! ../internals/is-forced */ "lMq5"); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp"); +var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "LQDL"); + +var SPECIES = wellKnownSymbol('species'); +var PROMISE = 'Promise'; +var getInternalState = InternalStateModule.get; +var setInternalState = InternalStateModule.set; +var getInternalPromiseState = InternalStateModule.getterFor(PROMISE); +var PromiseConstructor = NativePromise; +var TypeError = global.TypeError; +var document = global.document; +var process = global.process; +var $fetch = getBuiltIn('fetch'); +var newPromiseCapability = newPromiseCapabilityModule.f; +var newGenericPromiseCapability = newPromiseCapability; +var IS_NODE = classof(process) == 'process'; +var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent); +var UNHANDLED_REJECTION = 'unhandledrejection'; +var REJECTION_HANDLED = 'rejectionhandled'; +var PENDING = 0; +var FULFILLED = 1; +var REJECTED = 2; +var HANDLED = 1; +var UNHANDLED = 2; +var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen; + +var FORCED = isForced(PROMISE, function () { + var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor); + if (!GLOBAL_CORE_JS_PROMISE) { + // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // We can't detect it synchronously, so just check versions + if (V8_VERSION === 66) return true; + // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test + if (!IS_NODE && typeof PromiseRejectionEvent != 'function') return true; + } + // We need Promise#finally in the pure version for preventing prototype pollution + if (IS_PURE && !PromiseConstructor.prototype['finally']) return true; + // We can't use @@species feature detection in V8 since it causes + // deoptimization and performance degradation + // https://github.com/zloirock/core-js/issues/679 + if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) return false; + // Detect correctness of subclassing with @@species support + var promise = PromiseConstructor.resolve(1); + var FakePromise = function (exec) { + exec(function () { /* empty */ }, function () { /* empty */ }); + }; + var constructor = promise.constructor = {}; + constructor[SPECIES] = FakePromise; + return !(promise.then(function () { /* empty */ }) instanceof FakePromise); +}); + +var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) { + PromiseConstructor.all(iterable)['catch'](function () { /* empty */ }); +}); + +// helpers +var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; + +var notify = function (promise, state, isReject) { + if (state.notified) return; + state.notified = true; + var chain = state.reactions; + microtask(function () { + var value = state.value; + var ok = state.state == FULFILLED; + var index = 0; + // variable length - can't use forEach + while (chain.length > index) { + var reaction = chain[index++]; + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then, exited; + try { + if (handler) { + if (!ok) { + if (state.rejection === UNHANDLED) onHandleUnhandled(promise, state); + state.rejection = HANDLED; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); // can throw + if (domain) { + domain.exit(); + exited = true; + } + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if (then = isThenable(result)) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (error) { + if (domain && !exited) domain.exit(); + reject(error); + } + } + state.reactions = []; + state.notified = false; + if (isReject && !state.rejection) onUnhandled(promise, state); + }); +}; + +var dispatchEvent = function (name, promise, reason) { + var event, handler; + if (DISPATCH_EVENT) { + event = document.createEvent('Event'); + event.promise = promise; + event.reason = reason; + event.initEvent(name, false, true); + global.dispatchEvent(event); + } else event = { promise: promise, reason: reason }; + if (handler = global['on' + name]) handler(event); + else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason); +}; + +var onUnhandled = function (promise, state) { + task.call(global, function () { + var value = state.value; + var IS_UNHANDLED = isUnhandled(state); + var result; + if (IS_UNHANDLED) { + result = perform(function () { + if (IS_NODE) { + process.emit('unhandledRejection', value, promise); + } else dispatchEvent(UNHANDLED_REJECTION, promise, value); + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED; + if (result.error) throw result.value; + } + }); +}; + +var isUnhandled = function (state) { + return state.rejection !== HANDLED && !state.parent; +}; + +var onHandleUnhandled = function (promise, state) { + task.call(global, function () { + if (IS_NODE) { + process.emit('rejectionHandled', promise); + } else dispatchEvent(REJECTION_HANDLED, promise, state.value); + }); +}; + +var bind = function (fn, promise, state, unwrap) { + return function (value) { + fn(promise, state, value, unwrap); + }; +}; + +var internalReject = function (promise, state, value, unwrap) { + if (state.done) return; + state.done = true; + if (unwrap) state = unwrap; + state.value = value; + state.state = REJECTED; + notify(promise, state, true); +}; + +var internalResolve = function (promise, state, value, unwrap) { + if (state.done) return; + state.done = true; + if (unwrap) state = unwrap; + try { + if (promise === value) throw TypeError("Promise can't be resolved itself"); + var then = isThenable(value); + if (then) { + microtask(function () { + var wrapper = { done: false }; + try { + then.call(value, + bind(internalResolve, promise, wrapper, state), + bind(internalReject, promise, wrapper, state) + ); + } catch (error) { + internalReject(promise, wrapper, error, state); + } + }); + } else { + state.value = value; + state.state = FULFILLED; + notify(promise, state, false); + } + } catch (error) { + internalReject(promise, { done: false }, error, state); + } +}; + +// constructor polyfill +if (FORCED) { + // 25.4.3.1 Promise(executor) + PromiseConstructor = function Promise(executor) { + anInstance(this, PromiseConstructor, PROMISE); + aFunction(executor); + Internal.call(this); + var state = getInternalState(this); + try { + executor(bind(internalResolve, this, state), bind(internalReject, this, state)); + } catch (error) { + internalReject(this, state, error); + } + }; + // eslint-disable-next-line no-unused-vars + Internal = function Promise(executor) { + setInternalState(this, { + type: PROMISE, + done: false, + notified: false, + parent: false, + reactions: [], + rejection: false, + state: PENDING, + value: undefined + }); + }; + Internal.prototype = redefineAll(PromiseConstructor.prototype, { + // `Promise.prototype.then` method + // https://tc39.github.io/ecma262/#sec-promise.prototype.then + then: function then(onFulfilled, onRejected) { + var state = getInternalPromiseState(this); + var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = IS_NODE ? process.domain : undefined; + state.parent = true; + state.reactions.push(reaction); + if (state.state != PENDING) notify(this, state, false); + return reaction.promise; + }, + // `Promise.prototype.catch` method + // https://tc39.github.io/ecma262/#sec-promise.prototype.catch + 'catch': function (onRejected) { + return this.then(undefined, onRejected); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + var state = getInternalState(promise); + this.promise = promise; + this.resolve = bind(internalResolve, promise, state); + this.reject = bind(internalReject, promise, state); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === PromiseConstructor || C === PromiseWrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; + + if (!IS_PURE && typeof NativePromise == 'function') { + nativeThen = NativePromise.prototype.then; + + // wrap native Promise#then for native async functions + redefine(NativePromise.prototype, 'then', function then(onFulfilled, onRejected) { + var that = this; + return new PromiseConstructor(function (resolve, reject) { + nativeThen.call(that, resolve, reject); + }).then(onFulfilled, onRejected); + // https://github.com/zloirock/core-js/issues/640 + }, { unsafe: true }); + + // wrap fetch result + if (typeof $fetch == 'function') $({ global: true, enumerable: true, forced: true }, { + // eslint-disable-next-line no-unused-vars + fetch: function fetch(input /* , init */) { + return promiseResolve(PromiseConstructor, $fetch.apply(global, arguments)); + } + }); + } +} + +$({ global: true, wrap: true, forced: FORCED }, { + Promise: PromiseConstructor +}); + +setToStringTag(PromiseConstructor, PROMISE, false, true); +setSpecies(PROMISE); + +PromiseWrapper = getBuiltIn(PROMISE); + +// statics +$({ target: PROMISE, stat: true, forced: FORCED }, { + // `Promise.reject` method + // https://tc39.github.io/ecma262/#sec-promise.reject + reject: function reject(r) { + var capability = newPromiseCapability(this); + capability.reject.call(undefined, r); + return capability.promise; + } +}); + +$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, { + // `Promise.resolve` method + // https://tc39.github.io/ecma262/#sec-promise.resolve + resolve: function resolve(x) { + return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x); + } +}); + +$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, { + // `Promise.all` method + // https://tc39.github.io/ecma262/#sec-promise.all + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var $promiseResolve = aFunction(C.resolve); + var values = []; + var counter = 0; + var remaining = 1; + iterate(iterable, function (promise) { + var index = counter++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + $promiseResolve.call(C, promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.error) reject(result.value); + return capability.promise; + }, + // `Promise.race` method + // https://tc39.github.io/ecma262/#sec-promise.race + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + var $promiseResolve = aFunction(C.resolve); + iterate(iterable, function (promise) { + $promiseResolve.call(C, promise).then(capability.resolve, reject); + }); + }); + if (result.error) reject(result.value); + return capability.promise; + } +}); + + +/***/ }), + +/***/ "5uH8": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/modules/es.number.min-safe-integer.js ***! + \********************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); + +// `Number.MIN_SAFE_INTEGER` constant +// https://tc39.github.io/ecma262/#sec-number.min_safe_integer +$({ target: 'Number', stat: true }, { + MIN_SAFE_INTEGER: -0x1FFFFFFFFFFFFF +}); + + +/***/ }), + +/***/ "5wUe": +/*!***************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/slicedToArray.js ***! + \***************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles */ "Q9SF"); + +var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit */ "MIOZ"); + +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray */ "mGKP"); + +var nonIterableRest = __webpack_require__(/*! ./nonIterableRest */ "h0XC"); + +function _slicedToArray(arr, i) { + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); +} + +module.exports = _slicedToArray; + +/***/ }), + +/***/ "5xtp": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/modules/es.object.define-setter.js ***! + \*****************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/"); +var FORCED = __webpack_require__(/*! ../internals/object-prototype-accessors-forced */ "6x0u"); +var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM"); +var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "m/L8"); + +// `Object.prototype.__defineSetter__` method +// https://tc39.github.io/ecma262/#sec-object.prototype.__defineSetter__ +if (DESCRIPTORS) { + $({ target: 'Object', proto: true, forced: FORCED }, { + __defineSetter__: function __defineSetter__(P, setter) { + definePropertyModule.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true }); + } + }); +} + + +/***/ }), + +/***/ "66V8": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.aggregate-error.js ***! + \****************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/"); +var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "4WOD"); +var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "0rvr"); +var create = __webpack_require__(/*! ../internals/object-create */ "fHMY"); +var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "m/L8"); +var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "XGwC"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN"); +var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp"); +var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "afO8"); + +var setInternalState = InternalStateModule.set; +var getInternalAggregateErrorState = InternalStateModule.getterFor('AggregateError'); + +var $AggregateError = function AggregateError(errors, message) { + var that = this; + if (!(that instanceof $AggregateError)) return new $AggregateError(errors, message); + if (setPrototypeOf) { + that = setPrototypeOf(new Error(message), getPrototypeOf(that)); + } + var errorsArray = []; + iterate(errors, errorsArray.push, errorsArray); + if (DESCRIPTORS) setInternalState(that, { errors: errorsArray, type: 'AggregateError' }); + else that.errors = errorsArray; + if (message !== undefined) createNonEnumerableProperty(that, 'message', String(message)); + return that; +}; + +$AggregateError.prototype = create(Error.prototype, { + constructor: createPropertyDescriptor(5, $AggregateError), + message: createPropertyDescriptor(5, ''), + name: createPropertyDescriptor(5, 'AggregateError') +}); + +if (DESCRIPTORS) defineProperty.f($AggregateError.prototype, 'errors', { + get: function () { + return getInternalAggregateErrorState(this).errors; + }, + configurable: true +}); + +$({ global: true }, { + AggregateError: $AggregateError +}); + + +/***/ }), + +/***/ "67WC": +/*!******************************************************************!*\ + !*** ./node_modules/core-js/internals/array-buffer-view-core.js ***! + \******************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var NATIVE_ARRAY_BUFFER = __webpack_require__(/*! ../internals/array-buffer-native */ "qYE9"); +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/"); +var global = __webpack_require__(/*! ../internals/global */ "2oRo"); +var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v"); +var has = __webpack_require__(/*! ../internals/has */ "UTVS"); +var classof = __webpack_require__(/*! ../internals/classof */ "9d/t"); +var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp"); +var redefine = __webpack_require__(/*! ../internals/redefine */ "busE"); +var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "m/L8").f; +var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "4WOD"); +var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "0rvr"); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp"); +var uid = __webpack_require__(/*! ../internals/uid */ "kOOl"); + +var Int8Array = global.Int8Array; +var Int8ArrayPrototype = Int8Array && Int8Array.prototype; +var Uint8ClampedArray = global.Uint8ClampedArray; +var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype; +var TypedArray = Int8Array && getPrototypeOf(Int8Array); +var TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype); +var ObjectPrototype = Object.prototype; +var isPrototypeOf = ObjectPrototype.isPrototypeOf; + +var TO_STRING_TAG = wellKnownSymbol('toStringTag'); +var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG'); +// Fixing native typed arrays in Opera Presto crashes the browser, see #595 +var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera'; +var TYPED_ARRAY_TAG_REQIRED = false; +var NAME; + +var TypedArrayConstructorsList = { + Int8Array: 1, + Uint8Array: 1, + Uint8ClampedArray: 1, + Int16Array: 2, + Uint16Array: 2, + Int32Array: 4, + Uint32Array: 4, + Float32Array: 4, + Float64Array: 8 +}; + +var isView = function isView(it) { + var klass = classof(it); + return klass === 'DataView' || has(TypedArrayConstructorsList, klass); +}; + +var isTypedArray = function (it) { + return isObject(it) && has(TypedArrayConstructorsList, classof(it)); +}; + +var aTypedArray = function (it) { + if (isTypedArray(it)) return it; + throw TypeError('Target is not a typed array'); +}; + +var aTypedArrayConstructor = function (C) { + if (setPrototypeOf) { + if (isPrototypeOf.call(TypedArray, C)) return C; + } else for (var ARRAY in TypedArrayConstructorsList) if (has(TypedArrayConstructorsList, NAME)) { + var TypedArrayConstructor = global[ARRAY]; + if (TypedArrayConstructor && (C === TypedArrayConstructor || isPrototypeOf.call(TypedArrayConstructor, C))) { + return C; + } + } throw TypeError('Target is not a typed array constructor'); +}; + +var exportTypedArrayMethod = function (KEY, property, forced) { + if (!DESCRIPTORS) return; + if (forced) for (var ARRAY in TypedArrayConstructorsList) { + var TypedArrayConstructor = global[ARRAY]; + if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) { + delete TypedArrayConstructor.prototype[KEY]; + } + } + if (!TypedArrayPrototype[KEY] || forced) { + redefine(TypedArrayPrototype, KEY, forced ? property + : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property); + } +}; + +var exportTypedArrayStaticMethod = function (KEY, property, forced) { + var ARRAY, TypedArrayConstructor; + if (!DESCRIPTORS) return; + if (setPrototypeOf) { + if (forced) for (ARRAY in TypedArrayConstructorsList) { + TypedArrayConstructor = global[ARRAY]; + if (TypedArrayConstructor && has(TypedArrayConstructor, KEY)) { + delete TypedArrayConstructor[KEY]; + } + } + if (!TypedArray[KEY] || forced) { + // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable + try { + return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && Int8Array[KEY] || property); + } catch (error) { /* empty */ } + } else return; + } + for (ARRAY in TypedArrayConstructorsList) { + TypedArrayConstructor = global[ARRAY]; + if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) { + redefine(TypedArrayConstructor, KEY, property); + } + } +}; + +for (NAME in TypedArrayConstructorsList) { + if (!global[NAME]) NATIVE_ARRAY_BUFFER_VIEWS = false; +} + +// WebKit bug - typed arrays constructors prototype is Object.prototype +if (!NATIVE_ARRAY_BUFFER_VIEWS || typeof TypedArray != 'function' || TypedArray === Function.prototype) { + // eslint-disable-next-line no-shadow + TypedArray = function TypedArray() { + throw TypeError('Incorrect invocation'); + }; + if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) { + if (global[NAME]) setPrototypeOf(global[NAME], TypedArray); + } +} + +if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) { + TypedArrayPrototype = TypedArray.prototype; + if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) { + if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype); + } +} + +// WebKit bug - one more object in Uint8ClampedArray prototype chain +if (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) { + setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype); +} + +if (DESCRIPTORS && !has(TypedArrayPrototype, TO_STRING_TAG)) { + TYPED_ARRAY_TAG_REQIRED = true; + defineProperty(TypedArrayPrototype, TO_STRING_TAG, { get: function () { + return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined; + } }); + for (NAME in TypedArrayConstructorsList) if (global[NAME]) { + createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME); + } +} + +module.exports = { + NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS, + TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG, + aTypedArray: aTypedArray, + aTypedArrayConstructor: aTypedArrayConstructor, + exportTypedArrayMethod: exportTypedArrayMethod, + exportTypedArrayStaticMethod: exportTypedArrayStaticMethod, + isView: isView, + isTypedArray: isTypedArray, + TypedArray: TypedArray, + TypedArrayPrototype: TypedArrayPrototype +}; + + +/***/ }), + +/***/ "6CvP": +/*!*****************************!*\ + !*** ./src/service/home.ts ***! + \*****************************/ +/*! exports provided: HomeIndex, applyToJoinCourse, projectApplies, getHomeNotice, UploadNotice */ +/*! exports used: HomeIndex, UploadNotice, applyToJoinCourse, getHomeNotice, projectApplies */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return HomeIndex; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return applyToJoinCourse; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return projectApplies; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getHomeNotice; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return UploadNotice; }); +/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */ "9og8"); +/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/utils/fetch */ "ErOA"); +/* harmony import */ var _utils_env__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/env */ "m3rI"); + +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + + +function HomeIndex() { + return _HomeIndex.apply(this, arguments); +} +function _HomeIndex() { + _HomeIndex = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])('/api/home/index.json', { + method: 'Get' + })); + case 1: + case "end": + return _context.stop(); + } + }, _callee); + })); + return _HomeIndex.apply(this, arguments); +} +function applyToJoinCourse(_x) { + return _applyToJoinCourse.apply(this, arguments); +} +function _applyToJoinCourse() { + _applyToJoinCourse = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])('/api/courses/apply_to_join_course.json', { + method: 'post', + body: params + })); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return _applyToJoinCourse.apply(this, arguments); +} +function projectApplies(_x2) { + return _projectApplies.apply(this, arguments); +} +//获取首页广告 +function _projectApplies() { + _projectApplies = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) { + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + return _context3.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])("".concat(_utils_env__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].FORGE_SERVER, "/api/applied_projects.json"), { + method: 'post', + body: params + })); + case 1: + case "end": + return _context3.stop(); + } + }, _callee3); + })); + return _projectApplies.apply(this, arguments); +} +function getHomeNotice(_x3) { + return _getHomeNotice.apply(this, arguments); +} +//确认是否点击弹窗 +function _getHomeNotice() { + _getHomeNotice = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) { + return _regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + return _context4.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])('/api/users/home_notice.json', { + method: 'Get' + })); + case 1: + case "end": + return _context4.stop(); + } + }, _callee4); + })); + return _getHomeNotice.apply(this, arguments); +} +function UploadNotice(_x4) { + return _UploadNotice.apply(this, arguments); +} +function _UploadNotice() { + _UploadNotice = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) { + return _regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + return _context5.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])('/api/users/view_notice.json', { + method: 'post', + body: params + })); + case 1: + case "end": + return _context5.stop(); + } + }, _callee5); + })); + return _UploadNotice.apply(this, arguments); +} + +/***/ }), + +/***/ "6JNq": +/*!***********************************************************************!*\ + !*** ./node_modules/core-js/internals/copy-constructor-properties.js ***! + \***********************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(/*! ../internals/has */ "UTVS"); +var ownKeys = __webpack_require__(/*! ../internals/own-keys */ "Vu81"); +var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V"); +var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "m/L8"); + +module.exports = function (target, source) { + var keys = ownKeys(source); + var defineProperty = definePropertyModule.f; + var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); + } +}; + + +/***/ }), + +/***/ "6LWA": +/*!****************************************************!*\ + !*** ./node_modules/core-js/internals/is-array.js ***! + \****************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(/*! ../internals/classof-raw */ "xrYK"); + +// `IsArray` abstract operation +// https://tc39.github.io/ecma262/#sec-isarray +module.exports = Array.isArray || function isArray(arg) { + return classof(arg) == 'Array'; +}; + + +/***/ }), + +/***/ "6R/c": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/modules/es.typed-array.index-of.js ***! + \*****************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC"); +var $indexOf = __webpack_require__(/*! ../internals/array-includes */ "TWQb").indexOf; + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; + +// `%TypedArray%.prototype.indexOf` method +// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.indexof +exportTypedArrayMethod('indexOf', function indexOf(searchElement /* , fromIndex */) { + return $indexOf(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); +}); + + +/***/ }), + +/***/ "6V7H": +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.symbol.pattern-match.js ***! + \*********************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n"); + +// `Symbol.patternMatch` well-known symbol +// https://github.com/tc39/proposal-pattern-matching +defineWellKnownSymbol('patternMatch'); + + +/***/ }), + +/***/ "6VoE": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/internals/is-array-iterator-method.js ***! + \********************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp"); +var Iterators = __webpack_require__(/*! ../internals/iterators */ "P4y1"); + +var ITERATOR = wellKnownSymbol('iterator'); +var ArrayPrototype = Array.prototype; + +// check on default Array iterator +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it); +}; + + +/***/ }), + +/***/ "6YAi": +/*!***********************************************************!*\ + !*** ./src/models/classrooms/announcement.ts + 1 modules ***! + \***********************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/pages/metting/home/index.jsx */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// 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/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +var asyncToGenerator = __webpack_require__("9og8"); + +// EXTERNAL MODULE: ./src/utils/fetch.ts +var fetch = __webpack_require__("ErOA"); + +// CONCATENATED MODULE: ./src/service/announcement.ts + + +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + +// 公告上移 +function announcement_informUp(_x) { + return _informUp.apply(this, arguments); +} +// 公告下移 +function _informUp() { + _informUp = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) { + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/inform_up.json"), { + method: 'post', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context.stop(); + } + }, _callee); + })); + return _informUp.apply(this, arguments); +} +function announcement_informDown(_x2) { + return _informDown.apply(this, arguments); +} +// 更新公告 +function _informDown() { + _informDown = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/inform_down.json"), { + method: 'post', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return _informDown.apply(this, arguments); +} +function updateInforms(_x3) { + return _updateInforms.apply(this, arguments); +} + +// 新建公告 +function _updateInforms() { + _updateInforms = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) { + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + return _context3.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/update_informs.json"), { + method: 'post', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context3.stop(); + } + }, _callee3); + })); + return _updateInforms.apply(this, arguments); +} +function newInforms(_x4) { + return _newInforms.apply(this, arguments); +} +function _newInforms() { + _newInforms = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) { + return _regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + return _context4.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/new_informs.json"), { + method: 'post', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context4.stop(); + } + }, _callee4); + })); + return _newInforms.apply(this, arguments); +} +// CONCATENATED MODULE: ./src/models/classrooms/announcement.ts + +function announcement_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ announcement_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + +var AnnouncementModel = { + namespace: 'announcement', + state: { + name: '普通试卷,随机试卷详情页面', + loading: true, + // 题库 + actionTabs: {} + }, + effects: { + // 公告 下移 + informDown: function informDown(_ref, _ref2) { + var payload = _ref.payload, + callback = _ref.callback; + var call = _ref2.call, + put = _ref2.put; + return /*#__PURE__*/announcement_regeneratorRuntime().mark(function _callee() { + var response; + return announcement_regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return call(announcement_informDown, payload); + case 2: + response = _context.sent; + return _context.abrupt("return", response); + case 4: + case "end": + return _context.stop(); + } + }, _callee); + })(); + }, + // 公告 上移 + informUp: function informUp(_ref3, _ref4) { + var payload = _ref3.payload, + callback = _ref3.callback; + var call = _ref4.call, + put = _ref4.put; + return /*#__PURE__*/announcement_regeneratorRuntime().mark(function _callee2() { + var response; + return announcement_regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return call(announcement_informUp, payload); + case 2: + response = _context2.sent; + return _context2.abrupt("return", response); + case 4: + case "end": + return _context2.stop(); + } + }, _callee2); + })(); + }, + // 设置操做action + setActionTabs: function setActionTabs(_ref5, _ref6) { + var payload = _ref5.payload; + var call = _ref6.call, + put = _ref6.put; + return /*#__PURE__*/announcement_regeneratorRuntime().mark(function _callee3() { + return announcement_regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + _context3.next = 2; + return put({ + type: 'save', + payload: { + actionTabs: Object(objectSpread2["a" /* default */])({}, payload) + } + }); + case 2: + case "end": + return _context3.stop(); + } + }, _callee3); + })(); + } + }, + reducers: { + save: function save(state, action) { + return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload); + } + }, + subscriptions: { + setup: function setup(_ref7) { + var dispatch = _ref7.dispatch, + history = _ref7.history; + } + } +}; +/* harmony default export */ var announcement = __webpack_exports__["a"] = (AnnouncementModel); + +/***/ }), + +/***/ "6acW": +/*!*******************************************!*\ + !*** ./node_modules/lodash/capitalize.js ***! + \*******************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var toString = __webpack_require__(/*! ./toString */ "dt0z"), + upperFirst = __webpack_require__(/*! ./upperFirst */ "gQMU"); + +/** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ +function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); +} + +module.exports = capitalize; + + +/***/ }), + +/***/ "6fQ5": +/*!***************************************!*\ + !*** ./src/models/problemset/util.ts ***! + \***************************************/ +/*! exports provided: formatCourseOptions, formatPaperData */ +/*! exports used: formatCourseOptions, formatPaperData */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return formatCourseOptions; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return formatPaperData; }); +/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw"); + +var formatCourseOptions = function formatCourseOptions(disciplines) { + return disciplines === null || disciplines === void 0 ? void 0 : disciplines.map(function (item) { + var children = (item.sub_disciplines || []).map(function (subItem) { + return { + value: subItem.id, + label: subItem.name + }; + }); + return { + value: item.id, + label: item.name, + children: children + }; + }); +}; +var numberFormatChinese = { + 1: '一', + 2: '二', + 3: '三', + 4: '四', + 5: '五', + 6: '六', + 7: '七' +}; +var formatPaperData = function formatPaperData(originData) { + if (!originData) { + return; + } + var _ref = originData || {}, + all_questions_count = _ref.all_questions_count, + all_score = _ref.all_score, + single_questions = _ref.single_questions, + multiple_questions = _ref.multiple_questions, + judgement_questions = _ref.judgement_questions, + program_questions = _ref.program_questions, + completion_questions = _ref.completion_questions, + subjective_questions = _ref.subjective_questions, + practical_questions = _ref.practical_questions; + var questionData = [Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ + type: 'SINGLE', + name: '单选题' + }, single_questions), Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ + type: 'MULTIPLE', + name: '多选题' + }, multiple_questions), Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ + type: 'COMPLETION', + name: '填空题' + }, completion_questions), Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ + type: 'JUDGMENT', + name: '判断题' + }, judgement_questions), Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ + type: 'SUBJECTIVE', + name: '简答题' + }, subjective_questions), Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ + type: 'PROGRAM', + name: '编程题' + }, program_questions), Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ + type: 'PRACTICAL', + name: '实训题' + }, practical_questions)]; + var questionList = questionData.filter(function (item) { + return item.questions_count > 0; + }).map(function (item, index) { + return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, item), { + number: numberFormatChinese[index + 1] + }); + }); + return { + all_questions_count: all_questions_count, + all_score: all_score, + questionList: questionList + }; +}; + +/***/ }), + +/***/ "6koa": +/*!*****************************************************!*\ + !*** ./node_modules/shallow-equal/objects/index.js ***! + \*****************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function shallowEqualObjects(objA, objB) { + if (objA === objB) { + return true; + } + + if (!objA || !objB) { + return false; + } + + var aKeys = Object.keys(objA); + var bKeys = Object.keys(objB); + var len = aKeys.length; + + if (bKeys.length !== len) { + return false; + } + + for (var i = 0; i < len; i++) { + var key = aKeys[i]; + + if (objA[key] !== objB[key] || !Object.prototype.hasOwnProperty.call(objB, key)) { + return false; + } + } + + return true; +} + +module.exports = shallowEqualObjects; + + +/***/ }), + +/***/ "6nK8": +/*!**************************************!*\ + !*** ./node_modules/lodash/words.js ***! + \**************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var asciiWords = __webpack_require__(/*! ./_asciiWords */ "dVn5"), + hasUnicodeWord = __webpack_require__(/*! ./_hasUnicodeWord */ "fo6e"), + toString = __webpack_require__(/*! ./toString */ "dt0z"), + unicodeWords = __webpack_require__(/*! ./_unicodeWords */ "9NmV"); + +/** + * Splits `string` into an array of its words. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {RegExp|string} [pattern] The pattern to match words. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the words of `string`. + * @example + * + * _.words('fred, barney, & pebbles'); + * // => ['fred', 'barney', 'pebbles'] + * + * _.words('fred, barney, & pebbles', /[^, ]+/g); + * // => ['fred', 'barney', '&', 'pebbles'] + */ +function words(string, pattern, guard) { + string = toString(string); + pattern = guard ? undefined : pattern; + + if (pattern === undefined) { + return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); + } + return string.match(pattern) || []; +} + +module.exports = words; + + +/***/ }), + +/***/ "6x0u": +/*!*****************************************************************************!*\ + !*** ./node_modules/core-js/internals/object-prototype-accessors-forced.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR"); +var global = __webpack_require__(/*! ../internals/global */ "2oRo"); +var fails = __webpack_require__(/*! ../internals/fails */ "0Dky"); + +// Forced replacement object prototype accessors methods +module.exports = IS_PURE || !fails(function () { + var key = Math.random(); + // In FF throws only define methods + // eslint-disable-next-line no-undef, no-useless-call + __defineSetter__.call(null, key, function () { /* empty */ }); + delete global[key]; +}); + + +/***/ }), + +/***/ "7+kd": +/*!************************************************************************!*\ + !*** ./node_modules/core-js/modules/es.symbol.is-concat-spreadable.js ***! + \************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n"); + +// `Symbol.isConcatSpreadable` well-known symbol +// https://tc39.github.io/ecma262/#sec-symbol.isconcatspreadable +defineWellKnownSymbol('isConcatSpreadable'); + + +/***/ }), + +/***/ "7+zs": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/modules/es.date.to-primitive.js ***! + \**************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp"); +var dateToPrimitive = __webpack_require__(/*! ../internals/date-to-primitive */ "UesL"); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp"); + +var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); +var DatePrototype = Date.prototype; + +// `Date.prototype[@@toPrimitive]` method +// https://tc39.github.io/ecma262/#sec-date.prototype-@@toprimitive +if (!(TO_PRIMITIVE in DatePrototype)) { + createNonEnumerableProperty(DatePrototype, TO_PRIMITIVE, dateToPrimitive); +} + + +/***/ }), + +/***/ "702D": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.weak-map.from.js ***! + \**************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var from = __webpack_require__(/*! ../internals/collection-from */ "qY7S"); + +// `WeakMap.from` method +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from +$({ target: 'WeakMap', stat: true }, { + from: from +}); + + +/***/ }), + +/***/ "72Ab": +/*!************************************************************!*\ + !*** ./node_modules/@ant-design/icons/InfoCircleFilled.js ***! + \************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; + + var _InfoCircleFilled = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/InfoCircleFilled */ "8KD2")); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _default = _InfoCircleFilled; + exports.default = _default; + module.exports = _default; + +/***/ }), + +/***/ "7JcK": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es.typed-array.of.js ***! + \***********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC"); +var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = __webpack_require__(/*! ../internals/typed-array-constructors-require-wrappers */ "iqeF"); + +var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor; +var exportTypedArrayStaticMethod = ArrayBufferViewCore.exportTypedArrayStaticMethod; + +// `%TypedArray%.of` method +// https://tc39.github.io/ecma262/#sec-%typedarray%.of +exportTypedArrayStaticMethod('of', function of(/* ...items */) { + var index = 0; + var length = arguments.length; + var result = new (aTypedArrayConstructor(this))(length); + while (length > index) result[index] = arguments[index++]; + return result; +}, TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS); + + +/***/ }), + +/***/ "7VZV": +/*!*************************************************!*\ + !*** ./src/models/globalSetting.ts + 1 modules ***! + \*************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts because of ./src/pages/Competitions/Update/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/pages/metting/home/index.jsx */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// 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/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +var asyncToGenerator = __webpack_require__("9og8"); + +// EXTERNAL MODULE: ./src/utils/fetch.ts +var fetch = __webpack_require__("ErOA"); + +// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules +var env = __webpack_require__("m3rI"); + +// CONCATENATED MODULE: ./src/service/global.ts + +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + + + +// console.log('-------123213-',window.location.hostname); + +//获取所有频道 +function getGlobalSetting() { + return _getGlobalSetting.apply(this, arguments); +} +function _getGlobalSetting() { + _getGlobalSetting = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", Object(fetch["a" /* default */])("".concat(env["a" /* default */].FORGE_SERVER, "/api/setting.json"), { + method: 'Get' + })); + case 1: + case "end": + return _context.stop(); + } + }, _callee); + })); + return _getGlobalSetting.apply(this, arguments); +} +function global_getSystemUpdate() { + return _getSystemUpdate.apply(this, arguments); +} + +//添加搜索记录 +function _getSystemUpdate() { + _getSystemUpdate = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", Object(fetch["a" /* default */])('/api/users/system_update.json', { + method: 'Get' + })); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return _getSystemUpdate.apply(this, arguments); +} +function addSearchRecord(_x) { + return _addSearchRecord.apply(this, arguments); +} +function _addSearchRecord() { + _addSearchRecord = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) { + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + return _context3.abrupt("return", Object(fetch["a" /* default */])('/api/search_records', { + method: 'post', + body: params + })); + case 1: + case "end": + return _context3.stop(); + } + }, _callee3); + })); + return _addSearchRecord.apply(this, arguments); +} +// CONCATENATED MODULE: ./src/models/globalSetting.ts + +function globalSetting_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ globalSetting_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + + +var GlobalSettingModel = { + namespace: 'globalSetting', + state: { + name: '全局配置', + loading: true, + showFooter: true, + showHeader: true, + showHeaderFooter: true, + showHeaderFixed: false, + onlyShowBackTop: true, + onlyShowBackTopIcons: true, + operateModel: false, + operateModelPath: '', + showQuestionBackTop: false, + globalLoading: { + show: false, + text: "" + }, + updateData: { + end_time: "", + start_time: "", + subject: "", + system_score: "", + system_update: false + } + }, + effects: { + query: function query(_ref, _ref2) { + var payload = _ref.payload; + var call = _ref2.call, + put = _ref2.put; + return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee() { + var response; + return globalSetting_regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return call(getGlobalSetting, payload); + case 2: + response = _context.sent; + // 获取页面数据 + globalSetting_handleDynamicFavicon(response); + _context.next = 6; + return put({ + type: 'save', + payload: Object(objectSpread2["a" /* default */])({}, response) + }); + case 6: + case "end": + return _context.stop(); + } + }, _callee); + })(); + }, + getSystemUpdate: function getSystemUpdate(_ref3, _ref4) { + var payload = _ref3.payload; + var call = _ref4.call, + put = _ref4.put; + return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee2() { + var response; + return globalSetting_regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return call(global_getSystemUpdate, payload); + case 2: + response = _context2.sent; + _context2.next = 5; + return put({ + type: 'save', + payload: { + updateData: Object(objectSpread2["a" /* default */])({}, response) + } + }); + case 5: + case "end": + return _context2.stop(); + } + }, _callee2); + })(); + }, + setGlobalLoading: function setGlobalLoading(_ref5, _ref6) { + var payload = _ref5.payload; + var call = _ref6.call, + put = _ref6.put; + return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee3() { + return globalSetting_regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + _context3.next = 2; + return put({ + type: 'save', + payload: { + globalLoading: Object(objectSpread2["a" /* default */])({}, payload) + } + }); + case 2: + case "end": + return _context3.stop(); + } + }, _callee3); + })(); + }, + // 显示隐藏头部 true显示 hide隐藏 + headerToggle: function headerToggle(_ref7, _ref8) { + var payload = _ref7.payload; + var call = _ref8.call, + put = _ref8.put; + return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee4() { + return globalSetting_regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + _context4.next = 2; + return put({ + type: 'save', + payload: { + showHeader: payload + } + }); + case 2: + case "end": + return _context4.stop(); + } + }, _callee4); + })(); + }, + // 显示隐藏尾部 true显示 hide隐藏 + footerToggle: function footerToggle(_ref9, _ref10) { + var payload = _ref9.payload; + var call = _ref10.call, + put = _ref10.put; + return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee5() { + return globalSetting_regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + _context5.next = 2; + return put({ + type: 'save', + payload: { + showFooter: payload + } + }); + case 2: + case "end": + return _context5.stop(); + } + }, _callee5); + })(); + }, + // 显示隐藏头部尾部 true显示 hide隐藏 + headerFooterToggle: function headerFooterToggle(_ref11, _ref12) { + var payload = _ref11.payload; + var call = _ref12.call, + put = _ref12.put; + return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee6() { + return globalSetting_regeneratorRuntime().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + _context6.next = 2; + return put({ + type: 'save', + payload: { + showHeaderFooter: payload + } + }); + case 2: + case "end": + return _context6.stop(); + } + }, _callee6); + })(); + }, + // 显示隐藏头部 Fixed 布局 true显示 hide隐藏 + headerFixedToggle: function headerFixedToggle(_ref13, _ref14) { + var payload = _ref13.payload; + var call = _ref14.call, + put = _ref14.put; + return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee7() { + return globalSetting_regeneratorRuntime().wrap(function _callee7$(_context7) { + while (1) switch (_context7.prev = _context7.next) { + case 0: + _context7.next = 2; + return put({ + type: 'save', + payload: { + showHeaderFixed: payload + } + }); + case 2: + case "end": + return _context7.stop(); + } + }, _callee7); + })(); + }, + // 只显示隐藏侧边返回顶部操作 true显示 hide隐藏 + onlyShowBackTopToggle: function onlyShowBackTopToggle(_ref15, _ref16) { + var payload = _ref15.payload; + var call = _ref16.call, + put = _ref16.put; + return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee8() { + return globalSetting_regeneratorRuntime().wrap(function _callee8$(_context8) { + while (1) switch (_context8.prev = _context8.next) { + case 0: + _context8.next = 2; + return put({ + type: 'save', + payload: { + onlyShowBackTop: payload + } + }); + case 2: + case "end": + return _context8.stop(); + } + }, _callee8); + })(); + }, + // 只显示隐藏侧边返回顶部操作 true显示 false隐藏 + onlyShowBackTopIconToggle: function onlyShowBackTopIconToggle(_ref17, _ref18) { + var payload = _ref17.payload; + var call = _ref18.call, + put = _ref18.put; + return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee9() { + return globalSetting_regeneratorRuntime().wrap(function _callee9$(_context9) { + while (1) switch (_context9.prev = _context9.next) { + case 0: + _context9.next = 2; + return put({ + type: 'save', + payload: { + onlyShowBackTopIcons: payload + } + }); + case 2: + case "end": + return _context9.stop(); + } + }, _callee9); + })(); + }, + // 运营弹框 true显示 false隐藏 + setOperateModel: function setOperateModel(_ref19, _ref20) { + var payload = _ref19.payload; + var call = _ref20.call, + put = _ref20.put; + return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee10() { + return globalSetting_regeneratorRuntime().wrap(function _callee10$(_context10) { + while (1) switch (_context10.prev = _context10.next) { + case 0: + _context10.next = 2; + return put({ + type: 'save', + payload: { + operateModel: payload + } + }); + case 2: + case "end": + return _context10.stop(); + } + }, _callee10); + })(); + }, + // 运营弹框地址 + setOperateModelPath: function setOperateModelPath(_ref21, _ref22) { + var payload = _ref21.payload; + var call = _ref22.call, + put = _ref22.put; + return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee11() { + return globalSetting_regeneratorRuntime().wrap(function _callee11$(_context11) { + while (1) switch (_context11.prev = _context11.next) { + case 0: + _context11.next = 2; + return put({ + type: 'save', + payload: { + operateModelPath: payload + } + }); + case 2: + case "end": + return _context11.stop(); + } + }, _callee11); + })(); + }, + // 刷题 + setShowQuestionBackTop: function setShowQuestionBackTop(_ref23, _ref24) { + var payload = _ref23.payload; + var call = _ref24.call, + put = _ref24.put; + return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee12() { + return globalSetting_regeneratorRuntime().wrap(function _callee12$(_context12) { + while (1) switch (_context12.prev = _context12.next) { + case 0: + _context12.next = 2; + return put({ + type: 'save', + payload: { + showQuestionBackTop: payload + } + }); + case 2: + case "end": + return _context12.stop(); + } + }, _callee12); + })(); + } + }, + reducers: { + save: function save(state, action) { + // console.log("reducers:",state,action) + return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload); + } + }, + subscriptions: { + setup: function setup(_ref25) { + var dispatch = _ref25.dispatch, + history = _ref25.history; + // console.log("subscriptions:", dispatch, history) + return history.listen(function (_ref26) { + var pathname = _ref26.pathname; + if (pathname === '/') {} + }); + } + } +}; +/* harmony default export */ var globalSetting = __webpack_exports__["a"] = (GlobalSettingModel); +var globalSetting_handleDynamicFavicon = function handleDynamicFavicon() { + var _response$setting, _response$setting2, _response$setting3; + var response = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + (_response$setting = response.setting) === null || _response$setting === void 0 ? void 0 : _response$setting.tab_logo_url; + var link = document.createElement('link'); + var oldLink = document.getElementById('dynamic-favicon'); + link.id = 'dynamic-favicon'; + link.rel = 'shortcut icon'; + link.href = ((_response$setting2 = response.setting) === null || _response$setting2 === void 0 ? void 0 : _response$setting2.tab_logo_url) ? "".concat(env["a" /* default */].FORGE_SERVER, "/").concat((_response$setting3 = response.setting) === null || _response$setting3 === void 0 ? void 0 : _response$setting3.tab_logo_url) : "".concat(env["a" /* default */].FORGE_SERVER, "/react/build/./favicon.ico"); + oldLink && document.head.removeChild(oldLink); + document.head.appendChild(link); +}; + +/***/ }), + +/***/ "7W2i": +/*!*********************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/inherits.js ***! + \*********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "SksO"); +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + Object.defineProperty(subClass, "prototype", { + writable: false + }); + if (superClass) setPrototypeOf(subClass, superClass); +} +module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "7ckf": +/*!*************************************************!*\ + !*** ./node_modules/hash.js/lib/hash/common.js ***! + \*************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(/*! ./utils */ "w8CP"); +var assert = __webpack_require__(/*! minimalistic-assert */ "2j6C"); + +function BlockHash() { + this.pending = null; + this.pendingTotal = 0; + this.blockSize = this.constructor.blockSize; + this.outSize = this.constructor.outSize; + this.hmacStrength = this.constructor.hmacStrength; + this.padLength = this.constructor.padLength / 8; + this.endian = 'big'; + + this._delta8 = this.blockSize / 8; + this._delta32 = this.blockSize / 32; +} +exports.BlockHash = BlockHash; + +BlockHash.prototype.update = function update(msg, enc) { + // Convert message to array, pad it, and join into 32bit blocks + msg = utils.toArray(msg, enc); + if (!this.pending) + this.pending = msg; + else + this.pending = this.pending.concat(msg); + this.pendingTotal += msg.length; + + // Enough data, try updating + if (this.pending.length >= this._delta8) { + msg = this.pending; + + // Process pending data in blocks + var r = msg.length % this._delta8; + this.pending = msg.slice(msg.length - r, msg.length); + if (this.pending.length === 0) + this.pending = null; + + msg = utils.join32(msg, 0, msg.length - r, this.endian); + for (var i = 0; i < msg.length; i += this._delta32) + this._update(msg, i, i + this._delta32); + } + + return this; +}; + +BlockHash.prototype.digest = function digest(enc) { + this.update(this._pad()); + assert(this.pending === null); + + return this._digest(enc); +}; + +BlockHash.prototype._pad = function pad() { + var len = this.pendingTotal; + var bytes = this._delta8; + var k = bytes - ((len + this.padLength) % bytes); + var res = new Array(k + this.padLength); + res[0] = 0x80; + for (var i = 1; i < k; i++) + res[i] = 0; + + // Append length + len <<= 3; + if (this.endian === 'big') { + for (var t = 8; t < this.padLength; t++) + res[i++] = 0; + + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = (len >>> 24) & 0xff; + res[i++] = (len >>> 16) & 0xff; + res[i++] = (len >>> 8) & 0xff; + res[i++] = len & 0xff; + } else { + res[i++] = len & 0xff; + res[i++] = (len >>> 8) & 0xff; + res[i++] = (len >>> 16) & 0xff; + res[i++] = (len >>> 24) & 0xff; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + res[i++] = 0; + + for (t = 8; t < this.padLength; t++) + res[i++] = 0; + } + + return res; +}; + + +/***/ }), + +/***/ "7ueG": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.trim-start.js ***! + \**************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var $trimStart = __webpack_require__(/*! ../internals/string-trim */ "WKiH").start; +var forcedStringTrimMethod = __webpack_require__(/*! ../internals/string-trim-forced */ "yNLB"); + +var FORCED = forcedStringTrimMethod('trimStart'); + +var trimStart = FORCED ? function trimStart() { + return $trimStart(this); +} : ''.trimStart; + +// `String.prototype.{ trimStart, trimLeft }` methods +// https://github.com/tc39/ecmascript-string-left-right-trim +$({ target: 'String', proto: true, forced: FORCED }, { + trimStart: trimStart, + trimLeft: trimStart +}); + + +/***/ }), + +/***/ "7xWI": +/*!********************************************************************!*\ + !*** ./node_modules/@umijs/plugin-model/lib/helpers/dispatcher.js ***! + \********************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var Dispatcher = function Dispatcher() { + var _this = this; + + _classCallCheck(this, Dispatcher); + + this.callbacks = {}; + this.data = {}; + + this.update = function (namespace) { + (_this.callbacks[namespace] || []).forEach(function (callback) { + try { + var data = _this.data[namespace]; + callback(data); + } catch (e) { + callback(undefined); + } + }); + }; +}; + +exports.default = Dispatcher; + +/***/ }), + +/***/ "7zRj": +/*!*****************************************!*\ + !*** ./node_modules/global/document.js ***! + \*****************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {var topLevel = typeof global !== 'undefined' ? global : + typeof window !== 'undefined' ? window : {} +var minDoc = __webpack_require__(/*! min-document */ 3); + +var doccy; + +if (typeof document !== 'undefined') { + doccy = document; +} else { + doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4']; + + if (!doccy) { + doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc; + } +} + +module.exports = doccy; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "yLpj"))) + +/***/ }), + +/***/ "8+s/": +/*!*****************************************************!*\ + !*** ./node_modules/react-side-effect/lib/index.js ***! + \*****************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var React = __webpack_require__(/*! react */ "q1tI"); +var React__default = _interopDefault(React); + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; +} + +var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); +function withSideEffect(reducePropsToState, handleStateChangeOnClient, mapStateOnServer) { + if (typeof reducePropsToState !== 'function') { + throw new Error('Expected reducePropsToState to be a function.'); + } + + if (typeof handleStateChangeOnClient !== 'function') { + throw new Error('Expected handleStateChangeOnClient to be a function.'); + } + + if (typeof mapStateOnServer !== 'undefined' && typeof mapStateOnServer !== 'function') { + throw new Error('Expected mapStateOnServer to either be undefined or a function.'); + } + + function getDisplayName(WrappedComponent) { + return WrappedComponent.displayName || WrappedComponent.name || 'Component'; + } + + return function wrap(WrappedComponent) { + if (typeof WrappedComponent !== 'function') { + throw new Error('Expected WrappedComponent to be a React component.'); + } + + var mountedInstances = []; + var state; + + function emitChange() { + state = reducePropsToState(mountedInstances.map(function (instance) { + return instance.props; + })); + + if (SideEffect.canUseDOM) { + handleStateChangeOnClient(state); + } else if (mapStateOnServer) { + state = mapStateOnServer(state); + } + } + + var SideEffect = + /*#__PURE__*/ + function (_PureComponent) { + _inheritsLoose(SideEffect, _PureComponent); + + function SideEffect() { + return _PureComponent.apply(this, arguments) || this; + } + + // Try to use displayName of wrapped component + // Expose canUseDOM so tests can monkeypatch it + SideEffect.peek = function peek() { + return state; + }; + + SideEffect.rewind = function rewind() { + if (SideEffect.canUseDOM) { + throw new Error('You may only call rewind() on the server. Call peek() to read the current state.'); + } + + var recordedState = state; + state = undefined; + mountedInstances = []; + return recordedState; + }; + + var _proto = SideEffect.prototype; + + _proto.UNSAFE_componentWillMount = function UNSAFE_componentWillMount() { + mountedInstances.push(this); + emitChange(); + }; + + _proto.componentDidUpdate = function componentDidUpdate() { + emitChange(); + }; + + _proto.componentWillUnmount = function componentWillUnmount() { + var index = mountedInstances.indexOf(this); + mountedInstances.splice(index, 1); + emitChange(); + }; + + _proto.render = function render() { + return React__default.createElement(WrappedComponent, this.props); + }; + + return SideEffect; + }(React.PureComponent); + + _defineProperty(SideEffect, "displayName", "SideEffect(" + getDisplayName(WrappedComponent) + ")"); + + _defineProperty(SideEffect, "canUseDOM", canUseDOM); + + return SideEffect; + }; +} + +module.exports = withSideEffect; + + +/***/ }), + +/***/ "85Yc": +/*!*************************************************************!*\ + !*** ./node_modules/rc-field-form/es/index.js + 11 modules ***! + \*************************************************************/ +/*! exports provided: Field, List, useForm, FormProvider, default */ +/*! exports used: Field, FormProvider, List, default, useForm */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./node_modules/rc-trigger/es/Popup/useVisibleStatus.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js because of ./node_modules/rc-textarea/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js because of ./node_modules/rc-textarea/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js because of ./src/pages/Competitions/components/ClaModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./node_modules/rc-tooltip/es/Tooltip.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js because of ./node_modules/rc-textarea/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./node_modules/rc-tooltip/es/Tooltip.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js because of ./node_modules/rc-tooltip/es/Tooltip.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js because of ./node_modules/@ant-design/icons/es/components/twoTonePrimaryColor.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js because of ./src/pages/metting/information/detail.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js because of ./node_modules/rc-tooltip/es/Tooltip.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/async-validator/dist-web/index.js (<- Module uses injected variables (process)) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-field-form/es/FieldContext.js because of ./node_modules/antd/es/form/FormItem.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js because of ./node_modules/antd/es/breadcrumb/Breadcrumb.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/utils/get.js because of ./node_modules/rc-util/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/utils/set.js because of ./node_modules/rc-util/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js because of ./node_modules/antd/es/breadcrumb/Breadcrumb.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ es_Field; }); +__webpack_require__.d(__webpack_exports__, "c", function() { return /* reexport */ es_List; }); +__webpack_require__.d(__webpack_exports__, "e", function() { return /* reexport */ es_useForm; }); +__webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ FormContext_FormProvider; }); + +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__("q1tI"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +var objectWithoutProperties = __webpack_require__("Ff2n"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js +var defineProperty = __webpack_require__("rePB"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("VTBJ"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules +var toConsumableArray = __webpack_require__("KQm4"); + +// 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: ./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-field-form/es/FieldContext.js +var FieldContext = __webpack_require__("KW7l"); + +// CONCATENATED MODULE: ./node_modules/rc-field-form/es/utils/typeUtil.js +function typeUtil_toArray(value) { + if (value === undefined || value === null) { + return []; + } + + return Array.isArray(value) ? value : [value]; +} +// EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js +var regenerator = __webpack_require__("o0o1"); +var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +var asyncToGenerator = __webpack_require__("HaE+"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js +var esm_typeof = __webpack_require__("U8pU"); + +// EXTERNAL MODULE: ./node_modules/async-validator/dist-web/index.js +var dist_web = __webpack_require__("KpVd"); + +// EXTERNAL MODULE: ./node_modules/rc-util/es/utils/get.js +var utils_get = __webpack_require__("ub+h"); + +// EXTERNAL MODULE: ./node_modules/rc-util/es/utils/set.js +var utils_set = __webpack_require__("bG1m"); + +// CONCATENATED MODULE: ./node_modules/rc-field-form/es/utils/valueUtil.js + + + + + + +/** + * Convert name to internal supported format. + * This function should keep since we still thinking if need support like `a.b.c` format. + * 'a' => ['a'] + * 123 => [123] + * ['a', 123] => ['a', 123] + */ + +function getNamePath(path) { + return typeUtil_toArray(path); +} +function getValue(store, namePath) { + var value = Object(utils_get["a" /* default */])(store, namePath); + return value; +} +function setValue(store, namePath, value) { + var newStore = Object(utils_set["a" /* default */])(store, namePath, value); + return newStore; +} +function cloneByNamePathList(store, namePathList) { + var newStore = {}; + namePathList.forEach(function (namePath) { + var value = getValue(store, namePath); + newStore = setValue(newStore, namePath, value); + }); + return newStore; +} +function containsNamePath(namePathList, namePath) { + return namePathList && namePathList.some(function (path) { + return matchNamePath(path, namePath); + }); +} + +function isObject(obj) { + return Object(esm_typeof["a" /* default */])(obj) === 'object' && obj !== null && Object.getPrototypeOf(obj) === Object.prototype; +} +/** + * Copy values into store and return a new values object + * ({ a: 1, b: { c: 2 } }, { a: 4, b: { d: 5 } }) => { a: 4, b: { c: 2, d: 5 } } + */ + + +function internalSetValues(store, values) { + var newStore = Array.isArray(store) ? Object(toConsumableArray["a" /* default */])(store) : Object(objectSpread2["a" /* default */])({}, store); + + if (!values) { + return newStore; + } + + Object.keys(values).forEach(function (key) { + var prevValue = newStore[key]; + var value = values[key]; // If both are object (but target is not array), we use recursion to set deep value + + var recursive = isObject(prevValue) && isObject(value); + newStore[key] = recursive ? internalSetValues(prevValue, value || {}) : value; + }); + return newStore; +} + +function setValues(store) { + for (var _len = arguments.length, restValues = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + restValues[_key - 1] = arguments[_key]; + } + + return restValues.reduce(function (current, newStore) { + return internalSetValues(current, newStore); + }, store); +} +function matchNamePath(namePath, changedNamePath) { + if (!namePath || !changedNamePath || namePath.length !== changedNamePath.length) { + return false; + } + + return namePath.every(function (nameUnit, i) { + return changedNamePath[i] === nameUnit; + }); +} +function isSimilar(source, target) { + if (source === target) { + return true; + } + + if (!source && target || source && !target) { + return false; + } + + if (!source || !target || Object(esm_typeof["a" /* default */])(source) !== 'object' || Object(esm_typeof["a" /* default */])(target) !== 'object') { + return false; + } + + var sourceKeys = Object.keys(source); + var targetKeys = Object.keys(target); + var keys = new Set([].concat(Object(toConsumableArray["a" /* default */])(sourceKeys), Object(toConsumableArray["a" /* default */])(targetKeys))); + return Object(toConsumableArray["a" /* default */])(keys).every(function (key) { + var sourceValue = source[key]; + var targetValue = target[key]; + + if (typeof sourceValue === 'function' && typeof targetValue === 'function') { + return true; + } + + return sourceValue === targetValue; + }); +} +function defaultGetValueFromEvent(valuePropName) { + var event = arguments.length <= 1 ? undefined : arguments[1]; + + if (event && event.target && valuePropName in event.target) { + return event.target[valuePropName]; + } + + return event; +} +/** + * Moves an array item from one position in an array to another. + * + * Note: This is a pure function so a new array will be returned, instead + * of altering the array argument. + * + * @param array Array in which to move an item. (required) + * @param moveIndex The index of the item to move. (required) + * @param toIndex The index to move item at moveIndex to. (required) + */ + +function valueUtil_move(array, moveIndex, toIndex) { + var length = array.length; + + if (moveIndex < 0 || moveIndex >= length || toIndex < 0 || toIndex >= length) { + return array; + } + + var item = array[moveIndex]; + var diff = moveIndex - toIndex; + + if (diff > 0) { + // move left + return [].concat(Object(toConsumableArray["a" /* default */])(array.slice(0, toIndex)), [item], Object(toConsumableArray["a" /* default */])(array.slice(toIndex, moveIndex)), Object(toConsumableArray["a" /* default */])(array.slice(moveIndex + 1, length))); + } + + if (diff < 0) { + // move right + return [].concat(Object(toConsumableArray["a" /* default */])(array.slice(0, moveIndex)), Object(toConsumableArray["a" /* default */])(array.slice(moveIndex + 1, toIndex + 1)), [item], Object(toConsumableArray["a" /* default */])(array.slice(toIndex + 1, length))); + } + + return array; +} +// CONCATENATED MODULE: ./node_modules/rc-field-form/es/utils/messages.js +var typeTemplate = "'${name}' is not a valid ${type}"; +var defaultValidateMessages = { + default: "Validation error on field '${name}'", + required: "'${name}' is required", + enum: "'${name}' must be one of [${enum}]", + whitespace: "'${name}' cannot be empty", + date: { + format: "'${name}' is invalid for format date", + parse: "'${name}' could not be parsed as date", + invalid: "'${name}' is invalid date" + }, + types: { + string: typeTemplate, + method: typeTemplate, + array: typeTemplate, + object: typeTemplate, + number: typeTemplate, + date: typeTemplate, + boolean: typeTemplate, + integer: typeTemplate, + float: typeTemplate, + regexp: typeTemplate, + email: typeTemplate, + url: typeTemplate, + hex: typeTemplate + }, + string: { + len: "'${name}' must be exactly ${len} characters", + min: "'${name}' must be at least ${min} characters", + max: "'${name}' cannot be longer than ${max} characters", + range: "'${name}' must be between ${min} and ${max} characters" + }, + number: { + len: "'${name}' must equal ${len}", + min: "'${name}' cannot be less than ${min}", + max: "'${name}' cannot be greater than ${max}", + range: "'${name}' must be between ${min} and ${max}" + }, + array: { + len: "'${name}' must be exactly ${len} in length", + min: "'${name}' cannot be less than ${min} in length", + max: "'${name}' cannot be greater than ${max} in length", + range: "'${name}' must be between ${min} and ${max} in length" + }, + pattern: { + mismatch: "'${name}' does not match pattern ${pattern}" + } +}; +// CONCATENATED MODULE: ./node_modules/rc-field-form/es/utils/validateUtil.js + + + + + + + + + + + // Remove incorrect original ts define + +var AsyncValidator = dist_web["a" /* default */]; +/** + * Replace with template. + * `I'm ${name}` + { name: 'bamboo' } = I'm bamboo + */ + +function replaceMessage(template, kv) { + return template.replace(/\$\{\w+\}/g, function (str) { + var key = str.slice(2, -1); + return kv[key]; + }); +} +/** + * We use `async-validator` to validate rules. So have to hot replace the message with validator. + * { required: '${name} is required' } => { required: () => 'field is required' } + */ + + +function convertMessages(messages, name, rule, messageVariables) { + var kv = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, rule), {}, { + name: name, + enum: (rule.enum || []).join(', ') + }); + + var replaceFunc = function replaceFunc(template, additionalKV) { + return function () { + return replaceMessage(template, Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, kv), additionalKV)); + }; + }; + /* eslint-disable no-param-reassign */ + + + function fillTemplate(source) { + var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + Object.keys(source).forEach(function (ruleName) { + var value = source[ruleName]; + + if (typeof value === 'string') { + target[ruleName] = replaceFunc(value, messageVariables); + } else if (value && Object(esm_typeof["a" /* default */])(value) === 'object') { + target[ruleName] = {}; + fillTemplate(value, target[ruleName]); + } else { + target[ruleName] = value; + } + }); + return target; + } + /* eslint-enable */ + + + return fillTemplate(setValues({}, defaultValidateMessages, messages)); +} + +function validateRule(_x, _x2, _x3, _x4, _x5) { + return _validateRule.apply(this, arguments); +} +/** + * We use `async-validator` to validate the value. + * But only check one value in a time to avoid namePath validate issue. + */ + + +function _validateRule() { + _validateRule = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee2(name, value, rule, options, messageVariables) { + var cloneRule, subRuleField, validator, messages, result, subResults; + return regenerator_default.a.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + cloneRule = Object(objectSpread2["a" /* default */])({}, rule); // We should special handle array validate + + subRuleField = null; + + if (cloneRule && cloneRule.type === 'array' && cloneRule.defaultField) { + subRuleField = cloneRule.defaultField; + delete cloneRule.defaultField; + } + + validator = new AsyncValidator(Object(defineProperty["a" /* default */])({}, name, [cloneRule])); + messages = convertMessages(options.validateMessages, name, cloneRule, messageVariables); + validator.messages(messages); + result = []; + _context2.prev = 7; + _context2.next = 10; + return Promise.resolve(validator.validate(Object(defineProperty["a" /* default */])({}, name, value), Object(objectSpread2["a" /* default */])({}, options))); + + case 10: + _context2.next = 15; + break; + + case 12: + _context2.prev = 12; + _context2.t0 = _context2["catch"](7); + + if (_context2.t0.errors) { + result = _context2.t0.errors.map(function (_ref2, index) { + var message = _ref2.message; + return (// Wrap ReactNode with `key` + react["isValidElement"](message) ? react["cloneElement"](message, { + key: "error_".concat(index) + }) : message + ); + }); + } else { + console.error(_context2.t0); + result = [messages.default()]; + } + + case 15: + if (!(!result.length && subRuleField)) { + _context2.next = 20; + break; + } + + _context2.next = 18; + return Promise.all(value.map(function (subValue, i) { + return validateRule("".concat(name, ".").concat(i), subValue, subRuleField, options, messageVariables); + })); + + case 18: + subResults = _context2.sent; + return _context2.abrupt("return", subResults.reduce(function (prev, errors) { + return [].concat(Object(toConsumableArray["a" /* default */])(prev), Object(toConsumableArray["a" /* default */])(errors)); + }, [])); + + case 20: + return _context2.abrupt("return", result); + + case 21: + case "end": + return _context2.stop(); + } + } + }, _callee2, null, [[7, 12]]); + })); + return _validateRule.apply(this, arguments); +} + +function validateRules(namePath, value, rules, options, validateFirst, messageVariables) { + var name = namePath.join('.'); // Fill rule with context + + var filledRules = rules.map(function (currentRule) { + var originValidatorFunc = currentRule.validator; + + if (!originValidatorFunc) { + return currentRule; + } + + return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, currentRule), {}, { + validator: function validator(rule, val, callback) { + var hasPromise = false; // Wrap callback only accept when promise not provided + + var wrappedCallback = function wrappedCallback() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + // Wait a tick to make sure return type is a promise + Promise.resolve().then(function () { + Object(warning["a" /* default */])(!hasPromise, 'Your validator function has already return a promise. `callback` will be ignored.'); + + if (!hasPromise) { + callback.apply(void 0, args); + } + }); + }; // Get promise + + + var promise = originValidatorFunc(rule, val, wrappedCallback); + hasPromise = promise && typeof promise.then === 'function' && typeof promise.catch === 'function'; + /** + * 1. Use promise as the first priority. + * 2. If promise not exist, use callback with warning instead + */ + + Object(warning["a" /* default */])(hasPromise, '`callback` is deprecated. Please return a promise instead.'); + + if (hasPromise) { + promise.then(function () { + callback(); + }).catch(function (err) { + callback(err); + }); + } + } + }); + }); + var summaryPromise; + + if (validateFirst === true) { + // >>>>> Validate by serialization + summaryPromise = new Promise( /*#__PURE__*/function () { + var _ref = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee(resolve, reject) { + var i, errors; + return regenerator_default.a.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + i = 0; + + case 1: + if (!(i < filledRules.length)) { + _context.next = 11; + break; + } + + _context.next = 4; + return validateRule(name, value, filledRules[i], options, messageVariables); + + case 4: + errors = _context.sent; + + if (!errors.length) { + _context.next = 8; + break; + } + + reject(errors); + return _context.abrupt("return"); + + case 8: + i += 1; + _context.next = 1; + break; + + case 11: + /* eslint-enable */ + resolve([]); + + case 12: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function (_x6, _x7) { + return _ref.apply(this, arguments); + }; + }()); + } else { + // >>>>> Validate by parallel + var rulePromises = filledRules.map(function (rule) { + return validateRule(name, value, rule, options, messageVariables); + }); + summaryPromise = (validateFirst ? finishOnFirstFailed(rulePromises) : finishOnAllFailed(rulePromises)).then(function (errors) { + if (!errors.length) { + return []; + } + + return Promise.reject(errors); + }); + } // Internal catch error to avoid console error log. + + + summaryPromise.catch(function (e) { + return e; + }); + return summaryPromise; +} + +function finishOnAllFailed(_x8) { + return _finishOnAllFailed.apply(this, arguments); +} + +function _finishOnAllFailed() { + _finishOnAllFailed = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee3(rulePromises) { + return regenerator_default.a.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + return _context3.abrupt("return", Promise.all(rulePromises).then(function (errorsList) { + var _ref3; + + var errors = (_ref3 = []).concat.apply(_ref3, Object(toConsumableArray["a" /* default */])(errorsList)); + + return errors; + })); + + case 1: + case "end": + return _context3.stop(); + } + } + }, _callee3); + })); + return _finishOnAllFailed.apply(this, arguments); +} + +function finishOnFirstFailed(_x9) { + return _finishOnFirstFailed.apply(this, arguments); +} + +function _finishOnFirstFailed() { + _finishOnFirstFailed = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee4(rulePromises) { + var count; + return regenerator_default.a.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + count = 0; + return _context4.abrupt("return", new Promise(function (resolve) { + rulePromises.forEach(function (promise) { + promise.then(function (errors) { + if (errors.length) { + resolve(errors); + } + + count += 1; + + if (count === rulePromises.length) { + resolve([]); + } + }); + }); + })); + + case 2: + case "end": + return _context4.stop(); + } + } + }, _callee4); + })); + return _finishOnFirstFailed.apply(this, arguments); +} +// CONCATENATED MODULE: ./node_modules/rc-field-form/es/Field.js + + + + + + + + + + + + + + + + +function requireUpdate(shouldUpdate, prev, next, prevValue, nextValue, info) { + if (typeof shouldUpdate === 'function') { + return shouldUpdate(prev, next, 'source' in info ? { + source: info.source + } : {}); + } + + return prevValue !== nextValue; +} // We use Class instead of Hooks here since it will cost much code by using Hooks. + + +var Field_Field = /*#__PURE__*/function (_React$Component) { + Object(inherits["a" /* default */])(Field, _React$Component); + + var _super = Object(createSuper["a" /* default */])(Field); + + function Field() { + var _this; + + Object(classCallCheck["a" /* default */])(this, Field); + + _this = _super.apply(this, arguments); + _this.state = { + resetCount: 0 + }; + _this.cancelRegisterFunc = null; + _this.destroy = false; + /** + * Follow state should not management in State since it will async update by React. + * This makes first render of form can not get correct state value. + */ + + _this.touched = false; + /** Mark when touched & validated. Currently only used for `dependencies` */ + + _this.dirty = false; + _this.validatePromise = null; + _this.errors = []; + + _this.cancelRegister = function () { + var _this$props = _this.props, + preserve = _this$props.preserve, + isListField = _this$props.isListField; + + if (_this.cancelRegisterFunc) { + _this.cancelRegisterFunc(isListField, preserve); + } + + _this.cancelRegisterFunc = null; + }; // ================================== Utils ================================== + + + _this.getNamePath = function () { + var name = _this.props.name; + var _this$context$prefixN = _this.context.prefixName, + prefixName = _this$context$prefixN === void 0 ? [] : _this$context$prefixN; + return name !== undefined ? [].concat(Object(toConsumableArray["a" /* default */])(prefixName), Object(toConsumableArray["a" /* default */])(name)) : []; + }; + + _this.getRules = function () { + var _this$props$rules = _this.props.rules, + rules = _this$props$rules === void 0 ? [] : _this$props$rules; + return rules.map(function (rule) { + if (typeof rule === 'function') { + return rule(_this.context); + } + + return rule; + }); + }; + + _this.refresh = function () { + if (_this.destroy) return; + /** + * Clean up current node. + */ + + _this.setState(function (_ref) { + var resetCount = _ref.resetCount; + return { + resetCount: resetCount + 1 + }; + }); + }; // ========================= Field Entity Interfaces ========================= + // Trigger by store update. Check if need update the component + + + _this.onStoreChange = function (prevStore, namePathList, info) { + var _this$props2 = _this.props, + shouldUpdate = _this$props2.shouldUpdate, + _this$props2$dependen = _this$props2.dependencies, + dependencies = _this$props2$dependen === void 0 ? [] : _this$props2$dependen, + onReset = _this$props2.onReset; + var store = info.store; + + var namePath = _this.getNamePath(); + + var prevValue = _this.getValue(prevStore); + + var curValue = _this.getValue(store); + + var namePathMatch = namePathList && containsNamePath(namePathList, namePath); // `setFieldsValue` is a quick access to update related status + + if (info.type === 'valueUpdate' && info.source === 'external' && prevValue !== curValue) { + _this.touched = true; + _this.dirty = true; + _this.validatePromise = null; + _this.errors = []; + } + + switch (info.type) { + case 'reset': + if (!namePathList || namePathMatch) { + // Clean up state + _this.touched = false; + _this.dirty = false; + _this.validatePromise = null; + _this.errors = []; + + if (onReset) { + onReset(); + } + + _this.refresh(); + + return; + } + + break; + + case 'setField': + { + if (namePathMatch) { + var data = info.data; + + if ('touched' in data) { + _this.touched = data.touched; + } + + if ('validating' in data && !('originRCField' in data)) { + _this.validatePromise = data.validating ? Promise.resolve([]) : null; + } + + if ('errors' in data) { + _this.errors = data.errors || []; + } + + _this.dirty = true; + + _this.reRender(); + + return; + } // Handle update by `setField` with `shouldUpdate` + + + if (shouldUpdate && !namePath.length && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) { + _this.reRender(); + + return; + } + + break; + } + + case 'dependenciesUpdate': + { + /** + * Trigger when marked `dependencies` updated. Related fields will all update + */ + var dependencyList = dependencies.map(getNamePath); // No need for `namePathMath` check and `shouldUpdate` check, since `valueUpdate` will be + // emitted earlier and they will work there + // If set it may cause unnecessary twice rerendering + + if (dependencyList.some(function (dependency) { + return containsNamePath(info.relatedFields, dependency); + })) { + _this.reRender(); + + return; + } + + break; + } + + default: + // 1. If `namePath` exists in `namePathList`, means it's related value and should update + // For example + // If `namePathList` is [['list']] (List value update), Field should be updated + // If `namePathList` is [['list', 0]] (Field value update), List shouldn't be updated + // 2. + // 2.1 If `dependencies` is set, `name` is not set and `shouldUpdate` is not set, + // don't use `shouldUpdate`. `dependencies` is view as a shortcut if `shouldUpdate` + // is not provided + // 2.2 If `shouldUpdate` provided, use customize logic to update the field + // else to check if value changed + if (namePathMatch || (!dependencies.length || namePath.length || shouldUpdate) && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) { + _this.reRender(); + + return; + } + + break; + } + + if (shouldUpdate === true) { + _this.reRender(); + } + }; + + _this.validateRules = function (options) { + var _this$props3 = _this.props, + _this$props3$validate = _this$props3.validateFirst, + validateFirst = _this$props3$validate === void 0 ? false : _this$props3$validate, + messageVariables = _this$props3.messageVariables; + + var _ref2 = options || {}, + triggerName = _ref2.triggerName; + + var namePath = _this.getNamePath(); + + var filteredRules = _this.getRules(); + + if (triggerName) { + filteredRules = filteredRules.filter(function (rule) { + var validateTrigger = rule.validateTrigger; + + if (!validateTrigger) { + return true; + } + + var triggerList = typeUtil_toArray(validateTrigger); + return triggerList.includes(triggerName); + }); + } + + var promise = validateRules(namePath, _this.getValue(), filteredRules, options, validateFirst, messageVariables); + _this.dirty = true; + _this.validatePromise = promise; + _this.errors = []; + promise.catch(function (e) { + return e; + }).then(function () { + var errors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + + if (_this.validatePromise === promise) { + _this.validatePromise = null; + _this.errors = errors; + + _this.reRender(); + } + }); + return promise; + }; + + _this.isFieldValidating = function () { + return !!_this.validatePromise; + }; + + _this.isFieldTouched = function () { + return _this.touched; + }; + + _this.isFieldDirty = function () { + return _this.dirty; + }; + + _this.getErrors = function () { + return _this.errors; + }; // ============================= Child Component ============================= + + + _this.getMeta = function () { + // Make error & validating in cache to save perf + _this.prevValidating = _this.isFieldValidating(); + var meta = { + touched: _this.isFieldTouched(), + validating: _this.prevValidating, + errors: _this.errors, + name: _this.getNamePath() + }; + return meta; + }; // Only return validate child node. If invalidate, will do nothing about field. + + + _this.getOnlyChild = function (children) { + // Support render props + if (typeof children === 'function') { + var meta = _this.getMeta(); + + return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, _this.getOnlyChild(children(_this.getControlled(), meta, _this.context))), {}, { + isFunction: true + }); + } // Filed element only + + + var childList = Object(toArray["a" /* default */])(children); + + if (childList.length !== 1 || !react["isValidElement"](childList[0])) { + return { + child: childList, + isFunction: false + }; + } + + return { + child: childList[0], + isFunction: false + }; + }; // ============================== Field Control ============================== + + + _this.getValue = function (store) { + var getFieldsValue = _this.context.getFieldsValue; + + var namePath = _this.getNamePath(); + + return getValue(store || getFieldsValue(true), namePath); + }; + + _this.getControlled = function () { + var childProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var _this$props4 = _this.props, + trigger = _this$props4.trigger, + validateTrigger = _this$props4.validateTrigger, + getValueFromEvent = _this$props4.getValueFromEvent, + normalize = _this$props4.normalize, + valuePropName = _this$props4.valuePropName, + getValueProps = _this$props4.getValueProps; + var mergedValidateTrigger = validateTrigger !== undefined ? validateTrigger : _this.context.validateTrigger; + + var namePath = _this.getNamePath(); + + var _this$context = _this.context, + getInternalHooks = _this$context.getInternalHooks, + getFieldsValue = _this$context.getFieldsValue; + + var _getInternalHooks = getInternalHooks(FieldContext["a" /* HOOK_MARK */]), + dispatch = _getInternalHooks.dispatch; + + var value = _this.getValue(); + + var mergedGetValueProps = getValueProps || function (val) { + return Object(defineProperty["a" /* default */])({}, valuePropName, val); + }; // eslint-disable-next-line @typescript-eslint/no-explicit-any + + + var originTriggerFunc = childProps[trigger]; + + var control = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, childProps), mergedGetValueProps(value)); // Add trigger + + + control[trigger] = function () { + // Mark as touched + _this.touched = true; + _this.dirty = true; + var newValue; + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + if (getValueFromEvent) { + newValue = getValueFromEvent.apply(void 0, args); + } else { + newValue = defaultGetValueFromEvent.apply(void 0, [valuePropName].concat(args)); + } + + if (normalize) { + newValue = normalize(newValue, value, getFieldsValue(true)); + } + + dispatch({ + type: 'updateValue', + namePath: namePath, + value: newValue + }); + + if (originTriggerFunc) { + originTriggerFunc.apply(void 0, args); + } + }; // Add validateTrigger + + + var validateTriggerList = typeUtil_toArray(mergedValidateTrigger || []); + validateTriggerList.forEach(function (triggerName) { + // Wrap additional function of component, so that we can get latest value from store + var originTrigger = control[triggerName]; + + control[triggerName] = function () { + if (originTrigger) { + originTrigger.apply(void 0, arguments); + } // Always use latest rules + + + var rules = _this.props.rules; + + if (rules && rules.length) { + // We dispatch validate to root, + // since it will update related data with other field with same name + dispatch({ + type: 'validateField', + namePath: namePath, + triggerName: triggerName + }); + } + }; + }); + return control; + }; + + return _this; + } // ============================== Subscriptions ============================== + + + Object(createClass["a" /* default */])(Field, [{ + key: "componentDidMount", + value: function componentDidMount() { + var shouldUpdate = this.props.shouldUpdate; + var getInternalHooks = this.context.getInternalHooks; + + var _getInternalHooks2 = getInternalHooks(FieldContext["a" /* HOOK_MARK */]), + registerField = _getInternalHooks2.registerField; + + this.cancelRegisterFunc = registerField(this); // One more render for component in case fields not ready + + if (shouldUpdate === true) { + this.reRender(); + } + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + this.cancelRegister(); + this.destroy = true; + } + }, { + key: "reRender", + value: function reRender() { + if (this.destroy) return; + this.forceUpdate(); + } + }, { + key: "render", + value: function render() { + var resetCount = this.state.resetCount; + var children = this.props.children; + + var _this$getOnlyChild = this.getOnlyChild(children), + child = _this$getOnlyChild.child, + isFunction = _this$getOnlyChild.isFunction; // Not need to `cloneElement` since user can handle this in render function self + + + var returnChildNode; + + if (isFunction) { + returnChildNode = child; + } else if (react["isValidElement"](child)) { + returnChildNode = react["cloneElement"](child, this.getControlled(child.props)); + } else { + Object(warning["a" /* default */])(!child, '`children` of Field is not validate ReactElement.'); + returnChildNode = child; + } + + return react["createElement"](react["Fragment"], { + key: resetCount + }, returnChildNode); + } + }]); + + return Field; +}(react["Component"]); + +Field_Field.contextType = FieldContext["b" /* default */]; +Field_Field.defaultProps = { + trigger: 'onChange', + valuePropName: 'value' +}; + +var Field_WrapperField = function WrapperField(_ref4) { + var name = _ref4.name, + restProps = Object(objectWithoutProperties["a" /* default */])(_ref4, ["name"]); + + var namePath = name !== undefined ? getNamePath(name) : undefined; + var key = 'keep'; + + if (!restProps.isListField) { + key = "_".concat((namePath || []).join('_')); + } + + if (false) {} + + return react["createElement"](Field_Field, Object.assign({ + key: key, + name: namePath + }, restProps)); +}; + +/* harmony default export */ var es_Field = (Field_WrapperField); +// CONCATENATED MODULE: ./node_modules/rc-field-form/es/List.js + + + + + + + + +var List_List = function List(_ref) { + var name = _ref.name, + children = _ref.children; + var context = react["useContext"](FieldContext["b" /* default */]); + var keyRef = react["useRef"]({ + keys: [], + id: 0 + }); + var keyManager = keyRef.current; // User should not pass `children` as other type. + + if (typeof children !== 'function') { + Object(warning["a" /* default */])(false, 'Form.List only accepts function as children.'); + return null; + } + + var parentPrefixName = getNamePath(context.prefixName) || []; + var prefixName = [].concat(Object(toConsumableArray["a" /* default */])(parentPrefixName), Object(toConsumableArray["a" /* default */])(getNamePath(name))); + + var shouldUpdate = function shouldUpdate(prevValue, nextValue, _ref2) { + var source = _ref2.source; + + if (source === 'internal') { + return false; + } + + return prevValue !== nextValue; + }; + + return react["createElement"](FieldContext["b" /* default */].Provider, { + value: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, context), {}, { + prefixName: prefixName + }) + }, react["createElement"](es_Field, { + name: [], + shouldUpdate: shouldUpdate + }, function (_ref3) { + var _ref3$value = _ref3.value, + value = _ref3$value === void 0 ? [] : _ref3$value, + onChange = _ref3.onChange; + var getFieldValue = context.getFieldValue; + + var getNewValue = function getNewValue() { + var values = getFieldValue(prefixName || []); + return values || []; + }; + /** + * Always get latest value in case user update fields by `form` api. + */ + + + var operations = { + add: function add(defaultValue, index) { + // Mapping keys + var newValue = getNewValue(); + + if (index >= 0 && index <= newValue.length) { + keyManager.keys = [].concat(Object(toConsumableArray["a" /* default */])(keyManager.keys.slice(0, index)), [keyManager.id], Object(toConsumableArray["a" /* default */])(keyManager.keys.slice(index))); + onChange([].concat(Object(toConsumableArray["a" /* default */])(newValue.slice(0, index)), [defaultValue], Object(toConsumableArray["a" /* default */])(newValue.slice(index)))); + } else { + if (false) {} + + keyManager.keys = [].concat(Object(toConsumableArray["a" /* default */])(keyManager.keys), [keyManager.id]); + onChange([].concat(Object(toConsumableArray["a" /* default */])(newValue), [defaultValue])); + } + + keyManager.id += 1; + }, + remove: function remove(index) { + var newValue = getNewValue(); + var indexSet = new Set(Array.isArray(index) ? index : [index]); + + if (indexSet.size <= 0) { + return; + } + + keyManager.keys = keyManager.keys.filter(function (_, keysIndex) { + return !indexSet.has(keysIndex); + }); // Trigger store change + + onChange(newValue.filter(function (_, valueIndex) { + return !indexSet.has(valueIndex); + })); + }, + move: function move(from, to) { + if (from === to) { + return; + } + + var newValue = getNewValue(); // Do not handle out of range + + if (from < 0 || from >= newValue.length || to < 0 || to >= newValue.length) { + return; + } + + keyManager.keys = valueUtil_move(keyManager.keys, from, to); // Trigger store change + + onChange(valueUtil_move(newValue, from, to)); + } + }; + var listValue = value || []; + + if (!Array.isArray(listValue)) { + listValue = []; + + if (false) {} + } + + return children(listValue.map(function (__, index) { + var key = keyManager.keys[index]; + + if (key === undefined) { + keyManager.keys[index] = keyManager.id; + key = keyManager.keys[index]; + keyManager.id += 1; + } + + return { + name: index, + key: key, + isListField: true + }; + }), operations); + })); +}; + +/* harmony default export */ var es_List = (List_List); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules +var slicedToArray = __webpack_require__("ODXe"); + +// CONCATENATED MODULE: ./node_modules/rc-field-form/es/utils/asyncUtil.js +function allPromiseFinish(promiseList) { + var hasError = false; + var count = promiseList.length; + var results = []; + + if (!promiseList.length) { + return Promise.resolve([]); + } + + return new Promise(function (resolve, reject) { + promiseList.forEach(function (promise, index) { + promise.catch(function (e) { + hasError = true; + return e; + }).then(function (result) { + count -= 1; + results[index] = result; + + if (count > 0) { + return; + } + + if (hasError) { + reject(results); + } + + resolve(results); + }); + }); + }); +} +// CONCATENATED MODULE: ./node_modules/rc-field-form/es/utils/NameMap.js + + + +/** + * NameMap like a `Map` but accepts `string[]` as key. + */ + +var NameMap_NameMap = /*#__PURE__*/function () { + function NameMap() { + Object(classCallCheck["a" /* default */])(this, NameMap); + + this.list = []; + } + + Object(createClass["a" /* default */])(NameMap, [{ + key: "set", + value: function set(key, value) { + var index = this.list.findIndex(function (item) { + return matchNamePath(item.key, key); + }); + + if (index !== -1) { + this.list[index].value = value; + } else { + this.list.push({ + key: key, + value: value + }); + } + } + }, { + key: "get", + value: function get(key) { + var result = this.list.find(function (item) { + return matchNamePath(item.key, key); + }); + return result && result.value; + } + }, { + key: "update", + value: function update(key, updater) { + var origin = this.get(key); + var next = updater(origin); + + if (!next) { + this.delete(key); + } else { + this.set(key, next); + } + } + }, { + key: "delete", + value: function _delete(key) { + this.list = this.list.filter(function (item) { + return !matchNamePath(item.key, key); + }); + } + }, { + key: "map", + value: function map(callback) { + return this.list.map(callback); + } + }, { + key: "toJSON", + value: function toJSON() { + var json = {}; + this.map(function (_ref) { + var key = _ref.key, + value = _ref.value; + json[key.join('.')] = value; + return null; + }); + return json; + } + }]); + + return NameMap; +}(); + +/* harmony default export */ var utils_NameMap = (NameMap_NameMap); +// CONCATENATED MODULE: ./node_modules/rc-field-form/es/useForm.js + + + + + + + + + + + + +var useForm_FormStore = function FormStore(forceRootUpdate) { + var _this = this; + + Object(classCallCheck["a" /* default */])(this, FormStore); + + this.formHooked = false; + this.subscribable = true; + this.store = {}; + this.fieldEntities = []; + this.initialValues = {}; + this.callbacks = {}; + this.validateMessages = null; + this.preserve = null; + this.lastValidatePromise = null; + + this.getForm = function () { + return { + getFieldValue: _this.getFieldValue, + getFieldsValue: _this.getFieldsValue, + getFieldError: _this.getFieldError, + getFieldsError: _this.getFieldsError, + isFieldsTouched: _this.isFieldsTouched, + isFieldTouched: _this.isFieldTouched, + isFieldValidating: _this.isFieldValidating, + isFieldsValidating: _this.isFieldsValidating, + resetFields: _this.resetFields, + setFields: _this.setFields, + setFieldsValue: _this.setFieldsValue, + validateFields: _this.validateFields, + submit: _this.submit, + getInternalHooks: _this.getInternalHooks + }; + }; // ======================== Internal Hooks ======================== + + + this.getInternalHooks = function (key) { + if (key === FieldContext["a" /* HOOK_MARK */]) { + _this.formHooked = true; + return { + dispatch: _this.dispatch, + registerField: _this.registerField, + useSubscribe: _this.useSubscribe, + setInitialValues: _this.setInitialValues, + setCallbacks: _this.setCallbacks, + setValidateMessages: _this.setValidateMessages, + getFields: _this.getFields, + setPreserve: _this.setPreserve + }; + } + + Object(warning["a" /* default */])(false, '`getInternalHooks` is internal usage. Should not call directly.'); + return null; + }; + + this.useSubscribe = function (subscribable) { + _this.subscribable = subscribable; + }; + /** + * First time `setInitialValues` should update store with initial value + */ + + + this.setInitialValues = function (initialValues, init) { + _this.initialValues = initialValues || {}; + + if (init) { + _this.store = setValues({}, initialValues, _this.store); + } + }; + + this.getInitialValue = function (namePath) { + return getValue(_this.initialValues, namePath); + }; + + this.setCallbacks = function (callbacks) { + _this.callbacks = callbacks; + }; + + this.setValidateMessages = function (validateMessages) { + _this.validateMessages = validateMessages; + }; + + this.setPreserve = function (preserve) { + _this.preserve = preserve; + }; // ========================== Dev Warning ========================= + + + this.timeoutId = null; + + this.warningUnhooked = function () { + if (false) {} + }; // ============================ Fields ============================ + + /** + * Get registered field entities. + * @param pure Only return field which has a `name`. Default: false + */ + + + this.getFieldEntities = function () { + var pure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + if (!pure) { + return _this.fieldEntities; + } + + return _this.fieldEntities.filter(function (field) { + return field.getNamePath().length; + }); + }; + + this.getFieldsMap = function () { + var pure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var cache = new utils_NameMap(); + + _this.getFieldEntities(pure).forEach(function (field) { + var namePath = field.getNamePath(); + cache.set(namePath, field); + }); + + return cache; + }; + + this.getFieldEntitiesForNamePathList = function (nameList) { + if (!nameList) { + return _this.getFieldEntities(true); + } + + var cache = _this.getFieldsMap(true); + + return nameList.map(function (name) { + var namePath = getNamePath(name); + return cache.get(namePath) || { + INVALIDATE_NAME_PATH: getNamePath(name) + }; + }); + }; + + this.getFieldsValue = function (nameList, filterFunc) { + _this.warningUnhooked(); + + if (nameList === true && !filterFunc) { + return _this.store; + } + + var fieldEntities = _this.getFieldEntitiesForNamePathList(Array.isArray(nameList) ? nameList : null); + + var filteredNameList = []; + fieldEntities.forEach(function (entity) { + var namePath = 'INVALIDATE_NAME_PATH' in entity ? entity.INVALIDATE_NAME_PATH : entity.getNamePath(); + + if (!filterFunc) { + filteredNameList.push(namePath); + } else { + var meta = 'getMeta' in entity ? entity.getMeta() : null; + + if (filterFunc(meta)) { + filteredNameList.push(namePath); + } + } + }); + return cloneByNamePathList(_this.store, filteredNameList.map(getNamePath)); + }; + + this.getFieldValue = function (name) { + _this.warningUnhooked(); + + var namePath = getNamePath(name); + return getValue(_this.store, namePath); + }; + + this.getFieldsError = function (nameList) { + _this.warningUnhooked(); + + var fieldEntities = _this.getFieldEntitiesForNamePathList(nameList); + + return fieldEntities.map(function (entity, index) { + if (entity && !('INVALIDATE_NAME_PATH' in entity)) { + return { + name: entity.getNamePath(), + errors: entity.getErrors() + }; + } + + return { + name: getNamePath(nameList[index]), + errors: [] + }; + }); + }; + + this.getFieldError = function (name) { + _this.warningUnhooked(); + + var namePath = getNamePath(name); + + var fieldError = _this.getFieldsError([namePath])[0]; + + return fieldError.errors; + }; + + this.isFieldsTouched = function () { + _this.warningUnhooked(); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + var arg0 = args[0], + arg1 = args[1]; + var namePathList; + var isAllFieldsTouched = false; + + if (args.length === 0) { + namePathList = null; + } else if (args.length === 1) { + if (Array.isArray(arg0)) { + namePathList = arg0.map(getNamePath); + isAllFieldsTouched = false; + } else { + namePathList = null; + isAllFieldsTouched = arg0; + } + } else { + namePathList = arg0.map(getNamePath); + isAllFieldsTouched = arg1; + } + + var testTouched = function testTouched(field) { + // Not provide `nameList` will check all the fields + if (!namePathList) { + return field.isFieldTouched(); + } + + var fieldNamePath = field.getNamePath(); + + if (containsNamePath(namePathList, fieldNamePath)) { + return field.isFieldTouched(); + } + + return isAllFieldsTouched; + }; + + return isAllFieldsTouched ? _this.getFieldEntities(true).every(testTouched) : _this.getFieldEntities(true).some(testTouched); + }; + + this.isFieldTouched = function (name) { + _this.warningUnhooked(); + + return _this.isFieldsTouched([name]); + }; + + this.isFieldsValidating = function (nameList) { + _this.warningUnhooked(); + + var fieldEntities = _this.getFieldEntities(); + + if (!nameList) { + return fieldEntities.some(function (testField) { + return testField.isFieldValidating(); + }); + } + + var namePathList = nameList.map(getNamePath); + return fieldEntities.some(function (testField) { + var fieldNamePath = testField.getNamePath(); + return containsNamePath(namePathList, fieldNamePath) && testField.isFieldValidating(); + }); + }; + + this.isFieldValidating = function (name) { + _this.warningUnhooked(); + + return _this.isFieldsValidating([name]); + }; + /** + * Reset Field with field `initialValue` prop. + * Can pass `entities` or `namePathList` or just nothing. + */ + + + this.resetWithFieldInitialValue = function () { + var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + // Create cache + var cache = new utils_NameMap(); + + var fieldEntities = _this.getFieldEntities(true); + + fieldEntities.forEach(function (field) { + var initialValue = field.props.initialValue; + var namePath = field.getNamePath(); // Record only if has `initialValue` + + if (initialValue !== undefined) { + var records = cache.get(namePath) || new Set(); + records.add({ + entity: field, + value: initialValue + }); + cache.set(namePath, records); + } + }); // Reset + + var resetWithFields = function resetWithFields(entities) { + entities.forEach(function (field) { + var initialValue = field.props.initialValue; + + if (initialValue !== undefined) { + var namePath = field.getNamePath(); + + var formInitialValue = _this.getInitialValue(namePath); + + if (formInitialValue !== undefined) { + // Warning if conflict with form initialValues and do not modify value + Object(warning["a" /* default */])(false, "Form already set 'initialValues' with path '".concat(namePath.join('.'), "'. Field can not overwrite it.")); + } else { + var records = cache.get(namePath); + + if (records && records.size > 1) { + // Warning if multiple field set `initialValue`and do not modify value + Object(warning["a" /* default */])(false, "Multiple Field with path '".concat(namePath.join('.'), "' set 'initialValue'. Can not decide which one to pick.")); + } else if (records) { + var originValue = _this.getFieldValue(namePath); // Set `initialValue` + + + if (!info.skipExist || originValue === undefined) { + _this.store = setValue(_this.store, namePath, Object(toConsumableArray["a" /* default */])(records)[0].value); + } + } + } + } + }); + }; + + var requiredFieldEntities; + + if (info.entities) { + requiredFieldEntities = info.entities; + } else if (info.namePathList) { + requiredFieldEntities = []; + info.namePathList.forEach(function (namePath) { + var records = cache.get(namePath); + + if (records) { + var _requiredFieldEntitie; + + (_requiredFieldEntitie = requiredFieldEntities).push.apply(_requiredFieldEntitie, Object(toConsumableArray["a" /* default */])(Object(toConsumableArray["a" /* default */])(records).map(function (r) { + return r.entity; + }))); + } + }); + } else { + requiredFieldEntities = fieldEntities; + } + + resetWithFields(requiredFieldEntities); + }; + + this.resetFields = function (nameList) { + _this.warningUnhooked(); + + var prevStore = _this.store; + + if (!nameList) { + _this.store = setValues({}, _this.initialValues); + + _this.resetWithFieldInitialValue(); + + _this.notifyObservers(prevStore, null, { + type: 'reset' + }); + + return; + } // Reset by `nameList` + + + var namePathList = nameList.map(getNamePath); + namePathList.forEach(function (namePath) { + var initialValue = _this.getInitialValue(namePath); + + _this.store = setValue(_this.store, namePath, initialValue); + }); + + _this.resetWithFieldInitialValue({ + namePathList: namePathList + }); + + _this.notifyObservers(prevStore, namePathList, { + type: 'reset' + }); + }; + + this.setFields = function (fields) { + _this.warningUnhooked(); + + var prevStore = _this.store; + fields.forEach(function (fieldData) { + var name = fieldData.name, + errors = fieldData.errors, + data = Object(objectWithoutProperties["a" /* default */])(fieldData, ["name", "errors"]); + + var namePath = getNamePath(name); // Value + + if ('value' in data) { + _this.store = setValue(_this.store, namePath, data.value); + } + + _this.notifyObservers(prevStore, [namePath], { + type: 'setField', + data: fieldData + }); + }); + }; + + this.getFields = function () { + var entities = _this.getFieldEntities(true); + + var fields = entities.map(function (field) { + var namePath = field.getNamePath(); + var meta = field.getMeta(); + + var fieldData = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, meta), {}, { + name: namePath, + value: _this.getFieldValue(namePath) + }); + + Object.defineProperty(fieldData, 'originRCField', { + value: true + }); + return fieldData; + }); + return fields; + }; // =========================== Observer =========================== + + + this.registerField = function (entity) { + _this.fieldEntities.push(entity); // Set initial values + + + if (entity.props.initialValue !== undefined) { + var prevStore = _this.store; + + _this.resetWithFieldInitialValue({ + entities: [entity], + skipExist: true + }); + + _this.notifyObservers(prevStore, [entity.getNamePath()], { + type: 'valueUpdate', + source: 'internal' + }); + } // un-register field callback + + + return function (isListField, preserve) { + _this.fieldEntities = _this.fieldEntities.filter(function (item) { + return item !== entity; + }); // Clean up store value if preserve + + var mergedPreserve = preserve !== undefined ? preserve : _this.preserve; + + if (mergedPreserve === false && !isListField) { + var namePath = entity.getNamePath(); + + if (_this.getFieldValue(namePath) !== undefined) { + _this.store = setValue(_this.store, namePath, undefined); + } + } + }; + }; + + this.dispatch = function (action) { + switch (action.type) { + case 'updateValue': + { + var namePath = action.namePath, + value = action.value; + + _this.updateValue(namePath, value); + + break; + } + + case 'validateField': + { + var _namePath = action.namePath, + triggerName = action.triggerName; + + _this.validateFields([_namePath], { + triggerName: triggerName + }); + + break; + } + + default: // Currently we don't have other action. Do nothing. + + } + }; + + this.notifyObservers = function (prevStore, namePathList, info) { + if (_this.subscribable) { + var mergedInfo = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, info), {}, { + store: _this.getFieldsValue(true) + }); + + _this.getFieldEntities().forEach(function (_ref) { + var onStoreChange = _ref.onStoreChange; + onStoreChange(prevStore, namePathList, mergedInfo); + }); + } else { + _this.forceRootUpdate(); + } + }; + + this.updateValue = function (name, value) { + var namePath = getNamePath(name); + var prevStore = _this.store; + _this.store = setValue(_this.store, namePath, value); + + _this.notifyObservers(prevStore, [namePath], { + type: 'valueUpdate', + source: 'internal' + }); // Notify dependencies children with parent update + + + var childrenFields = _this.getDependencyChildrenFields(namePath); + + _this.validateFields(childrenFields); + + _this.notifyObservers(prevStore, childrenFields, { + type: 'dependenciesUpdate', + relatedFields: [namePath].concat(Object(toConsumableArray["a" /* default */])(childrenFields)) + }); // trigger callback function + + + var onValuesChange = _this.callbacks.onValuesChange; + + if (onValuesChange) { + var changedValues = cloneByNamePathList(_this.store, [namePath]); + onValuesChange(changedValues, _this.store); + } + + _this.triggerOnFieldsChange([namePath].concat(Object(toConsumableArray["a" /* default */])(childrenFields))); + }; // Let all child Field get update. + + + this.setFieldsValue = function (store) { + _this.warningUnhooked(); + + var prevStore = _this.store; + + if (store) { + _this.store = setValues(_this.store, store); + } + + _this.notifyObservers(prevStore, null, { + type: 'valueUpdate', + source: 'external' + }); + }; + + this.getDependencyChildrenFields = function (rootNamePath) { + var children = new Set(); + var childrenFields = []; + var dependencies2fields = new utils_NameMap(); + /** + * Generate maps + * Can use cache to save perf if user report performance issue with this + */ + + _this.getFieldEntities().forEach(function (field) { + var dependencies = field.props.dependencies; + (dependencies || []).forEach(function (dependency) { + var dependencyNamePath = getNamePath(dependency); + dependencies2fields.update(dependencyNamePath, function () { + var fields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Set(); + fields.add(field); + return fields; + }); + }); + }); + + var fillChildren = function fillChildren(namePath) { + var fields = dependencies2fields.get(namePath) || new Set(); + fields.forEach(function (field) { + if (!children.has(field)) { + children.add(field); + var fieldNamePath = field.getNamePath(); + + if (field.isFieldDirty() && fieldNamePath.length) { + childrenFields.push(fieldNamePath); + fillChildren(fieldNamePath); + } + } + }); + }; + + fillChildren(rootNamePath); + return childrenFields; + }; + + this.triggerOnFieldsChange = function (namePathList, filedErrors) { + var onFieldsChange = _this.callbacks.onFieldsChange; + + if (onFieldsChange) { + var fields = _this.getFields(); + /** + * Fill errors since `fields` may be replaced by controlled fields + */ + + + if (filedErrors) { + var cache = new utils_NameMap(); + filedErrors.forEach(function (_ref2) { + var name = _ref2.name, + errors = _ref2.errors; + cache.set(name, errors); + }); + fields.forEach(function (field) { + // eslint-disable-next-line no-param-reassign + field.errors = cache.get(field.name) || field.errors; + }); + } + + var changedFields = fields.filter(function (_ref3) { + var fieldName = _ref3.name; + return containsNamePath(namePathList, fieldName); + }); + onFieldsChange(changedFields, fields); + } + }; // =========================== Validate =========================== + + + this.validateFields = function (nameList, options) { + _this.warningUnhooked(); + + var provideNameList = !!nameList; + var namePathList = provideNameList ? nameList.map(getNamePath) : []; // Collect result in promise list + + var promiseList = []; + + _this.getFieldEntities(true).forEach(function (field) { + // Add field if not provide `nameList` + if (!provideNameList) { + namePathList.push(field.getNamePath()); + } // Skip if without rule + + + if (!field.props.rules || !field.props.rules.length) { + return; + } + + var fieldNamePath = field.getNamePath(); // Add field validate rule in to promise list + + if (!provideNameList || containsNamePath(namePathList, fieldNamePath)) { + var promise = field.validateRules(Object(objectSpread2["a" /* default */])({ + validateMessages: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultValidateMessages), _this.validateMessages) + }, options)); // Wrap promise with field + + promiseList.push(promise.then(function () { + return { + name: fieldNamePath, + errors: [] + }; + }).catch(function (errors) { + return Promise.reject({ + name: fieldNamePath, + errors: errors + }); + })); + } + }); + + var summaryPromise = allPromiseFinish(promiseList); + _this.lastValidatePromise = summaryPromise; // Notify fields with rule that validate has finished and need update + + summaryPromise.catch(function (results) { + return results; + }).then(function (results) { + var resultNamePathList = results.map(function (_ref4) { + var name = _ref4.name; + return name; + }); + + _this.notifyObservers(_this.store, resultNamePathList, { + type: 'validateFinish' + }); + + _this.triggerOnFieldsChange(resultNamePathList, results); + }); + var returnPromise = summaryPromise.then(function () { + if (_this.lastValidatePromise === summaryPromise) { + return Promise.resolve(_this.getFieldsValue(namePathList)); + } + + return Promise.reject([]); + }).catch(function (results) { + var errorList = results.filter(function (result) { + return result && result.errors.length; + }); + return Promise.reject({ + values: _this.getFieldsValue(namePathList), + errorFields: errorList, + outOfDate: _this.lastValidatePromise !== summaryPromise + }); + }); // Do not throw in console + + returnPromise.catch(function (e) { + return e; + }); + return returnPromise; + }; // ============================ Submit ============================ + + + this.submit = function () { + _this.warningUnhooked(); + + _this.validateFields().then(function (values) { + var onFinish = _this.callbacks.onFinish; + + if (onFinish) { + try { + onFinish(values); + } catch (err) { + // Should print error if user `onFinish` callback failed + console.error(err); + } + } + }).catch(function (e) { + var onFinishFailed = _this.callbacks.onFinishFailed; + + if (onFinishFailed) { + onFinishFailed(e); + } + }); + }; + + this.forceRootUpdate = forceRootUpdate; +}; + +function useForm(form) { + var formRef = react["useRef"](); + + var _React$useState = react["useState"](), + _React$useState2 = Object(slicedToArray["a" /* default */])(_React$useState, 2), + forceUpdate = _React$useState2[1]; + + if (!formRef.current) { + if (form) { + formRef.current = form; + } else { + // Create a new FormStore if not provided + var forceReRender = function forceReRender() { + forceUpdate({}); + }; + + var formStore = new useForm_FormStore(forceReRender); + formRef.current = formStore.getForm(); + } + } + + return [formRef.current]; +} + +/* harmony default export */ var es_useForm = (useForm); +// CONCATENATED MODULE: ./node_modules/rc-field-form/es/FormContext.js + + + +var FormContext = react["createContext"]({ + triggerFormChange: function triggerFormChange() {}, + triggerFormFinish: function triggerFormFinish() {}, + registerForm: function registerForm() {}, + unregisterForm: function unregisterForm() {} +}); + +var FormContext_FormProvider = function FormProvider(_ref) { + var validateMessages = _ref.validateMessages, + onFormChange = _ref.onFormChange, + onFormFinish = _ref.onFormFinish, + children = _ref.children; + var formContext = react["useContext"](FormContext); + var formsRef = react["useRef"]({}); + return react["createElement"](FormContext.Provider, { + value: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, formContext), {}, { + validateMessages: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, formContext.validateMessages), validateMessages), + // ========================================================= + // = Global Form Control = + // ========================================================= + triggerFormChange: function triggerFormChange(name, changedFields) { + if (onFormChange) { + onFormChange(name, { + changedFields: changedFields, + forms: formsRef.current + }); + } + + formContext.triggerFormChange(name, changedFields); + }, + triggerFormFinish: function triggerFormFinish(name, values) { + if (onFormFinish) { + onFormFinish(name, { + values: values, + forms: formsRef.current + }); + } + + formContext.triggerFormFinish(name, values); + }, + registerForm: function registerForm(name, form) { + if (name) { + formsRef.current = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, formsRef.current), {}, Object(defineProperty["a" /* default */])({}, name, form)); + } + + formContext.registerForm(name, form); + }, + unregisterForm: function unregisterForm(name) { + var newForms = Object(objectSpread2["a" /* default */])({}, formsRef.current); + + delete newForms[name]; + formsRef.current = newForms; + formContext.unregisterForm(name); + } + }) + }, children); +}; + + +/* harmony default export */ var es_FormContext = (FormContext); +// CONCATENATED MODULE: ./node_modules/rc-field-form/es/Form.js + + + + + + + + + +var Form_Form = function Form(_ref, ref) { + var name = _ref.name, + initialValues = _ref.initialValues, + fields = _ref.fields, + form = _ref.form, + preserve = _ref.preserve, + children = _ref.children, + _ref$component = _ref.component, + Component = _ref$component === void 0 ? 'form' : _ref$component, + validateMessages = _ref.validateMessages, + _ref$validateTrigger = _ref.validateTrigger, + validateTrigger = _ref$validateTrigger === void 0 ? 'onChange' : _ref$validateTrigger, + onValuesChange = _ref.onValuesChange, + _onFieldsChange = _ref.onFieldsChange, + _onFinish = _ref.onFinish, + onFinishFailed = _ref.onFinishFailed, + restProps = Object(objectWithoutProperties["a" /* default */])(_ref, ["name", "initialValues", "fields", "form", "preserve", "children", "component", "validateMessages", "validateTrigger", "onValuesChange", "onFieldsChange", "onFinish", "onFinishFailed"]); + + var formContext = react["useContext"](es_FormContext); // We customize handle event since Context will makes all the consumer re-render: + // https://reactjs.org/docs/context.html#contextprovider + + var _useForm = es_useForm(form), + _useForm2 = Object(slicedToArray["a" /* default */])(_useForm, 1), + formInstance = _useForm2[0]; + + var _formInstance$getInte = formInstance.getInternalHooks(FieldContext["a" /* HOOK_MARK */]), + useSubscribe = _formInstance$getInte.useSubscribe, + setInitialValues = _formInstance$getInte.setInitialValues, + setCallbacks = _formInstance$getInte.setCallbacks, + setValidateMessages = _formInstance$getInte.setValidateMessages, + setPreserve = _formInstance$getInte.setPreserve; // Pass ref with form instance + + + react["useImperativeHandle"](ref, function () { + return formInstance; + }); // Register form into Context + + react["useEffect"](function () { + formContext.registerForm(name, formInstance); + return function () { + formContext.unregisterForm(name); + }; + }, [formContext, formInstance, name]); // Pass props to store + + setValidateMessages(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, formContext.validateMessages), validateMessages)); + setCallbacks({ + onValuesChange: onValuesChange, + onFieldsChange: function onFieldsChange(changedFields) { + formContext.triggerFormChange(name, changedFields); + + if (_onFieldsChange) { + for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + rest[_key - 1] = arguments[_key]; + } + + _onFieldsChange.apply(void 0, [changedFields].concat(rest)); + } + }, + onFinish: function onFinish(values) { + formContext.triggerFormFinish(name, values); + + if (_onFinish) { + _onFinish(values); + } + }, + onFinishFailed: onFinishFailed + }); + setPreserve(preserve); // Set initial value, init store value when first mount + + var mountRef = react["useRef"](null); + setInitialValues(initialValues, !mountRef.current); + + if (!mountRef.current) { + mountRef.current = true; + } // Prepare children by `children` type + + + var childrenNode = children; + var childrenRenderProps = typeof children === 'function'; + + if (childrenRenderProps) { + var values = formInstance.getFieldsValue(true); + childrenNode = children(values, formInstance); + } // Not use subscribe when using render props + + + useSubscribe(!childrenRenderProps); // Listen if fields provided. We use ref to save prev data here to avoid additional render + + var prevFieldsRef = react["useRef"](); + react["useEffect"](function () { + if (!isSimilar(prevFieldsRef.current || [], fields || [])) { + formInstance.setFields(fields || []); + } + + prevFieldsRef.current = fields; + }, [fields, formInstance]); + var formContextValue = react["useMemo"](function () { + return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, formInstance), {}, { + validateTrigger: validateTrigger + }); + }, [formInstance, validateTrigger]); + var wrapperNode = react["createElement"](FieldContext["b" /* default */].Provider, { + value: formContextValue + }, childrenNode); + + if (Component === false) { + return wrapperNode; + } + + return react["createElement"](Component, Object.assign({}, restProps, { + onSubmit: function onSubmit(event) { + event.preventDefault(); + event.stopPropagation(); + formInstance.submit(); + } + }), wrapperNode); +}; + +/* harmony default export */ var es_Form = (Form_Form); +// CONCATENATED MODULE: ./node_modules/rc-field-form/es/index.js + + + + + + +var InternalForm = react["forwardRef"](es_Form); +var RefForm = InternalForm; +RefForm.FormProvider = FormContext_FormProvider; +RefForm.Field = es_Field; +RefForm.List = es_List; +RefForm.useForm = es_useForm; + +/* harmony default export */ var es = __webpack_exports__["d"] = (RefForm); + +/***/ }), + +/***/ "8AyJ": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/es.number.is-finite.js ***! + \*************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var numberIsFinite = __webpack_require__(/*! ../internals/number-is-finite */ "4oU/"); + +// `Number.isFinite` method +// https://tc39.github.io/ecma262/#sec-number.isfinite +$({ target: 'Number', stat: true }, { isFinite: numberIsFinite }); + + +/***/ }), + +/***/ "8GlL": +/*!******************************************************************!*\ + !*** ./node_modules/core-js/internals/new-promise-capability.js ***! + \******************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM"); + +var PromiseCapability = function (C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +}; + +// 25.4.1.5 NewPromiseCapability(C) +module.exports.f = function (C) { + return new PromiseCapability(C); +}; + + +/***/ }), + +/***/ "8HVG": +/*!************************************************************!*\ + !*** ./node_modules/rc-notification/es/useNotification.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 useNotification; }); +/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "KQm4"); +/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "ODXe"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _Notice__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Notice */ "EE3K"); + + + + +function useNotification(notificationInstance) { + var createdRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"]({}); + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"]([]), + _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_React$useState, 2), + elements = _React$useState2[0], + setElements = _React$useState2[1]; + + function notify(noticeProps) { + notificationInstance.add(noticeProps, function (div, props) { + var key = props.key; + + if (div && !createdRef.current[key]) { + var noticeEle = react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Notice__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], Object.assign({}, props, { + holder: div + })); + createdRef.current[key] = noticeEle; + setElements(function (originElements) { + return [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(originElements), [noticeEle]); + }); + } + }); + } + + return [notify, react__WEBPACK_IMPORTED_MODULE_2__["createElement"](react__WEBPACK_IMPORTED_MODULE_2__["Fragment"], null, elements)]; +} + +/***/ }), + +/***/ "8KD2": +/*!**********************************************************************!*\ + !*** ./node_modules/@ant-design/icons/lib/icons/InfoCircleFilled.js ***! + \**********************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt"); +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9")); +var React = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI")); +var _InfoCircleFilled = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons-svg/lib/asn/InfoCircleFilled */ "nFTT")); +var _AntdIcon = _interopRequireDefault(__webpack_require__(/*! ../components/AntdIcon */ "KQxl")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +// GENERATE BY ./scripts/generate.ts +// DON NOT EDIT IT MANUALLY + +var InfoCircleFilled = function InfoCircleFilled(props, ref) { + return /*#__PURE__*/React.createElement(_AntdIcon.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, { + ref: ref, + icon: _InfoCircleFilled.default + })); +}; +var RefIcon = /*#__PURE__*/React.forwardRef(InfoCircleFilled); +if (false) {} +var _default = exports.default = RefIcon; + +/***/ }), + +/***/ "8OQS": +/*!*****************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + return target; +} +module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "8STE": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.weak-set.delete-all.js ***! + \********************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR"); +var collectionDeleteAll = __webpack_require__(/*! ../internals/collection-delete-all */ "Cg3G"); + +// `WeakSet.prototype.deleteAll` method +// https://github.com/tc39/proposal-collection-methods +$({ target: 'WeakSet', proto: true, real: true, forced: IS_PURE }, { + deleteAll: function deleteAll(/* ...elements */) { + return collectionDeleteAll.apply(this, arguments); + } +}); + + +/***/ }), + +/***/ "8YOa": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/internals/internal-metadata.js ***! + \*************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "0BK2"); +var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v"); +var has = __webpack_require__(/*! ../internals/has */ "UTVS"); +var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "m/L8").f; +var uid = __webpack_require__(/*! ../internals/uid */ "kOOl"); +var FREEZING = __webpack_require__(/*! ../internals/freezing */ "uy83"); + +var METADATA = uid('meta'); +var id = 0; + +var isExtensible = Object.isExtensible || function () { + return true; +}; + +var setMetadata = function (it) { + defineProperty(it, METADATA, { value: { + objectID: 'O' + ++id, // object ID + weakData: {} // weak collections IDs + } }); +}; + +var fastKey = function (it, create) { + // return a primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, METADATA)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMetadata(it); + // return object ID + } return it[METADATA].objectID; +}; + +var getWeakData = function (it, create) { + if (!has(it, METADATA)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMetadata(it); + // return the store of weak collections IDs + } return it[METADATA].weakData; +}; + +// add metadata on freeze-family methods calling +var onFreeze = function (it) { + if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it); + return it; +}; + +var meta = module.exports = { + REQUIRED: false, + fastKey: fastKey, + getWeakData: getWeakData, + onFreeze: onFreeze +}; + +hiddenKeys[METADATA] = true; + + +/***/ }), + +/***/ "8go2": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.promise.all-settled.js ***! + \********************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +// TODO: Remove from `core-js@4` +__webpack_require__(/*! ./es.promise.all-settled.js */ "gg6r"); + + +/***/ }), + +/***/ "8jRI": +/*!****************************************************!*\ + !*** ./node_modules/decode-uri-component/index.js ***! + \****************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var token = '%[a-f0-9]{2}'; +var singleMatcher = new RegExp('(' + token + ')|([^%]+?)', 'gi'); +var multiMatcher = new RegExp('(' + token + ')+', 'gi'); + +function decodeComponents(components, split) { + try { + // Try to decode the entire string first + return [decodeURIComponent(components.join(''))]; + } catch (err) { + // Do nothing + } + + if (components.length === 1) { + return components; + } + + split = split || 1; + + // Split the array in 2 parts + var left = components.slice(0, split); + var right = components.slice(split); + + return Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right)); +} + +function decode(input) { + try { + return decodeURIComponent(input); + } catch (err) { + var tokens = input.match(singleMatcher) || []; + + for (var i = 1; i < tokens.length; i++) { + input = decodeComponents(tokens, i).join(''); + + tokens = input.match(singleMatcher) || []; + } + + return input; + } +} + +function customDecodeURIComponent(input) { + // Keep track of all the replacements and prefill the map with the `BOM` + var replaceMap = { + '%FE%FF': '\uFFFD\uFFFD', + '%FF%FE': '\uFFFD\uFFFD' + }; + + var match = multiMatcher.exec(input); + while (match) { + try { + // Decode as big chunks as possible + replaceMap[match[0]] = decodeURIComponent(match[0]); + } catch (err) { + var result = decode(match[0]); + + if (result !== match[0]) { + replaceMap[match[0]] = result; + } + } + + match = multiMatcher.exec(input); + } + + // Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else + replaceMap['%C2'] = '\uFFFD'; + + var entries = Object.keys(replaceMap); + + for (var i = 0; i < entries.length; i++) { + // Replace all decoded components + var key = entries[i]; + input = input.replace(new RegExp(key, 'g'), replaceMap[key]); + } + + return input; +} + +module.exports = function (encodedURI) { + if (typeof encodedURI !== 'string') { + throw new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`'); + } + + try { + encodedURI = encodedURI.replace(/\+/g, ' '); + + // Try the built in decoder first + return decodeURIComponent(encodedURI); + } catch (err) { + // Fallback to a more advanced decoder + return customDecodeURIComponent(encodedURI); + } +}; + + +/***/ }), + +/***/ "8r4s": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.set.of.js ***! + \*******************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var of = __webpack_require__(/*! ../internals/collection-of */ "P940"); + +// `Set.of` method +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of +$({ target: 'Set', stat: true }, { + of: of +}); + + +/***/ }), + +/***/ "8tx+": +/*!**************************************************************!*\ + !*** ./node_modules/rc-notification/es/index.js + 6 modules ***! + \**************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/css-animation/es/index.js because of ./node_modules/antd/es/badge/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js because of ./node_modules/rc-textarea/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js because of ./node_modules/rc-textarea/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./node_modules/rc-tooltip/es/Tooltip.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js because of ./src/pages/metting/information/detail.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js because of ./node_modules/rc-textarea/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js because of ./node_modules/rc-tooltip/es/Tooltip.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js because of ./src/pages/Competitions/components/ClaModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-notification/es/Notice.js because of ./src/pages/metting/information/detail.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-notification/es/useNotification.js because of ./src/pages/metting/information/detail.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/createChainedFunction.js because of ./node_modules/rc-tabs/node_modules/rc-menu/es/SubPopupMenu.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +var objectWithoutProperties = __webpack_require__("Ff2n"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js +var defineProperty = __webpack_require__("rePB"); + +// 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/possibleConstructorReturn.js +var possibleConstructorReturn = __webpack_require__("md7G"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +var getPrototypeOf = __webpack_require__("foSv"); + +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__("q1tI"); +var react_default = /*#__PURE__*/__webpack_require__.n(react); + +// EXTERNAL MODULE: ./node_modules/react-dom/index.js +var react_dom = __webpack_require__("i8i4"); +var react_dom_default = /*#__PURE__*/__webpack_require__.n(react_dom); + +// CONCATENATED MODULE: ./node_modules/rc-notification/node_modules/rc-animate/node_modules/rc-util/es/unsafeLifecyclesPolyfill.js + + +var unsafeLifecyclesPolyfill_unsafeLifecyclesPolyfill = function unsafeLifecyclesPolyfill(Component) { + var prototype = Component.prototype; + + if (!prototype || !prototype.isReactComponent) { + throw new Error('Can only polyfill class components'); + } // only handle componentWillReceiveProps + + + if (typeof prototype.componentWillReceiveProps !== 'function') { + return Component; + } // In React 16.9, React.Profiler was introduced together with UNSAFE_componentWillReceiveProps + // https://reactjs.org/blog/2019/08/08/react-v16.9.0.html#performance-measurements-with-reactprofiler + + + if (!react_default.a.Profiler) { + return Component; + } // Here polyfill get started + + + prototype.UNSAFE_componentWillReceiveProps = prototype.componentWillReceiveProps; + delete prototype.componentWillReceiveProps; + return Component; +}; + +/* harmony default export */ var es_unsafeLifecyclesPolyfill = (unsafeLifecyclesPolyfill_unsafeLifecyclesPolyfill); +// CONCATENATED MODULE: ./node_modules/rc-notification/node_modules/rc-animate/es/ChildrenUtils.js + + +function toArrayChildren(children) { + var ret = []; + react_default.a.Children.forEach(children, function (child) { + ret.push(child); + }); + return ret; +} + +function findChildInChildrenByKey(children, key) { + var ret = null; + if (children) { + children.forEach(function (child) { + if (ret) { + return; + } + if (child && child.key === key) { + ret = child; + } + }); + } + return ret; +} + +function findShownChildInChildrenByKey(children, key, showProp) { + var ret = null; + if (children) { + children.forEach(function (child) { + if (child && child.key === key && child.props[showProp]) { + if (ret) { + throw new Error('two child with same key for children'); + } + ret = child; + } + }); + } + return ret; +} + +function findHiddenChildInChildrenByKey(children, key, showProp) { + var found = 0; + if (children) { + children.forEach(function (child) { + if (found) { + return; + } + found = child && child.key === key && !child.props[showProp]; + }); + } + return found; +} + +function isSameChildren(c1, c2, showProp) { + var same = c1.length === c2.length; + if (same) { + c1.forEach(function (child, index) { + var child2 = c2[index]; + if (child && child2) { + if (child && !child2 || !child && child2) { + same = false; + } else if (child.key !== child2.key) { + same = false; + } else if (showProp && child.props[showProp] !== child2.props[showProp]) { + same = false; + } + } + }); + } + return same; +} + +function mergeChildren(prev, next) { + var ret = []; + + // For each key of `next`, the list of keys to insert before that key in + // the combined list + var nextChildrenPending = {}; + var pendingChildren = []; + prev.forEach(function (child) { + if (child && findChildInChildrenByKey(next, child.key)) { + if (pendingChildren.length) { + nextChildrenPending[child.key] = pendingChildren; + pendingChildren = []; + } + } else { + pendingChildren.push(child); + } + }); + + next.forEach(function (child) { + if (child && Object.prototype.hasOwnProperty.call(nextChildrenPending, child.key)) { + ret = ret.concat(nextChildrenPending[child.key]); + } + ret.push(child); + }); + + ret = ret.concat(pendingChildren); + + return ret; +} +// EXTERNAL MODULE: ./node_modules/@ant-design/css-animation/es/index.js +var es = __webpack_require__("UwPn"); + +// CONCATENATED MODULE: ./node_modules/rc-notification/node_modules/rc-animate/es/util/animate.js +var util = { + isAppearSupported: function isAppearSupported(props) { + return props.transitionName && props.transitionAppear || props.animation.appear; + }, + isEnterSupported: function isEnterSupported(props) { + return props.transitionName && props.transitionEnter || props.animation.enter; + }, + isLeaveSupported: function isLeaveSupported(props) { + return props.transitionName && props.transitionLeave || props.animation.leave; + }, + allowAppearCallback: function allowAppearCallback(props) { + return props.transitionAppear || props.animation.appear; + }, + allowEnterCallback: function allowEnterCallback(props) { + return props.transitionEnter || props.animation.enter; + }, + allowLeaveCallback: function allowLeaveCallback(props) { + return props.transitionLeave || props.animation.leave; + } +}; +/* harmony default export */ var animate = (util); +// CONCATENATED MODULE: ./node_modules/rc-notification/node_modules/rc-animate/es/AnimateChild.js +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/* eslint react/prop-types: 0 */ + + + + + +var transitionMap = { + enter: 'transitionEnter', + appear: 'transitionAppear', + leave: 'transitionLeave' +}; + +var AnimateChild_AnimateChild = function (_React$Component) { + _inherits(AnimateChild, _React$Component); + + function AnimateChild() { + _classCallCheck(this, AnimateChild); + + return _possibleConstructorReturn(this, (AnimateChild.__proto__ || Object.getPrototypeOf(AnimateChild)).apply(this, arguments)); + } + + _createClass(AnimateChild, [{ + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.stop(); + } + }, { + key: 'componentWillEnter', + value: function componentWillEnter(done) { + if (animate.isEnterSupported(this.props)) { + this.transition('enter', done); + } else { + done(); + } + } + }, { + key: 'componentWillAppear', + value: function componentWillAppear(done) { + if (animate.isAppearSupported(this.props)) { + this.transition('appear', done); + } else { + done(); + } + } + }, { + key: 'componentWillLeave', + value: function componentWillLeave(done) { + if (animate.isLeaveSupported(this.props)) { + this.transition('leave', done); + } else { + // always sync, do not interupt with react component life cycle + // update hidden -> animate hidden -> + // didUpdate -> animate leave -> unmount (if animate is none) + done(); + } + } + }, { + key: 'transition', + value: function transition(animationType, finishCallback) { + var _this2 = this; + + var node = react_dom_default.a.findDOMNode(this); + var props = this.props; + var transitionName = props.transitionName; + var nameIsObj = typeof transitionName === 'object'; + this.stop(); + var end = function end() { + _this2.stopper = null; + finishCallback(); + }; + if ((es["b" /* isCssAnimationSupported */] || !props.animation[animationType]) && transitionName && props[transitionMap[animationType]]) { + var name = nameIsObj ? transitionName[animationType] : transitionName + '-' + animationType; + var activeName = name + '-active'; + if (nameIsObj && transitionName[animationType + 'Active']) { + activeName = transitionName[animationType + 'Active']; + } + this.stopper = Object(es["a" /* default */])(node, { + name: name, + active: activeName + }, end); + } else { + this.stopper = props.animation[animationType](node, end); + } + } + }, { + key: 'stop', + value: function stop() { + var stopper = this.stopper; + if (stopper) { + this.stopper = null; + stopper.stop(); + } + } + }, { + key: 'render', + value: function render() { + return this.props.children; + } + }]); + + return AnimateChild; +}(react_default.a.Component); + +/* harmony default export */ var es_AnimateChild = (AnimateChild_AnimateChild); +// CONCATENATED MODULE: ./node_modules/rc-notification/node_modules/rc-animate/es/Animate.js +var _extends = Object.assign || 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; }; + +var Animate_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function Animate_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function Animate_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function Animate_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/* eslint react/prop-types: 0 */ + + + + + + +var defaultKey = 'rc_animate_' + Date.now(); + +function getChildrenFromProps(props) { + var children = props.children; + if (react_default.a.isValidElement(children)) { + if (!children.key) { + return react_default.a.cloneElement(children, { + key: defaultKey + }); + } + } + return children; +} + +function noop() {} + +var Animate_Animate = function (_React$Component) { + Animate_inherits(Animate, _React$Component); + + function Animate(props) { + Animate_classCallCheck(this, Animate); + + var _this = Animate_possibleConstructorReturn(this, (Animate.__proto__ || Object.getPrototypeOf(Animate)).call(this, props)); + + Animate_initialiseProps.call(_this); + + _this.currentlyAnimatingKeys = {}; + _this.keysToEnter = []; + _this.keysToLeave = []; + + _this.state = { + children: toArrayChildren(getChildrenFromProps(props)) + }; + + _this.childrenRefs = {}; + return _this; + } // eslint-disable-line + + Animate_createClass(Animate, [{ + key: 'componentDidMount', + value: function componentDidMount() { + var _this2 = this; + + var showProp = this.props.showProp; + var children = this.state.children; + if (showProp) { + children = children.filter(function (child) { + return !!child.props[showProp]; + }); + } + children.forEach(function (child) { + if (child) { + _this2.performAppear(child.key); + } + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var _this3 = this; + + this.nextProps = nextProps; + var nextChildren = toArrayChildren(getChildrenFromProps(nextProps)); + var props = this.props; + // exclusive needs immediate response + if (props.exclusive) { + Object.keys(this.currentlyAnimatingKeys).forEach(function (key) { + _this3.stop(key); + }); + } + var showProp = props.showProp; + var currentlyAnimatingKeys = this.currentlyAnimatingKeys; + // last props children if exclusive + var currentChildren = props.exclusive ? toArrayChildren(getChildrenFromProps(props)) : this.state.children; + // in case destroy in showProp mode + var newChildren = []; + if (showProp) { + currentChildren.forEach(function (currentChild) { + var nextChild = currentChild && findChildInChildrenByKey(nextChildren, currentChild.key); + var newChild = void 0; + if ((!nextChild || !nextChild.props[showProp]) && currentChild.props[showProp]) { + newChild = react_default.a.cloneElement(nextChild || currentChild, _defineProperty({}, showProp, true)); + } else { + newChild = nextChild; + } + if (newChild) { + newChildren.push(newChild); + } + }); + nextChildren.forEach(function (nextChild) { + if (!nextChild || !findChildInChildrenByKey(currentChildren, nextChild.key)) { + newChildren.push(nextChild); + } + }); + } else { + newChildren = mergeChildren(currentChildren, nextChildren); + } + + // need render to avoid update + this.setState({ + children: newChildren + }); + + nextChildren.forEach(function (child) { + var key = child && child.key; + if (child && currentlyAnimatingKeys[key]) { + return; + } + var hasPrev = child && findChildInChildrenByKey(currentChildren, key); + if (showProp) { + var showInNext = child.props[showProp]; + if (hasPrev) { + var showInNow = findShownChildInChildrenByKey(currentChildren, key, showProp); + if (!showInNow && showInNext) { + _this3.keysToEnter.push(key); + } + } else if (showInNext) { + _this3.keysToEnter.push(key); + } + } else if (!hasPrev) { + _this3.keysToEnter.push(key); + } + }); + + currentChildren.forEach(function (child) { + var key = child && child.key; + if (child && currentlyAnimatingKeys[key]) { + return; + } + var hasNext = child && findChildInChildrenByKey(nextChildren, key); + if (showProp) { + var showInNow = child.props[showProp]; + if (hasNext) { + var showInNext = findShownChildInChildrenByKey(nextChildren, key, showProp); + if (!showInNext && showInNow) { + _this3.keysToLeave.push(key); + } + } else if (showInNow) { + _this3.keysToLeave.push(key); + } + } else if (!hasNext) { + _this3.keysToLeave.push(key); + } + }); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + var keysToEnter = this.keysToEnter; + this.keysToEnter = []; + keysToEnter.forEach(this.performEnter); + var keysToLeave = this.keysToLeave; + this.keysToLeave = []; + keysToLeave.forEach(this.performLeave); + } + }, { + key: 'isValidChildByKey', + value: function isValidChildByKey(currentChildren, key) { + var showProp = this.props.showProp; + if (showProp) { + return findShownChildInChildrenByKey(currentChildren, key, showProp); + } + return findChildInChildrenByKey(currentChildren, key); + } + }, { + key: 'stop', + value: function stop(key) { + delete this.currentlyAnimatingKeys[key]; + var component = this.childrenRefs[key]; + if (component) { + component.stop(); + } + } + }, { + key: 'render', + value: function render() { + var _this4 = this; + + var props = this.props; + this.nextProps = props; + var stateChildren = this.state.children; + var children = null; + if (stateChildren) { + children = stateChildren.map(function (child) { + if (child === null || child === undefined) { + return child; + } + if (!child.key) { + throw new Error('must set key for children'); + } + return react_default.a.createElement( + es_AnimateChild, + { + key: child.key, + ref: function ref(node) { + _this4.childrenRefs[child.key] = node; + }, + animation: props.animation, + transitionName: props.transitionName, + transitionEnter: props.transitionEnter, + transitionAppear: props.transitionAppear, + transitionLeave: props.transitionLeave + }, + child + ); + }); + } + var Component = props.component; + if (Component) { + var passedProps = props; + if (typeof Component === 'string') { + passedProps = _extends({ + className: props.className, + style: props.style + }, props.componentProps); + } + return react_default.a.createElement( + Component, + passedProps, + children + ); + } + return children[0] || null; + } + }]); + + return Animate; +}(react_default.a.Component); + +Animate_Animate.isAnimate = true; +Animate_Animate.defaultProps = { + animation: {}, + component: 'span', + componentProps: {}, + transitionEnter: true, + transitionLeave: true, + transitionAppear: false, + onEnd: noop, + onEnter: noop, + onLeave: noop, + onAppear: noop +}; + +var Animate_initialiseProps = function _initialiseProps() { + var _this5 = this; + + this.performEnter = function (key) { + // may already remove by exclusive + if (_this5.childrenRefs[key]) { + _this5.currentlyAnimatingKeys[key] = true; + _this5.childrenRefs[key].componentWillEnter(_this5.handleDoneAdding.bind(_this5, key, 'enter')); + } + }; + + this.performAppear = function (key) { + if (_this5.childrenRefs[key]) { + _this5.currentlyAnimatingKeys[key] = true; + _this5.childrenRefs[key].componentWillAppear(_this5.handleDoneAdding.bind(_this5, key, 'appear')); + } + }; + + this.handleDoneAdding = function (key, type) { + var props = _this5.props; + delete _this5.currentlyAnimatingKeys[key]; + // if update on exclusive mode, skip check + if (props.exclusive && props !== _this5.nextProps) { + return; + } + var currentChildren = toArrayChildren(getChildrenFromProps(props)); + if (!_this5.isValidChildByKey(currentChildren, key)) { + // exclusive will not need this + _this5.performLeave(key); + } else if (type === 'appear') { + if (animate.allowAppearCallback(props)) { + props.onAppear(key); + props.onEnd(key, true); + } + } else if (animate.allowEnterCallback(props)) { + props.onEnter(key); + props.onEnd(key, true); + } + }; + + this.performLeave = function (key) { + // may already remove by exclusive + if (_this5.childrenRefs[key]) { + _this5.currentlyAnimatingKeys[key] = true; + _this5.childrenRefs[key].componentWillLeave(_this5.handleDoneLeaving.bind(_this5, key)); + } + }; + + this.handleDoneLeaving = function (key) { + var props = _this5.props; + delete _this5.currentlyAnimatingKeys[key]; + // if update on exclusive mode, skip check + if (props.exclusive && props !== _this5.nextProps) { + return; + } + var currentChildren = toArrayChildren(getChildrenFromProps(props)); + // in case state change is too fast + if (_this5.isValidChildByKey(currentChildren, key)) { + _this5.performEnter(key); + } else { + var end = function end() { + if (animate.allowLeaveCallback(props)) { + props.onLeave(key); + props.onEnd(key, false); + } + }; + if (!isSameChildren(_this5.state.children, currentChildren, props.showProp)) { + _this5.setState({ + children: currentChildren + }, end); + } else { + end(); + } + } + }; +}; + +/* harmony default export */ var es_Animate = (es_unsafeLifecyclesPolyfill(Animate_Animate)); +// EXTERNAL MODULE: ./node_modules/rc-util/es/createChainedFunction.js +var createChainedFunction = __webpack_require__("2GS6"); + +// EXTERNAL MODULE: ./node_modules/classnames/index.js +var classnames = __webpack_require__("TSYQ"); +var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); + +// EXTERNAL MODULE: ./node_modules/rc-notification/es/Notice.js +var Notice = __webpack_require__("EE3K"); + +// EXTERNAL MODULE: ./node_modules/rc-notification/es/useNotification.js +var es_useNotification = __webpack_require__("8HVG"); + +// CONCATENATED MODULE: ./node_modules/rc-notification/es/Notification.js + + + + + + + + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + + + + + +var seed = 0; +var now = Date.now(); + +function getUuid() { + var id = seed; + seed += 1; + return "rcNotification_".concat(now, "_").concat(id); +} + +var Notification_Notification = /*#__PURE__*/function (_Component) { + Object(inherits["a" /* default */])(Notification, _Component); + + var _super = _createSuper(Notification); + + function Notification() { + var _this; + + Object(classCallCheck["a" /* default */])(this, Notification); + + _this = _super.apply(this, arguments); + _this.state = { + notices: [] + }; + _this.hookRefs = new Map(); + + _this.add = function (notice, holderCallback) { + // eslint-disable-next-line no-param-reassign + notice.key = notice.key || getUuid(); + var key = notice.key; + var maxCount = _this.props.maxCount; + + _this.setState(function (previousState) { + var notices = previousState.notices; + var noticeIndex = notices.map(function (v) { + return v.notice.key; + }).indexOf(key); + var updatedNotices = notices.concat(); + + if (noticeIndex !== -1) { + updatedNotices.splice(noticeIndex, 1, { + notice: notice, + holderCallback: holderCallback + }); + } else { + if (maxCount && notices.length >= maxCount) { + // XXX, use key of first item to update new added (let React to move exsiting + // instead of remove and mount). Same key was used before for both a) external + // manual control and b) internal react 'key' prop , which is not that good. + // eslint-disable-next-line no-param-reassign + notice.updateKey = updatedNotices[0].notice.updateKey || updatedNotices[0].notice.key; + updatedNotices.shift(); + } + + updatedNotices.push({ + notice: notice, + holderCallback: holderCallback + }); + } + + return { + notices: updatedNotices + }; + }); + }; + + _this.remove = function (key) { + _this.setState(function (previousState) { + return { + notices: previousState.notices.filter(function (_ref) { + var notice = _ref.notice; + return notice.key !== key; + }) + }; + }); + }; + + return _this; + } + + Object(createClass["a" /* default */])(Notification, [{ + key: "getTransitionName", + value: function getTransitionName() { + var _this$props = this.props, + prefixCls = _this$props.prefixCls, + animation = _this$props.animation; + var transitionName = this.props.transitionName; + + if (!transitionName && animation) { + transitionName = "".concat(prefixCls, "-").concat(animation); + } + + return transitionName; + } + }, { + key: "render", + value: function render() { + var _this2 = this; + + var notices = this.state.notices; + var _this$props2 = this.props, + prefixCls = _this$props2.prefixCls, + className = _this$props2.className, + closeIcon = _this$props2.closeIcon, + style = _this$props2.style; + var noticeNodes = notices.map(function (_ref2, index) { + var notice = _ref2.notice, + holderCallback = _ref2.holderCallback; + var update = Boolean(index === notices.length - 1 && notice.updateKey); + var key = notice.updateKey ? notice.updateKey : notice.key; + var onClose = Object(createChainedFunction["a" /* default */])(_this2.remove.bind(_this2, notice.key), notice.onClose); + + var noticeProps = _objectSpread(_objectSpread(_objectSpread({ + prefixCls: prefixCls, + closeIcon: closeIcon + }, notice), notice.props), {}, { + key: key, + update: update, + onClose: onClose, + onClick: notice.onClick, + children: notice.content + }); + + if (holderCallback) { + return react_default.a.createElement("div", { + key: key, + className: "".concat(prefixCls, "-hook-holder"), + ref: function ref(div) { + if (typeof key === 'undefined') { + return; + } + + if (div) { + _this2.hookRefs.set(key, div); + + holderCallback(div, noticeProps); + } else { + _this2.hookRefs.delete(key); + } + } + }); + } + + return react_default.a.createElement(Notice["a" /* default */], Object.assign({}, noticeProps)); + }); + return react_default.a.createElement("div", { + className: classnames_default()(prefixCls, className), + style: style + }, react_default.a.createElement(es_Animate, { + transitionName: this.getTransitionName() + }, noticeNodes)); + } + }]); + + return Notification; +}(react["Component"]); + +Notification_Notification.defaultProps = { + prefixCls: 'rc-notification', + animation: 'fade', + style: { + top: 65, + left: '50%' + } +}; + +Notification_Notification.newInstance = function newNotificationInstance(properties, callback) { + var _ref3 = properties || {}, + getContainer = _ref3.getContainer, + props = Object(objectWithoutProperties["a" /* default */])(_ref3, ["getContainer"]); + + var div = document.createElement('div'); + + if (getContainer) { + var root = getContainer(); + root.appendChild(div); + } else { + document.body.appendChild(div); + } + + var called = false; + + function ref(notification) { + if (called) { + return; + } + + called = true; + callback({ + notice: function notice(noticeProps) { + notification.add(noticeProps); + }, + removeNotice: function removeNotice(key) { + notification.remove(key); + }, + component: notification, + destroy: function destroy() { + react_dom_default.a.unmountComponentAtNode(div); + + if (div.parentNode) { + div.parentNode.removeChild(div); + } + }, + // Hooks + useNotification: function useNotification() { + return Object(es_useNotification["a" /* default */])(notification); + } + }); + } // Only used for test case usage + + + if (false) {} + + react_dom_default.a.render(react_default.a.createElement(Notification_Notification, Object.assign({}, props, { + ref: ref + })), div); +}; + +/* harmony default export */ var es_Notification = (Notification_Notification); +// CONCATENATED MODULE: ./node_modules/rc-notification/es/index.js + +/* harmony default export */ var rc_notification_es = __webpack_exports__["a"] = (es_Notification); + +/***/ }), + +/***/ "8yz6": +/*!**********************************************!*\ + !*** ./node_modules/split-on-first/index.js ***! + \**********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function (string, separator) { + if (!(typeof string === 'string' && typeof separator === 'string')) { + throw new TypeError('Expected the arguments to be of type `string`'); + } + if (separator === '') { + return [string]; + } + var separatorIndex = string.indexOf(separator); + if (separatorIndex === -1) { + return [string]; + } + return [string.slice(0, separatorIndex), string.slice(separatorIndex + separator.length)]; +}; + +/***/ }), + +/***/ "9/5/": +/*!***********************************************!*\ + !*** ./node_modules/lodash.debounce/index.js ***! + \***********************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** Used to match leading and trailing whitespace. */ +var reTrim = /^\s+|\s+$/g; + +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; + +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return root.Date.now(); +}; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ +function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + result = wait - timeSinceLastCall; + + return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} + +module.exports = debounce; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "yLpj"))) + +/***/ }), + +/***/ "90hW": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/math-sign.js ***! + \*****************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +// `Math.sign` method implementation +// https://tc39.github.io/ecma262/#sec-math.sign +module.exports = Math.sign || function sign(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; +}; + + +/***/ }), + +/***/ "93I0": +/*!******************************************************!*\ + !*** ./node_modules/core-js/internals/shared-key.js ***! + \******************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var shared = __webpack_require__(/*! ../internals/shared */ "VpIT"); +var uid = __webpack_require__(/*! ../internals/uid */ "kOOl"); + +var keys = shared('keys'); + +module.exports = function (key) { + return keys[key] || (keys[key] = uid(key)); +}; + + +/***/ }), + +/***/ "94Xl": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/es.array.species.js ***! + \**********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var setSpecies = __webpack_require__(/*! ../internals/set-species */ "JiZb"); + +// `Array[@@species]` getter +// https://tc39.github.io/ecma262/#sec-get-array-@@species +setSpecies('Array'); + + +/***/ }), + +/***/ "9D6x": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.map.update.js ***! + \***********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM"); + +// `Set.prototype.update` method +// https://github.com/tc39/proposal-collection-methods +$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, { + update: function update(key, callback /* , thunk */) { + var map = anObject(this); + var length = arguments.length; + aFunction(callback); + var isPresentInMap = map.has(key); + if (!isPresentInMap && length < 3) { + throw TypeError('Updating absent value'); + } + var value = isPresentInMap ? map.get(key) : aFunction(length > 2 ? arguments[2] : undefined)(key, map); + map.set(key, callback(value, key, map)); + return map; + } +}); + + +/***/ }), + +/***/ "9N29": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/es.array.reduce-right.js ***! + \***************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var $reduceRight = __webpack_require__(/*! ../internals/array-reduce */ "1Y/n").right; +var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "pkCn"); +var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "rkAj"); + +var STRICT_METHOD = arrayMethodIsStrict('reduceRight'); +// For preventing possible almost infinite loop in non-standard implementations, test the forward version of the method +var USES_TO_LENGTH = arrayMethodUsesToLength('reduce', { 1: 0 }); + +// `Array.prototype.reduceRight` method +// https://tc39.github.io/ecma262/#sec-array.prototype.reduceright +$({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH }, { + reduceRight: function reduceRight(callbackfn /* , initialValue */) { + return $reduceRight(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined); + } +}); + + +/***/ }), + +/***/ "9NmV": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_unicodeWords.js ***! + \**********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + +/** Used to compose unicode capture groups. */ +var rsApos = "['\u2019]", + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq; + +/** Used to match complex or compound words. */ +var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji +].join('|'), 'g'); + +/** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ +function unicodeWords(string) { + return string.match(reUnicodeWord) || []; +} + +module.exports = unicodeWords; + + +/***/ }), + +/***/ "9Odx": +/*!*******************************************************************!*\ + !*** ./node_modules/@ant-design/icons/lib/icons/RightOutlined.js ***! + \*******************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt"); +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9")); +var React = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI")); +var _RightOutlined = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons-svg/lib/asn/RightOutlined */ "FhTr")); +var _AntdIcon = _interopRequireDefault(__webpack_require__(/*! ../components/AntdIcon */ "KQxl")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +// GENERATE BY ./scripts/generate.ts +// DON NOT EDIT IT MANUALLY + +var RightOutlined = function RightOutlined(props, ref) { + return /*#__PURE__*/React.createElement(_AntdIcon.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, { + ref: ref, + icon: _RightOutlined.default + })); +}; +var RefIcon = /*#__PURE__*/React.forwardRef(RightOutlined); +if (false) {} +var _default = exports.default = RefIcon; + +/***/ }), + +/***/ "9R94": +/*!****************************************************************!*\ + !*** ./node_modules/tiny-invariant/dist/tiny-invariant.esm.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 invariant; }); +var isProduction = "production" === 'production'; +var prefix = 'Invariant failed'; +function invariant(condition, message) { + if (condition) { + return; + } + if (isProduction) { + throw new Error(prefix); + } + var provided = typeof message === 'function' ? message() : message; + var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix; + throw new Error(value); +} + + + + +/***/ }), + +/***/ "9bJ7": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.code-point-at.js ***! + \*****************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var codeAt = __webpack_require__(/*! ../internals/string-multibyte */ "ZUd8").codeAt; + +// `String.prototype.codePointAt` method +// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat +$({ target: 'String', proto: true }, { + codePointAt: function codePointAt(pos) { + return codeAt(this, pos); + } +}); + + +/***/ }), + +/***/ "9d/t": +/*!***************************************************!*\ + !*** ./node_modules/core-js/internals/classof.js ***! + \***************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ "AO7/"); +var classofRaw = __webpack_require__(/*! ../internals/classof-raw */ "xrYK"); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp"); + +var TO_STRING_TAG = wellKnownSymbol('toStringTag'); +// ES3 wrong here +var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (error) { /* empty */ } +}; + +// getting tag from ES6+ `Object.prototype.toString` +module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) { + var O, tag, result; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag + // builtinTag case + : CORRECT_ARGUMENTS ? classofRaw(O) + // ES3 arguments fallback + : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result; +}; + + +/***/ }), + +/***/ "9hUv": +/*!**************************************************!*\ + !*** ./src/models/messages/index.ts + 1 modules ***! + \**************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/pages/metting/home/index.jsx */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// 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/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +var asyncToGenerator = __webpack_require__("9og8"); + +// EXTERNAL MODULE: ./src/utils/fetch.ts +var fetch = __webpack_require__("ErOA"); + +// CONCATENATED MODULE: ./src/service/messages.ts + + +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + +function messages_getTidings(_x) { + return _getTidings.apply(this, arguments); +} +function _getTidings() { + _getTidings = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) { + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", Object(fetch["a" /* default */])('/api/users/tidings.json', { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context.stop(); + } + }, _callee); + })); + return _getTidings.apply(this, arguments); +} +function messages_unreadMessageInfo(_x2) { + return _unreadMessageInfo.apply(this, arguments); +} +function _unreadMessageInfo() { + _unreadMessageInfo = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", Object(fetch["a" /* default */])("/api/users/".concat(params.userId, "/unread_message_info.json"), { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return _unreadMessageInfo.apply(this, arguments); +} +function messages_getPrivateMessages(_x3) { + return _getPrivateMessages.apply(this, arguments); +} +function _getPrivateMessages() { + _getPrivateMessages = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) { + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + return _context3.abrupt("return", Object(fetch["a" /* default */])("/api/users/".concat(params.userId, "/private_messages.json"), { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context3.stop(); + } + }, _callee3); + })); + return _getPrivateMessages.apply(this, arguments); +} +function postPrivateMessages(_x4) { + return _postPrivateMessages.apply(this, arguments); +} +function _postPrivateMessages() { + _postPrivateMessages = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) { + return _regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + return _context4.abrupt("return", Object(fetch["a" /* default */])("/api/users/".concat(params.userId, "/private_messages.json"), { + method: 'post', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context4.stop(); + } + }, _callee4); + })); + return _postPrivateMessages.apply(this, arguments); +} +function messages_getRecentContacts(_x5) { + return _getRecentContacts.apply(this, arguments); +} +function _getRecentContacts() { + _getRecentContacts = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) { + return _regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + return _context5.abrupt("return", Object(fetch["a" /* default */])("/api/users/".concat(params.id, "/recent_contacts.json"), { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context5.stop(); + } + }, _callee5); + })); + return _getRecentContacts.apply(this, arguments); +} +function messages_getUsersForPrivateMessages(_x6) { + return _getUsersForPrivateMessages.apply(this, arguments); +} +function _getUsersForPrivateMessages() { + _getUsersForPrivateMessages = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) { + return _regeneratorRuntime().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + return _context6.abrupt("return", Object(fetch["a" /* default */])("/api/users_for_private_messages.json", { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context6.stop(); + } + }, _callee6); + })); + return _getUsersForPrivateMessages.apply(this, arguments); +} +function messages_getPrivateMessageDetails(_x7) { + return _getPrivateMessageDetails.apply(this, arguments); +} +function _getPrivateMessageDetails() { + _getPrivateMessageDetails = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) { + return _regeneratorRuntime().wrap(function _callee7$(_context7) { + while (1) switch (_context7.prev = _context7.next) { + case 0: + return _context7.abrupt("return", Object(fetch["a" /* default */])("/api/users/".concat(params.userId, "/private_message_details.json"), { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context7.stop(); + } + }, _callee7); + })); + return _getPrivateMessageDetails.apply(this, arguments); +} +function deletePrivateMessage(_x8) { + return _deletePrivateMessage.apply(this, arguments); +} +function _deletePrivateMessage() { + _deletePrivateMessage = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) { + return _regeneratorRuntime().wrap(function _callee8$(_context8) { + while (1) switch (_context8.prev = _context8.next) { + case 0: + return _context8.abrupt("return", Object(fetch["a" /* default */])("/api/users/".concat(params.userId, "/private_messages/").concat(params.id, ".json"), { + method: 'delete' + })); + case 1: + case "end": + return _context8.stop(); + } + }, _callee8); + })); + return _deletePrivateMessage.apply(this, arguments); +} +// CONCATENATED MODULE: ./src/models/messages/index.ts + +function messages_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ messages_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + +var MessagesModel = { + namespace: 'messages', + state: { + tidingsList: [], + privateMessage: [], + unreadInfo: [], + recentContacts: {}, + privateMessageDetails: {}, + userPrivateMessage: {}, + actionTabs: { + key: '', + params: {} + } + }, + effects: { + getPrivateMessageDetails: function getPrivateMessageDetails(_ref, _ref2) { + var payload = _ref.payload; + var call = _ref2.call, + put = _ref2.put; + return /*#__PURE__*/messages_regeneratorRuntime().mark(function _callee() { + var response; + return messages_regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return call(messages_getPrivateMessageDetails, payload); + case 2: + response = _context.sent; + _context.next = 5; + return put({ + type: 'save', + payload: { + privateMessageDetails: response || [] + } + }); + case 5: + return _context.abrupt("return", response); + case 6: + case "end": + return _context.stop(); + } + }, _callee); + })(); + }, + getTidings: function getTidings(_ref3, _ref4) { + var payload = _ref3.payload; + var call = _ref4.call, + put = _ref4.put; + return /*#__PURE__*/messages_regeneratorRuntime().mark(function _callee2() { + var response; + return messages_regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return call(messages_getTidings, payload); + case 2: + response = _context2.sent; + _context2.next = 5; + return put({ + type: 'save', + payload: { + tidingsList: response || [] + } + }); + case 5: + case "end": + return _context2.stop(); + } + }, _callee2); + })(); + }, + getPrivateMessages: function getPrivateMessages(_ref5, _ref6) { + var payload = _ref5.payload; + var call = _ref6.call, + put = _ref6.put; + return /*#__PURE__*/messages_regeneratorRuntime().mark(function _callee3() { + var response; + return messages_regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + _context3.next = 2; + return call(messages_getPrivateMessages, payload); + case 2: + response = _context3.sent; + _context3.next = 5; + return put({ + type: 'save', + payload: { + privateMessage: response || [] + } + }); + case 5: + return _context3.abrupt("return", response); + case 6: + case "end": + return _context3.stop(); + } + }, _callee3); + })(); + }, + getUsersForPrivateMessages: function getUsersForPrivateMessages(_ref7, _ref8) { + var payload = _ref7.payload; + var call = _ref8.call, + put = _ref8.put; + return /*#__PURE__*/messages_regeneratorRuntime().mark(function _callee4() { + var response; + return messages_regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + _context4.next = 2; + return call(messages_getUsersForPrivateMessages, payload); + case 2: + response = _context4.sent; + _context4.next = 5; + return put({ + type: 'save', + payload: { + userPrivateMessage: response || [] + } + }); + case 5: + return _context4.abrupt("return", response); + case 6: + case "end": + return _context4.stop(); + } + }, _callee4); + })(); + }, + unreadMessageInfo: function unreadMessageInfo(_ref9, _ref10) { + var payload = _ref9.payload; + var call = _ref10.call, + put = _ref10.put; + return /*#__PURE__*/messages_regeneratorRuntime().mark(function _callee5() { + var response; + return messages_regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + _context5.next = 2; + return call(messages_unreadMessageInfo, payload); + case 2: + response = _context5.sent; + _context5.next = 5; + return put({ + type: 'save', + payload: { + unreadInfo: response || [] + } + }); + case 5: + case "end": + return _context5.stop(); + } + }, _callee5); + })(); + }, + getRecentContacts: function getRecentContacts(_ref11, _ref12) { + var payload = _ref11.payload; + var call = _ref12.call, + put = _ref12.put; + return /*#__PURE__*/messages_regeneratorRuntime().mark(function _callee6() { + var response; + return messages_regeneratorRuntime().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + _context6.next = 2; + return call(messages_getRecentContacts, payload); + case 2: + response = _context6.sent; + _context6.next = 5; + return put({ + type: 'save', + payload: { + recentContacts: response || [] + } + }); + case 5: + return _context6.abrupt("return", response); + case 6: + case "end": + return _context6.stop(); + } + }, _callee6); + })(); + }, + // 设置操做action + setActionTabs: function setActionTabs(_ref13, _ref14) { + var payload = _ref13.payload; + var call = _ref14.call, + put = _ref14.put; + return /*#__PURE__*/messages_regeneratorRuntime().mark(function _callee7() { + return messages_regeneratorRuntime().wrap(function _callee7$(_context7) { + while (1) switch (_context7.prev = _context7.next) { + case 0: + _context7.next = 2; + return put({ + type: 'save', + payload: { + actionTabs: Object(objectSpread2["a" /* default */])({}, payload) + } + }); + case 2: + case "end": + return _context7.stop(); + } + }, _callee7); + })(); + } + }, + reducers: { + save: function save(state, action) { + return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload); + } + }, + subscriptions: { + setup: function setup(_ref15) { + var dispatch = _ref15.dispatch, + history = _ref15.history; + } + } +}; +/* harmony default export */ var messages = __webpack_exports__["a"] = (MessagesModel); + +/***/ }), + +/***/ "9kvl": +/*!*************************************************************!*\ + !*** ./src/.umi-production/core/umiExports.ts + 19 modules ***! + \*************************************************************/ +/*! exports provided: history, setCreateHistoryOptions, plugin, connect, useDispatch, useStore, useSelector, getDvaApp, __PLUGIN_INITIAL_STATE, createIntl, FormattedDate, FormattedDateParts, FormattedDisplayName, FormattedHTMLMessage, FormattedList, FormattedMessage, FormattedNumber, FormattedNumberParts, FormattedPlural, FormattedRelativeTime, FormattedTime, FormattedTimeParts, IntlContext, IntlProvider, RawIntlProvider, createIntlCache, defineMessages, injectIntl, useIntl, localeInfo, addLocale, getIntl, setIntl, getLocale, getDirection, setLocale, formatMessage, getAllLocales, SelectLang, useModel, ErrorShowType, request, useRequest, UseRequestProvider, Helmet */ +/*! exports used: connect, getDvaApp, history, plugin, setLocale, useModel */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js because of ./src/pages/Competitions/Detail/components/WorkSubmit/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/history.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/plugin.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/plugin-dva/dva.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/plugin-locale/localeExports.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/plugin-model/useModel.tsx because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/account/index.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/announcement.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/attachment.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/boards.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/exercise.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/graduation.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/homeworks.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/index.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/new.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/polls.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/teacher.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/video.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/competitions/index.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/engineering/index.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/forums/detail.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/forums/index.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/globalSetting.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/homePage.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/messages/index.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/paperlibrary/index.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/paths/detail.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/paths/index.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/paths/new.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/problemset/index.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/problemset/preview.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/resetFul/index.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/shixuns/detail.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/shixuns/index.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/shixuns/new.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/shixuns/practiceSetting.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/user/detail.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/user/index.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/models/video/detail.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/index.js because of ./src/components/Header/components/User/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/style/index.js because of ./node_modules/antd/es/breadcrumb/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js because of ./src/pages/metting/information/detail.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/notification/index.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/notification/style/index.js because of ./src/pages/metting/home/index.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash.debounce/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash.throttle/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-helmet/es/Helmet.js (<- Module uses injected variables (global)) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-redux/es/index.js because of ./src/pages/metting/home/index.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/umi-request/dist/index.esm.js (<- Module uses injected variables (process)) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/umi/node_modules/@umijs/runtime/dist/index.esm.js because of ./src/.umi-production/umi.ts */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, "c", function() { return /* reexport */ core_history["b" /* history */]; }); +__webpack_require__.d(__webpack_exports__, "d", function() { return /* reexport */ core_plugin["a" /* plugin */]; }); +__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ es["c" /* connect */]; }); +__webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ dva["b" /* getApp */]; }); +__webpack_require__.d(__webpack_exports__, "e", function() { return /* reexport */ localeExports["g" /* setLocale */]; }); +__webpack_require__.d(__webpack_exports__, "f", function() { return /* reexport */ useModel["a" /* useModel */]; }); + +// UNUSED EXPORTS: setCreateHistoryOptions, useDispatch, useStore, useSelector, __PLUGIN_INITIAL_STATE, createIntl, FormattedDate, FormattedDateParts, FormattedDisplayName, FormattedHTMLMessage, FormattedList, FormattedMessage, FormattedNumber, FormattedNumberParts, FormattedPlural, FormattedRelativeTime, FormattedTime, FormattedTimeParts, IntlContext, IntlProvider, RawIntlProvider, createIntlCache, defineMessages, injectIntl, useIntl, localeInfo, addLocale, getIntl, setIntl, getLocale, getDirection, formatMessage, getAllLocales, SelectLang, ErrorShowType, request, useRequest, UseRequestProvider, Helmet + +// EXTERNAL MODULE: ./src/.umi-production/core/history.ts +var core_history = __webpack_require__("FfOG"); + +// EXTERNAL MODULE: ./src/.umi-production/core/plugin.ts +var core_plugin = __webpack_require__("bCY9"); + +// EXTERNAL MODULE: ./node_modules/react-redux/es/index.js + 24 modules +var es = __webpack_require__("/MKj"); + +// EXTERNAL MODULE: ./src/.umi-production/plugin-dva/dva.ts + 1 modules +var dva = __webpack_require__("uRV1"); + +// CONCATENATED MODULE: ./src/.umi-production/plugin-dva/exports.ts +// @ts-nocheck + + + +// EXTERNAL MODULE: ./src/models/account/index.ts + 1 modules +var account = __webpack_require__("OSZE"); + +// EXTERNAL MODULE: ./src/models/classrooms/announcement.ts + 1 modules +var announcement = __webpack_require__("6YAi"); + +// EXTERNAL MODULE: ./src/models/classrooms/attachment.ts + 1 modules +var attachment = __webpack_require__("0BeC"); + +// EXTERNAL MODULE: ./src/models/classrooms/boards.ts + 1 modules +var boards = __webpack_require__("FzKp"); + +// EXTERNAL MODULE: ./src/models/classrooms/exercise.ts +var exercise = __webpack_require__("qS6X"); + +// EXTERNAL MODULE: ./src/models/classrooms/graduation.ts + 1 modules +var graduation = __webpack_require__("02UQ"); + +// EXTERNAL MODULE: ./src/models/classrooms/homeworks.ts + 1 modules +var homeworks = __webpack_require__("tzui"); + +// EXTERNAL MODULE: ./src/models/classrooms/index.ts +var classrooms = __webpack_require__("5mCs"); + +// EXTERNAL MODULE: ./src/models/classrooms/new.ts +var classrooms_new = __webpack_require__("wCfY"); + +// EXTERNAL MODULE: ./src/models/classrooms/polls.ts + 1 modules +var polls = __webpack_require__("Cb9Y"); + +// EXTERNAL MODULE: ./src/models/classrooms/teacher.ts + 1 modules +var teacher = __webpack_require__("N9QN"); + +// EXTERNAL MODULE: ./src/models/classrooms/video.ts +var video = __webpack_require__("ggIM"); + +// EXTERNAL MODULE: ./src/models/competitions/index.ts +var competitions = __webpack_require__("3blH"); + +// EXTERNAL MODULE: ./src/models/engineering/index.ts +var engineering = __webpack_require__("amTc"); + +// EXTERNAL MODULE: ./src/models/forums/detail.ts +var detail = __webpack_require__("5FVT"); + +// EXTERNAL MODULE: ./src/models/forums/index.ts +var forums = __webpack_require__("Xq8t"); + +// EXTERNAL MODULE: ./src/models/globalSetting.ts + 1 modules +var globalSetting = __webpack_require__("7VZV"); + +// EXTERNAL MODULE: ./src/models/homePage.ts +var homePage = __webpack_require__("b6mv"); + +// EXTERNAL MODULE: ./src/models/messages/index.ts + 1 modules +var messages = __webpack_require__("9hUv"); + +// EXTERNAL MODULE: ./src/models/paperlibrary/index.ts + 2 modules +var paperlibrary = __webpack_require__("WRKT"); + +// EXTERNAL MODULE: ./src/models/paths/detail.ts +var paths_detail = __webpack_require__("noRp"); + +// EXTERNAL MODULE: ./src/models/paths/index.ts +var paths = __webpack_require__("TPcJ"); + +// EXTERNAL MODULE: ./src/models/paths/new.ts +var paths_new = __webpack_require__("en47"); + +// EXTERNAL MODULE: ./src/models/problemset/index.ts +var problemset = __webpack_require__("zU+Z"); + +// EXTERNAL MODULE: ./src/models/problemset/preview.ts +var preview = __webpack_require__("Zkxe"); + +// EXTERNAL MODULE: ./src/models/resetFul/index.ts + 1 modules +var resetFul = __webpack_require__("To2U"); + +// EXTERNAL MODULE: ./src/models/shixuns/detail.ts + 1 modules +var shixuns_detail = __webpack_require__("q0dX"); + +// EXTERNAL MODULE: ./src/models/shixuns/index.ts +var shixuns = __webpack_require__("piWV"); + +// EXTERNAL MODULE: ./src/models/shixuns/new.ts +var shixuns_new = __webpack_require__("aZPP"); + +// EXTERNAL MODULE: ./src/models/shixuns/practiceSetting.ts + 1 modules +var practiceSetting = __webpack_require__("1cmj"); + +// EXTERNAL MODULE: ./src/models/user/detail.ts +var user_detail = __webpack_require__("XuYy"); + +// EXTERNAL MODULE: ./src/models/user/index.ts +var user = __webpack_require__("G+G9"); + +// EXTERNAL MODULE: ./src/models/video/detail.ts + 1 modules +var video_detail = __webpack_require__("iUp/"); + +// CONCATENATED MODULE: ./src/.umi-production/plugin-dva/connect.ts +// @ts-nocheck + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +/** + * @type P: Type of payload + * @type C: Type of callback + */ + +/** + * @type P: Params matched in dynamic routing + */ + +/** + * @type T: React props + * @type U: match props types + */ + +// CONCATENATED MODULE: ./src/.umi-production/plugin-initial-state/exports.ts +// @ts-nocheck + +// @ts-ignore + +var __PLUGIN_INITIAL_STATE = 1; +// EXTERNAL MODULE: ./src/.umi-production/plugin-locale/localeExports.ts + 20 modules +var localeExports = __webpack_require__("Fghh"); + +// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js +var defineProperty = __webpack_require__("jrin"); + +// 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/dropdown/style/index.js +var style = __webpack_require__("qVdP"); + +// EXTERNAL MODULE: ./node_modules/antd/es/dropdown/index.js +var dropdown = __webpack_require__("jsC+"); + +// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js +var esm_extends = __webpack_require__("0Owb"); + +// 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: ./node_modules/react/index.js +var react = __webpack_require__("q1tI"); +var react_default = /*#__PURE__*/__webpack_require__.n(react); + +// CONCATENATED MODULE: ./src/.umi-production/plugin-locale/SelectLang.tsx + + + + + + +// @ts-nocheck + +var SelectLang_HeaderDropdown = function HeaderDropdown(_ref) { + var cls = _ref.overlayClassName, + restProps = Object(objectWithoutProperties["a" /* default */])(_ref, ["overlayClassName"]); + return /*#__PURE__*/react_default.a.createElement(dropdown["a" /* default */], Object(esm_extends["a" /* default */])({ + overlayClassName: cls + }, restProps)); +}; +var SelectLang_transformArrayToObject = function transformArrayToObject(allLangUIConfig) { + return allLangUIConfig.reduce(function (obj, item) { + if (!item.lang) { + return obj; + } + return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, obj), {}, Object(defineProperty["a" /* default */])({}, item.lang, item)); + }, {}); +}; +var defaultLangUConfigMap = Object(defineProperty["a" /* default */])({ + 'ar-EG': { + lang: 'ar-EG', + label: 'العربية', + icon: '🇪🇬', + title: 'لغة' + }, + 'az-AZ': { + lang: 'az-AZ', + label: 'Azərbaycan dili', + icon: '🇦🇿', + title: 'Dil' + }, + 'bg-BG': { + lang: 'bg-BG', + label: 'Български език', + icon: '🇧🇬', + title: 'език' + }, + 'ca-ES': { + lang: 'ca-ES', + label: 'Catalá', + icon: '🇨🇦', + title: 'llengua' + }, + 'cs-CZ': { + lang: 'cs-CZ', + label: 'Čeština', + icon: '🇨🇿', + title: 'Jazyk' + }, + 'da-DK': { + lang: 'da-DK', + label: 'Dansk', + icon: '🇩🇰', + title: 'Sprog' + }, + 'de-DE': { + lang: 'de-DE', + label: 'Deutsch', + icon: '🇩🇪', + title: 'Sprache' + }, + 'el-GR': { + lang: 'el-GR', + label: 'Ελληνικά', + icon: '🇬🇷', + title: 'Γλώσσα' + }, + 'en-GB': { + lang: 'en-GB', + label: 'English', + icon: '🇬🇧', + title: 'Language' + }, + 'en-US': { + lang: 'en-US', + label: 'English', + icon: '🇺🇸', + title: 'Language' + }, + 'es-ES': { + lang: 'es-ES', + label: 'Español', + icon: '🇪🇸', + title: 'Idioma' + }, + 'et-EE': { + lang: 'et-EE', + label: 'Eesti', + icon: '🇪🇪', + title: 'Keel' + }, + 'fa-IR': { + lang: 'fa-IR', + label: 'فارسی', + icon: '🇮🇷', + title: 'زبان' + }, + 'fi-FI': { + lang: 'fi-FI', + label: 'Suomi', + icon: '🇫🇮', + title: 'Kieli' + }, + 'fr-BE': { + lang: 'fr-BE', + label: 'Français', + icon: '🇧🇪', + title: 'Langue' + }, + 'fr-FR': { + lang: 'fr-FR', + label: 'Français', + icon: '🇫🇷', + title: 'Langue' + }, + 'ga-IE': { + lang: 'ga-IE', + label: 'Gaeilge', + icon: '🇮🇪', + title: 'Teanga' + }, + 'he-IL': { + lang: 'he-IL', + label: 'עברית', + icon: '🇮🇱', + title: 'שפה' + }, + 'hi-IN': { + lang: 'hi-IN', + label: 'हिन्दी, हिंदी', + icon: '🇮🇳', + title: 'भाषा: हिन्दी' + }, + 'hr-HR': { + lang: 'hr-HR', + label: 'Hrvatski jezik', + icon: '🇭🇷', + title: 'Jezik' + }, + 'hu-HU': { + lang: 'hu-HU', + label: 'Magyar', + icon: '🇭🇺', + title: 'Nyelv' + }, + 'hy-AM': { + lang: 'hu-HU', + label: 'Հայերեն', + icon: '🇦🇲', + title: 'Լեզու' + }, + 'id-ID': { + lang: 'id-ID', + label: 'Bahasa Indonesia', + icon: '🇮🇩', + title: 'Bahasa' + }, + 'it-IT': { + lang: 'it-IT', + label: 'Italiano', + icon: '🇮🇹', + title: 'Linguaggio' + }, + 'is-IS': { + lang: 'is-IS', + label: 'Íslenska', + icon: '🇮🇸', + title: 'Tungumál' + }, + 'ja-JP': { + lang: 'ja-JP', + label: '日本語', + icon: '🇯🇵', + title: '言語' + }, + 'ku-IQ': { + lang: 'ku-IQ', + label: 'کوردی', + icon: '🇮🇶', + title: 'Ziman' + }, + 'kn-IN': { + lang: 'zh-TW', + label: 'ಕನ್ನಡ', + icon: '🇮🇳', + title: 'ಭಾಷೆ' + }, + 'ko-KR': { + lang: 'ko-KR', + label: '한국어', + icon: '🇰🇷', + title: '언어' + }, + 'lv-LV': { + lang: 'lv-LV', + label: 'Latviešu valoda', + icon: '🇱🇮', + title: 'Kalba' + }, + 'mk-MK': { + lang: 'mk-MK', + label: 'македонски јазик', + icon: '🇲🇰', + title: 'Јазик' + }, + 'mn-MN': { + lang: 'mn-MN', + label: 'Монгол хэл', + icon: '🇲🇳', + title: 'Хэл' + }, + 'ms-MY': { + lang: 'ms-MY', + label: 'بهاس ملايو‎', + icon: '🇲🇾', + title: 'Bahasa' + }, + 'nb-NO': { + lang: 'nb-NO', + label: 'Norsk', + icon: '🇳🇴', + title: 'Språk' + }, + 'ne-NP': { + lang: 'ne-NP', + label: 'नेपाली', + icon: '🇳🇵', + title: 'भाषा' + }, + 'nl-BE': { + lang: 'nl-BE', + label: 'Vlaams', + icon: '🇧🇪', + title: 'Taal' + }, + 'nl-NL': { + lang: 'nl-NL', + label: 'Vlaams', + icon: '🇳🇱', + title: 'Taal' + }, + 'pt-BR': { + lang: 'pt-BR', + label: 'Português', + icon: '🇧🇷', + title: 'Idiomas' + }, + 'pt-PT': { + lang: 'pt-PT', + label: 'Português', + icon: '🇵🇹', + title: 'Idiomas' + }, + 'ro-RO': { + lang: 'ro-RO', + label: 'Română', + icon: '🇷🇴', + title: 'Limba' + }, + 'ru-RU': { + lang: 'ru-RU', + label: 'русский', + icon: '🇷🇺', + title: 'язык' + }, + 'sk-SK': { + lang: 'sk-SK', + label: 'Slovenčina', + icon: '🇸🇰', + title: 'Jazyk' + }, + 'sr-RS': { + lang: 'sr-RS', + label: 'српски језик', + icon: '🇸🇷', + title: 'Језик' + }, + 'sl-SI': { + lang: 'sl-SI', + label: 'Slovenščina', + icon: '🇸🇱', + title: 'Jezik' + }, + 'sv-SE': { + lang: 'sv-SE', + label: 'Svenska', + icon: '🇸🇪', + title: 'Språk' + }, + 'ta-IN': { + lang: 'ta-IN', + label: 'தமிழ்', + icon: '🇮🇳', + title: 'மொழி' + }, + 'th-TH': { + lang: 'th-TH', + label: 'ไทย', + icon: '🇹🇭', + title: 'ภาษา' + }, + 'tr-TR': { + lang: 'tr-TR', + label: 'Türkçe', + icon: '🇹🇷', + title: 'Dil' + }, + 'uk-UA': { + lang: 'uk-UA', + label: 'Українська', + icon: '🇺🇰', + title: 'Мова' + }, + 'vi-VN': { + lang: 'vi-VN', + label: 'Tiếng Việt', + icon: '🇻🇳', + title: 'Ngôn ngữ' + }, + 'zh-CN': { + lang: 'zh-CN', + label: '简体中文', + icon: '🇨🇳', + title: '语言' + }, + 'zh-TW': { + lang: 'zh-TW', + label: '繁体中文', + icon: '🇭🇰', + title: '語言' + } +}, "zh-TW", { + lang: 'zh-TW', + label: '繁体中文', + icon: '🇹🇼', + title: '語言' +}); +var SelectLang_SelectLang = function SelectLang(props) { + return /*#__PURE__*/react_default.a.createElement(react_default.a.Fragment, null); +}; +// EXTERNAL MODULE: ./src/.umi-production/plugin-model/useModel.tsx +var useModel = __webpack_require__("I5X1"); + +// 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/antd/es/notification/style/index.js +var notification_style = __webpack_require__("/xke"); + +// EXTERNAL MODULE: ./node_modules/antd/es/notification/index.js + 1 modules +var notification = __webpack_require__("TeRw"); + +// EXTERNAL MODULE: ./node_modules/antd/es/message/style/index.js +var message_style = __webpack_require__("miYZ"); + +// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 1 modules +var message = __webpack_require__("tsqr"); + +// EXTERNAL MODULE: ./node_modules/umi-request/dist/index.esm.js +var index_esm = __webpack_require__("ZqBY"); + +// EXTERNAL MODULE: ./node_modules/umi/node_modules/@umijs/runtime/dist/index.esm.js +var dist_index_esm = __webpack_require__("rlch"); + +// EXTERNAL MODULE: ./node_modules/lodash.debounce/index.js +var lodash_debounce = __webpack_require__("9/5/"); +var lodash_debounce_default = /*#__PURE__*/__webpack_require__.n(lodash_debounce); + +// EXTERNAL MODULE: ./node_modules/lodash.throttle/index.js +var lodash_throttle = __webpack_require__("hKI/"); +var lodash_throttle_default = /*#__PURE__*/__webpack_require__.n(lodash_throttle); + +// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/utils/utils.js +function isDocumentVisible() { + if (typeof document !== 'undefined' && typeof document.visibilityState !== 'undefined') { + return document.visibilityState !== 'hidden'; + } + + return true; +} +function isOnline() { + if (typeof navigator.onLine !== 'undefined') { + return navigator.onLine; + } + + return true; +} +// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/utils/index.js + +// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/utils/cache.js +var cache = new Map(); + +var setCache = function setCache(key, cacheTime, data) { + var currentCache = cache.get(key); + + if (currentCache === null || currentCache === void 0 ? void 0 : currentCache.timer) { + clearTimeout(currentCache.timer); + } + + var timer = undefined; + + if (cacheTime > -1) { + // 数据在不活跃 cacheTime 后,删除掉 + timer = setTimeout(function () { + cache["delete"](key); + }, cacheTime); + } + + cache.set(key, { + data: data, + timer: timer, + startTime: new Date().getTime() + }); +}; + +var getCache = function getCache(key) { + var currentCache = cache.get(key); + return { + data: currentCache === null || currentCache === void 0 ? void 0 : currentCache.data, + startTime: currentCache === null || currentCache === void 0 ? void 0 : currentCache.startTime + }; +}; + + +// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/utils/limit.js +var __read = undefined && undefined.__read || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), + r, + ar = [], + e; + + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { + ar.push(r.value); + } + } catch (error) { + e = { + error: error + }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + + return ar; +}; + +var __spread = undefined && undefined.__spread || function () { + for (var ar = [], i = 0; i < arguments.length; i++) { + ar = ar.concat(__read(arguments[i])); + } + + return ar; +}; + +function limit(fn, timespan) { + var pending = false; + return function () { + var args = []; + + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + + if (pending) return; + pending = true; + fn.apply(void 0, __spread(args)); + setTimeout(function () { + pending = false; + }, timespan); + }; +} +// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/utils/usePersistFn.js +var usePersistFn_read = undefined && undefined.__read || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), + r, + ar = [], + e; + + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { + ar.push(r.value); + } + } catch (error) { + e = { + error: error + }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + + return ar; +}; + +var usePersistFn_spread = undefined && undefined.__spread || function () { + for (var ar = [], i = 0; i < arguments.length; i++) { + ar = ar.concat(usePersistFn_read(arguments[i])); + } + + return ar; +}; + + + +function usePersistFn(fn) { + var ref = Object(react["useRef"])(function () { + throw new Error('Cannot call an event handler while rendering.'); + }); + ref.current = fn; + var persist = Object(react["useCallback"])(function () { + var args = []; + + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + + var refFn = ref.current; + + if (refFn) { + return refFn.apply(void 0, usePersistFn_spread(args)); + } + }, [ref]); + + if (typeof fn === 'function') { + return persist; + } + + return undefined; +} + +/* harmony default export */ var utils_usePersistFn = (usePersistFn); +// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/utils/useUpdateEffect.js + + +var useUpdateEffect_useUpdateEffect = function useUpdateEffect(effect, deps) { + var isMounted = Object(react["useRef"])(false); + Object(react["useEffect"])(function () { + return function () { + isMounted.current = false; + }; + }, []); + Object(react["useEffect"])(function () { + if (!isMounted.current) { + isMounted.current = true; + } else { + return effect(); + } + }, deps); +}; + +/* harmony default export */ var utils_useUpdateEffect = (useUpdateEffect_useUpdateEffect); +// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/utils/windowFocus.js +// from swr + +var listeners = []; + +function windowFocus_subscribe(listener) { + listeners.push(listener); + return function unsubscribe() { + var index = listeners.indexOf(listener); + listeners.splice(index, 1); + }; +} + +var eventsBinded = false; + +if (typeof window !== 'undefined' && window.addEventListener && !eventsBinded) { + var windowFocus_revalidate = function revalidate() { + if (!isDocumentVisible() || !isOnline()) return; + + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + listener(); + } + }; + + window.addEventListener('visibilitychange', windowFocus_revalidate, false); + window.addEventListener('focus', windowFocus_revalidate, false); // only bind the events once + + eventsBinded = true; +} + +/* harmony default export */ var windowFocus = (windowFocus_subscribe); +// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/utils/windowVisible.js +// from swr + +var windowVisible_listeners = []; + +function windowVisible_subscribe(listener) { + windowVisible_listeners.push(listener); + return function unsubscribe() { + var index = windowVisible_listeners.indexOf(listener); + windowVisible_listeners.splice(index, 1); + }; +} + +var windowVisible_eventsBinded = false; + +if (typeof window !== 'undefined' && window.addEventListener && !windowVisible_eventsBinded) { + var windowVisible_revalidate = function revalidate() { + if (!isDocumentVisible()) return; + + for (var i = 0; i < windowVisible_listeners.length; i++) { + var listener = windowVisible_listeners[i]; + listener(); + } + }; + + window.addEventListener('visibilitychange', windowVisible_revalidate, false); // only bind the events once + + windowVisible_eventsBinded = true; +} + +/* harmony default export */ var windowVisible = (windowVisible_subscribe); +// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/useAsync.js +var __assign = undefined && undefined.__assign || function () { + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + + for (var p in s) { + if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + } + + return t; + }; + + return __assign.apply(this, arguments); +}; + +var useAsync_read = undefined && undefined.__read || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), + r, + ar = [], + e; + + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { + ar.push(r.value); + } + } catch (error) { + e = { + error: error + }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + + return ar; +}; + +var useAsync_spread = undefined && undefined.__spread || function () { + for (var ar = [], i = 0; i < arguments.length; i++) { + ar = ar.concat(useAsync_read(arguments[i])); + } + + return ar; +}; + + + + + + + + + + + +var DEFAULT_KEY = 'AHOOKS_USE_REQUEST_DEFAULT_KEY'; + +var useAsync_Fetch = +/** @class */ +function () { + function Fetch(service, config, subscribe, initState) { + // 请求时序 + this.count = 0; // visible 后,是否继续轮询 + + this.pollingWhenVisibleFlag = false; + this.pollingTimer = undefined; + this.loadingDelayTimer = undefined; + this.unsubscribe = []; + this.that = this; + this.state = { + loading: false, + params: [], + data: undefined, + error: undefined, + run: this.run.bind(this.that), + mutate: this.mutate.bind(this.that), + refresh: this.refresh.bind(this.that), + cancel: this.cancel.bind(this.that), + unmount: this.unmount.bind(this.that) + }; + this.service = service; + this.config = config; + this.subscribe = subscribe; + + if (initState) { + this.state = __assign(__assign({}, this.state), initState); + } + + this.debounceRun = this.config.debounceInterval ? lodash_debounce_default()(this._run, this.config.debounceInterval) : undefined; + this.throttleRun = this.config.throttleInterval ? lodash_throttle_default()(this._run, this.config.throttleInterval) : undefined; + this.limitRefresh = limit(this.refresh.bind(this), this.config.focusTimespan); + + if (this.config.pollingInterval) { + this.unsubscribe.push(windowVisible(this.rePolling.bind(this))); + } + + if (this.config.refreshOnWindowFocus) { + this.unsubscribe.push(windowFocus(this.limitRefresh.bind(this))); + } + } + + Fetch.prototype.setState = function (s) { + if (s === void 0) { + s = {}; + } + + this.state = __assign(__assign({}, this.state), s); + this.subscribe(this.state); + }; + + Fetch.prototype._run = function () { + var _this = this; + + var args = []; + + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } // 取消已有定时器 + + + if (this.pollingTimer) { + clearTimeout(this.pollingTimer); + } // 取消 loadingDelayTimer + + + if (this.loadingDelayTimer) { + clearTimeout(this.loadingDelayTimer); + } + + this.count += 1; // 闭包存储当次请求的 count + + var currentCount = this.count; + this.setState({ + loading: !this.config.loadingDelay, + params: args + }); + + if (this.config.loadingDelay) { + this.loadingDelayTimer = setTimeout(function () { + _this.setState({ + loading: true + }); + }, this.config.loadingDelay); + } + + return this.service.apply(this, useAsync_spread(args)).then(function (res) { + if (currentCount !== _this.count) { + // prevent run.then when request is canceled + return new Promise(function () {}); + } + + if (_this.loadingDelayTimer) { + clearTimeout(_this.loadingDelayTimer); + } + + var formattedResult = _this.config.formatResult ? _this.config.formatResult(res) : res; + + _this.setState({ + data: formattedResult, + error: undefined, + loading: false + }); + + if (_this.config.onSuccess) { + _this.config.onSuccess(formattedResult, args); + } + + return formattedResult; + })["catch"](function (error) { + if (currentCount !== _this.count) { + // prevent run.then when request is canceled + return new Promise(function () {}); + } + + if (_this.loadingDelayTimer) { + clearTimeout(_this.loadingDelayTimer); + } + + _this.setState({ + data: undefined, + error: error, + loading: false + }); + + if (_this.config.onError) { + _this.config.onError(error, args); + } // If throwOnError, user should catch the error self, + // or the page will crash + + + if (_this.config.throwOnError) { + throw error; + } + + console.error(error); // eslint-disable-next-line prefer-promise-reject-errors + + return Promise.reject('useRequest has caught the exception, if you need to handle the exception yourself, you can set options.throwOnError to true.'); + })["finally"](function () { + if (currentCount === _this.count) { + if (_this.config.pollingInterval) { + // 如果屏幕隐藏,并且 !pollingWhenHidden, 则停止轮询,并记录 flag,等 visible 时,继续轮询 + if (!isDocumentVisible() && !_this.config.pollingWhenHidden) { + _this.pollingWhenVisibleFlag = true; + return; + } + + _this.pollingTimer = setTimeout(function () { + _this._run.apply(_this, useAsync_spread(args)); + }, _this.config.pollingInterval); + } + } + }); + }; + + Fetch.prototype.run = function () { + var args = []; + + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + + if (this.debounceRun) { + this.debounceRun.apply(this, useAsync_spread(args)); // TODO 如果 options 存在 debounceInterval,或 throttleInterval,则 run 和 refresh 不会返回 Promise。 带类型需要修复后,此处变成 return;。 + + return Promise.resolve(null); + } + + if (this.throttleRun) { + this.throttleRun.apply(this, useAsync_spread(args)); + return Promise.resolve(null); + } + + return this._run.apply(this, useAsync_spread(args)); + }; + + Fetch.prototype.cancel = function () { + if (this.debounceRun) { + this.debounceRun.cancel(); + } + + if (this.throttleRun) { + this.throttleRun.cancel(); + } + + if (this.loadingDelayTimer) { + clearTimeout(this.loadingDelayTimer); + } + + if (this.pollingTimer) { + clearTimeout(this.pollingTimer); + } + + this.pollingWhenVisibleFlag = false; + this.count += 1; + this.setState({ + loading: false + }); + }; + + Fetch.prototype.refresh = function () { + return this.run.apply(this, useAsync_spread(this.state.params)); + }; + + Fetch.prototype.rePolling = function () { + if (this.pollingWhenVisibleFlag) { + this.pollingWhenVisibleFlag = false; + this.refresh(); + } + }; + + Fetch.prototype.mutate = function (data) { + if (typeof data === 'function') { + this.setState({ + // eslint-disable-next-line react/no-access-state-in-setstate + data: data(this.state.data) || {} + }); + } else { + this.setState({ + data: data + }); + } + }; + + Fetch.prototype.unmount = function () { + this.cancel(); + this.unsubscribe.forEach(function (s) { + s(); + }); + }; + + return Fetch; +}(); + +function useAsync(service, options) { + var _options = options || {}; + + var _a = _options.refreshDeps, + refreshDeps = _a === void 0 ? [] : _a, + _b = _options.manual, + manual = _b === void 0 ? false : _b, + _c = _options.onSuccess, + onSuccess = _c === void 0 ? function () {} : _c, + _d = _options.onError, + onError = _d === void 0 ? function () {} : _d, + _e = _options.defaultLoading, + defaultLoading = _e === void 0 ? false : _e, + loadingDelay = _options.loadingDelay, + _f = _options.pollingInterval, + pollingInterval = _f === void 0 ? 0 : _f, + _g = _options.pollingWhenHidden, + pollingWhenHidden = _g === void 0 ? true : _g, + _h = _options.defaultParams, + defaultParams = _h === void 0 ? [] : _h, + _j = _options.refreshOnWindowFocus, + refreshOnWindowFocus = _j === void 0 ? false : _j, + _k = _options.focusTimespan, + focusTimespan = _k === void 0 ? 5000 : _k, + fetchKey = _options.fetchKey, + cacheKey = _options.cacheKey, + _l = _options.cacheTime, + cacheTime = _l === void 0 ? 5 * 60 * 1000 : _l, + _m = _options.staleTime, + staleTime = _m === void 0 ? 0 : _m, + debounceInterval = _options.debounceInterval, + throttleInterval = _options.throttleInterval, + initialData = _options.initialData, + _o = _options.ready, + ready = _o === void 0 ? true : _o, + _p = _options.throwOnError, + throwOnError = _p === void 0 ? false : _p; + var newstFetchKey = Object(react["useRef"])(DEFAULT_KEY); // 持久化一些函数 + + var servicePersist = utils_usePersistFn(service); + var onSuccessPersist = utils_usePersistFn(onSuccess); + var onErrorPersist = utils_usePersistFn(onError); + var fetchKeyPersist = utils_usePersistFn(fetchKey); + var formatResult; + + if ('formatResult' in _options) { + // eslint-disable-next-line prefer-destructuring + formatResult = _options.formatResult; + } + + var formatResultPersist = utils_usePersistFn(formatResult); + var config = { + formatResult: formatResultPersist, + onSuccess: onSuccessPersist, + onError: onErrorPersist, + loadingDelay: loadingDelay, + pollingInterval: pollingInterval, + pollingWhenHidden: pollingWhenHidden, + // refreshOnWindowFocus should not work on manual mode + refreshOnWindowFocus: !manual && refreshOnWindowFocus, + focusTimespan: focusTimespan, + debounceInterval: debounceInterval, + throttleInterval: throttleInterval, + throwOnError: throwOnError + }; + var subscribe = utils_usePersistFn(function (key, data) { + setFetches(function (s) { + // eslint-disable-next-line no-param-reassign + s[key] = data; + return __assign({}, s); + }); + }); + + var _q = useAsync_read(Object(react["useState"])(function () { + var _a; // 如果有 缓存,则从缓存中读数据 + + + if (cacheKey) { + var cacheData_1 = (_a = getCache(cacheKey)) === null || _a === void 0 ? void 0 : _a.data; + + if (cacheData_1) { + newstFetchKey.current = cacheData_1.newstFetchKey; + /* 使用 initState, 重新 new Fetch */ + + var newFetches_1 = {}; + Object.keys(cacheData_1.fetches).forEach(function (key) { + var cacheFetch = cacheData_1.fetches[key]; + var newFetch = new useAsync_Fetch(servicePersist, config, subscribe.bind(null, key), { + loading: cacheFetch.loading, + params: cacheFetch.params, + data: cacheFetch.data, + error: cacheFetch.error + }); + newFetches_1[key] = newFetch.state; + }); + return newFetches_1; + } + } + + return {}; + }), 2), + fetches = _q[0], + setFetches = _q[1]; + + var fetchesRef = Object(react["useRef"])(fetches); + fetchesRef.current = fetches; + var readyMemoryParams = Object(react["useRef"])(); + var run = Object(react["useCallback"])(function () { + var args = []; + + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + + if (!ready) { + // 没有 ready, 记录请求参数,等 ready 后,发起请求用 + readyMemoryParams.current = args; + return; + } + + if (fetchKeyPersist) { + var key = fetchKeyPersist.apply(void 0, useAsync_spread(args)); + newstFetchKey.current = key === undefined ? DEFAULT_KEY : key; + } + + var currentFetchKey = newstFetchKey.current; // 这里必须用 fetchsRef,而不能用 fetches。 + // 否则在 reset 完,立即 run 的时候,这里拿到的 fetches 是旧的。 + + var currentFetch = fetchesRef.current[currentFetchKey]; + + if (!currentFetch) { + var newFetch = new useAsync_Fetch(servicePersist, config, subscribe.bind(null, currentFetchKey), { + data: initialData + }); + currentFetch = newFetch.state; + setFetches(function (s) { + // eslint-disable-next-line no-param-reassign + s[currentFetchKey] = currentFetch; + return __assign({}, s); + }); + } + + return currentFetch.run.apply(currentFetch, useAsync_spread(args)); + }, [fetchKey, subscribe, ready]); + var runRef = Object(react["useRef"])(run); + runRef.current = run; // cache + + utils_useUpdateEffect(function () { + if (cacheKey) { + setCache(cacheKey, cacheTime, { + fetches: fetches, + newstFetchKey: newstFetchKey.current + }); + } + }, [cacheKey, fetches]); // for ready + + var hasTriggeredByReady = Object(react["useRef"])(false); + utils_useUpdateEffect(function () { + if (ready) { + if (!hasTriggeredByReady.current && readyMemoryParams.current) { + runRef.current.apply(runRef, useAsync_spread(readyMemoryParams.current)); + } + + hasTriggeredByReady.current = true; + } + }, [ready]); // 第一次默认执行 + + Object(react["useEffect"])(function () { + var _a; + + if (!manual) { + // 如果有缓存,则重新请求 + if (Object.keys(fetches).length > 0) { + // 如果 staleTime 是 -1,则 cache 永不过期 + // 如果 statleTime 超期了,则重新请求 + var cacheStartTime = cacheKey && ((_a = getCache(cacheKey)) === null || _a === void 0 ? void 0 : _a.startTime) || 0; + + if (!(staleTime === -1 || new Date().getTime() - cacheStartTime <= staleTime)) { + /* 重新执行所有的 cache */ + Object.values(fetches).forEach(function (f) { + f.refresh(); + }); + } + } else { + // 第一次默认执行,可以通过 defaultParams 设置参数 + runRef.current.apply(runRef, useAsync_spread(defaultParams)); + } + } + }, []); // 重置 fetches + + var reset = Object(react["useCallback"])(function () { + Object.values(fetchesRef.current).forEach(function (f) { + f.unmount(); + }); + newstFetchKey.current = DEFAULT_KEY; + setFetches({}); // 不写会有问题。如果不写,此时立即 run,会是老的数据 + + fetchesRef.current = {}; + }, [setFetches]); // refreshDeps 变化,重新执行所有请求 + + utils_useUpdateEffect(function () { + if (!manual) { + /* 全部重新执行 */ + Object.values(fetchesRef.current).forEach(function (f) { + f.refresh(); + }); + } + }, useAsync_spread(refreshDeps)); // 卸载组件触发 + + Object(react["useEffect"])(function () { + return function () { + Object.values(fetchesRef.current).forEach(function (f) { + f.unmount(); + }); + }; + }, []); + var notExecutedWarning = Object(react["useCallback"])(function (name) { + return function () { + console.warn("You should't call " + name + " when service not executed once."); + }; + }, []); + return __assign(__assign({ + loading: ready && !manual || defaultLoading, + data: initialData, + error: undefined, + params: [], + cancel: notExecutedWarning('cancel'), + refresh: notExecutedWarning('refresh'), + mutate: notExecutedWarning('mutate') + }, fetches[newstFetchKey.current] || {}), { + run: run, + fetches: fetches, + reset: reset + }); +} + +/* harmony default export */ var es_useAsync = (useAsync); +// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/useLoadMore.js +var useLoadMore_assign = undefined && undefined.__assign || function () { + useLoadMore_assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + + for (var p in s) { + if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + } + + return t; + }; + + return useLoadMore_assign.apply(this, arguments); +}; + +var __rest = undefined && undefined.__rest || function (s, e) { + var t = {}; + + for (var p in s) { + if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; + } + + if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; + } + return t; +}; + +var useLoadMore_read = undefined && undefined.__read || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), + r, + ar = [], + e; + + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { + ar.push(r.value); + } + } catch (error) { + e = { + error: error + }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + + return ar; +}; + +var useLoadMore_spread = undefined && undefined.__spread || function () { + for (var ar = [], i = 0; i < arguments.length; i++) { + ar = ar.concat(useLoadMore_read(arguments[i])); + } + + return ar; +}; + + + + + +function useLoadMore(service, options) { + var _a = options.refreshDeps, + refreshDeps = _a === void 0 ? [] : _a, + ref = options.ref, + isNoMore = options.isNoMore, + _b = options.threshold, + threshold = _b === void 0 ? 100 : _b, + fetchKey = options.fetchKey, + restOptions = __rest(options, ["refreshDeps", "ref", "isNoMore", "threshold", "fetchKey"]); + + var _c = useLoadMore_read(Object(react["useState"])(false), 2), + loadingMore = _c[0], + setLoadingMore = _c[1]; + + Object(react["useEffect"])(function () { + if (options.fetchKey) { + console.warn("useRequest loadMore mode don't need fetchKey!"); + } + }, []); + var result = es_useAsync(service, useLoadMore_assign(useLoadMore_assign({}, restOptions), { + fetchKey: function fetchKey(d) { + var _a; + + return ((_a = d === null || d === void 0 ? void 0 : d.list) === null || _a === void 0 ? void 0 : _a.length) || 0; + }, + onSuccess: function onSuccess() { + var params = []; + + for (var _i = 0; _i < arguments.length; _i++) { + params[_i] = arguments[_i]; + } + + setLoadingMore(false); + + if (options.onSuccess) { + options.onSuccess.apply(options, useLoadMore_spread(params)); + } + } + })); + var data = result.data, + run = result.run, + params = result.params, + reset = result.reset, + loading = result.loading, + fetches = result.fetches; + var reload = Object(react["useCallback"])(function () { + reset(); + + var _a = useLoadMore_read(params), + restParams = _a.slice(1); + + run.apply(void 0, useLoadMore_spread([undefined], restParams)); + }, [run, reset, params]); + var reloadRef = Object(react["useRef"])(reload); + reloadRef.current = reload; + /* loadMore 场景下,如果 refreshDeps 变化,重置到第一页 */ + + utils_useUpdateEffect(function () { + /* 只有自动执行的场景, refreshDeps 才有效 */ + if (!options.manual) { + reloadRef.current(); + } + }, useLoadMore_spread(refreshDeps)); + var dataGroup = Object(react["useMemo"])(function () { + var listGroup = []; // 在 loadMore 时,不希望清空上一次的 data。需要把最后一个 非 loading 的请求 data,放回去。 + + var lastNoLoadingData = data; + Object.values(fetches).forEach(function (h) { + var _a, _b; + + if ((_a = h.data) === null || _a === void 0 ? void 0 : _a.list) { + listGroup = listGroup.concat((_b = h.data) === null || _b === void 0 ? void 0 : _b.list); + } + + if (!h.loading) { + lastNoLoadingData = h.data; + } + }); + return useLoadMore_assign(useLoadMore_assign({}, lastNoLoadingData), { + list: listGroup + }); + }, [fetches, data]); + var noMore = isNoMore ? !loading && !loadingMore && isNoMore(dataGroup) : false; + var loadMore = Object(react["useCallback"])(function () { + if (noMore) { + return; + } + + setLoadingMore(true); + + var _a = useLoadMore_read(params), + restParams = _a.slice(1); + + run.apply(void 0, useLoadMore_spread([dataGroup], restParams)); + }, [noMore, run, dataGroup, params]); + /* 上拉加载的方法 */ + + var scrollMethod = function scrollMethod() { + if (loading || loadingMore || !ref || !ref.current) { + return; + } + + if (ref.current.scrollHeight - ref.current.scrollTop <= ref.current.clientHeight + threshold) { + loadMore(); + } + }; // 如果不用 ref,而用之前的 useCallbak,在某些情况下会出问题,造成拿到的 loading 不是最新的。 + // fix https://github.com/alibaba/hooks/issues/630 + + + var scrollMethodRef = Object(react["useRef"])(scrollMethod); + scrollMethodRef.current = scrollMethod; + /* 如果有 ref,则会上拉加载更多 */ + + Object(react["useEffect"])(function () { + if (!ref || !ref.current) { + return function () {}; + } + + var scrollTrigger = function scrollTrigger() { + return scrollMethodRef.current(); + }; + + ref.current.addEventListener('scroll', scrollTrigger); + return function () { + if (ref && ref.current) { + ref.current.removeEventListener('scroll', scrollTrigger); + } + }; + }, [scrollMethodRef]); + return useLoadMore_assign(useLoadMore_assign({}, result), { + data: dataGroup, + reload: reload, + loading: loading && dataGroup.list.length === 0, + loadMore: loadMore, + loadingMore: loadingMore, + noMore: noMore + }); +} + +/* harmony default export */ var es_useLoadMore = (useLoadMore); +// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/usePaginated.js +var usePaginated_assign = undefined && undefined.__assign || function () { + usePaginated_assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + + for (var p in s) { + if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + } + + return t; + }; + + return usePaginated_assign.apply(this, arguments); +}; + +var usePaginated_rest = undefined && undefined.__rest || function (s, e) { + var t = {}; + + for (var p in s) { + if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; + } + + if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; + } + return t; +}; + +var usePaginated_read = undefined && undefined.__read || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), + r, + ar = [], + e; + + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { + ar.push(r.value); + } + } catch (error) { + e = { + error: error + }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + + return ar; +}; + +var usePaginated_spread = undefined && undefined.__spread || function () { + for (var ar = [], i = 0; i < arguments.length; i++) { + ar = ar.concat(usePaginated_read(arguments[i])); + } + + return ar; +}; + + + + + +function usePaginated(service, options) { + var paginated = options.paginated, + _a = options.defaultPageSize, + defaultPageSize = _a === void 0 ? 10 : _a, + _b = options.refreshDeps, + refreshDeps = _b === void 0 ? [] : _b, + fetchKey = options.fetchKey, + restOptions = usePaginated_rest(options, ["paginated", "defaultPageSize", "refreshDeps", "fetchKey"]); + + Object(react["useEffect"])(function () { + if (fetchKey) { + console.error("useRequest pagination's fetchKey will not work!"); + } + }, []); + + var _c = es_useAsync(service, usePaginated_assign({ + defaultParams: [{ + current: 1, + pageSize: defaultPageSize + }] + }, restOptions)), + data = _c.data, + params = _c.params, + run = _c.run, + loading = _c.loading, + rest = usePaginated_rest(_c, ["data", "params", "run", "loading"]); + + var _d = params && params[0] ? params[0] : {}, + _e = _d.current, + current = _e === void 0 ? 1 : _e, + _f = _d.pageSize, + pageSize = _f === void 0 ? defaultPageSize : _f, + _g = _d.sorter, + sorter = _g === void 0 ? {} : _g, + _h = _d.filters, + filters = _h === void 0 ? {} : _h; // 只改变 pagination,其他参数原样传递 + + + var runChangePagination = Object(react["useCallback"])(function (paginationParams) { + var _a = usePaginated_read(params), + oldPaginationParams = _a[0], + restParams = _a.slice(1); + + run.apply(void 0, usePaginated_spread([usePaginated_assign(usePaginated_assign({}, oldPaginationParams), paginationParams)], restParams)); + }, [run, params]); + var total = (data === null || data === void 0 ? void 0 : data.total) || 0; + var totalPage = Object(react["useMemo"])(function () { + return Math.ceil(total / pageSize); + }, [pageSize, total]); + var onChange = Object(react["useCallback"])(function (c, p) { + var toCurrent = c <= 0 ? 1 : c; + var toPageSize = p <= 0 ? 1 : p; + var tempTotalPage = Math.ceil(total / toPageSize); + + if (toCurrent > tempTotalPage) { + toCurrent = Math.max(1, tempTotalPage); + } + + runChangePagination({ + current: toCurrent, + pageSize: toPageSize + }); + }, [total, runChangePagination]); + var changeCurrent = Object(react["useCallback"])(function (c) { + onChange(c, pageSize); + }, [onChange, pageSize]); + var changePageSize = Object(react["useCallback"])(function (p) { + onChange(current, p); + }, [onChange, current]); + var changeCurrentRef = Object(react["useRef"])(changeCurrent); + changeCurrentRef.current = changeCurrent; + /* 分页场景下,如果 refreshDeps 变化,重置分页 */ + + utils_useUpdateEffect(function () { + /* 只有自动执行的场景, refreshDeps 才有效 */ + if (!options.manual) { + changeCurrentRef.current(1); + } + }, usePaginated_spread(refreshDeps)); // 表格翻页 排序 筛选等 + + var changeTable = Object(react["useCallback"])(function (p, f, s) { + runChangePagination({ + current: p.current, + pageSize: p.pageSize || defaultPageSize, + filters: f, + sorter: s + }); + }, [filters, sorter, runChangePagination]); + return usePaginated_assign({ + loading: loading, + data: data, + params: params, + run: run, + pagination: { + current: current, + pageSize: pageSize, + total: total, + totalPage: totalPage, + onChange: onChange, + changeCurrent: changeCurrent, + changePageSize: changePageSize + }, + tableProps: { + dataSource: (data === null || data === void 0 ? void 0 : data.list) || [], + loading: loading, + onChange: changeTable, + pagination: { + current: current, + pageSize: pageSize, + total: total + } + }, + sorter: sorter, + filters: filters + }, rest); +} + +/* harmony default export */ var es_usePaginated = (usePaginated); +// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/configContext.js + +var ConfigContext = /*#__PURE__*/react_default.a.createContext({}); +ConfigContext.displayName = 'UseRequestConfigContext'; +/* harmony default export */ var configContext = (ConfigContext); +// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/index.js +var es_assign = undefined && undefined.__assign || function () { + es_assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + + for (var p in s) { + if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + } + + return t; + }; + + return es_assign.apply(this, arguments); +}; + +var es_rest = undefined && undefined.__rest || function (s, e) { + var t = {}; + + for (var p in s) { + if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; + } + + if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; + } + return t; +}; + +var es_read = undefined && undefined.__read || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), + r, + ar = [], + e; + + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { + ar.push(r.value); + } + } catch (error) { + e = { + error: error + }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + + return ar; +}; + +var es_spread = undefined && undefined.__spread || function () { + for (var ar = [], i = 0; i < arguments.length; i++) { + ar = ar.concat(es_read(arguments[i])); + } + + return ar; +}; +/* eslint-disable react-hooks/rules-of-hooks */ + + + + + + + + +function useRequest(service, options) { + if (options === void 0) { + options = {}; + } + + var contextConfig = Object(react["useContext"])(configContext); + + var finalOptions = es_assign(es_assign({}, contextConfig), options); + + var paginated = finalOptions.paginated, + loadMore = finalOptions.loadMore, + requestMethod = finalOptions.requestMethod; + var paginatedRef = Object(react["useRef"])(paginated); + var loadMoreRef = Object(react["useRef"])(loadMore); + + if (paginatedRef.current !== paginated) { + throw Error('You should not modify the paginated of options'); + } + + if (loadMoreRef.current !== loadMore) { + throw Error('You should not modify the loadMore of options'); + } + + paginatedRef.current = paginated; + loadMoreRef.current = loadMore; // @ts-ignore + + var fetchProxy = function fetchProxy() { + var args = []; + + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } // @ts-ignore + + + return fetch.apply(void 0, es_spread(args)).then(function (res) { + if (res.ok) { + return res.json(); + } + + throw new Error(res.statusText); + }); + }; + + var finalRequestMethod = requestMethod || fetchProxy; + var promiseService; + + switch (typeof service) { + case 'string': + promiseService = function promiseService() { + return finalRequestMethod(service); + }; + + break; + + case 'object': + var url_1 = service.url, + rest_1 = es_rest(service, ["url"]); + + promiseService = function promiseService() { + return requestMethod ? requestMethod(service) : fetchProxy(url_1, rest_1); + }; + + break; + + default: + promiseService = function promiseService() { + var args = []; + + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + + return new Promise(function (resolve, reject) { + var s = service.apply(void 0, es_spread(args)); + var fn = s; + + if (!s.then) { + switch (typeof s) { + case 'string': + fn = finalRequestMethod(s); + break; + + case 'object': + var url_2 = s.url, + rest_2 = es_rest(s, ["url"]); + + fn = requestMethod ? requestMethod(s) : fetchProxy(url_2, rest_2); + break; + } + } + + fn.then(resolve)["catch"](reject); + }); + }; + + } + + if (loadMore) { + return es_useLoadMore(promiseService, finalOptions); + } + + if (paginated) { + return es_usePaginated(promiseService, finalOptions); + } + + return es_useAsync(promiseService, finalOptions); +} + +var UseRequestProvider = configContext.Provider; // UseAPIProvider 已经废弃,此处为了兼容 umijs 插件 plugin-request + +var UseAPIProvider = UseRequestProvider; + +/* harmony default export */ var use_request_es = (useRequest); +// CONCATENATED MODULE: ./src/.umi-production/plugin-request/request.ts + + + + + + + +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } +// @ts-nocheck +/** + * Base on https://github.com/umijs/D:/projects/competitions/forgeplus-react/node_modules/umi-request + */ + +// @ts-ignore + + + + +function request_useRequest(service) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + return use_request_es(service, Object(objectSpread2["a" /* default */])({ + formatResult: function formatResult(result) { + return result === null || result === void 0 ? void 0 : result.data; + }, + requestMethod: function requestMethod(requestOptions) { + if (typeof requestOptions === 'string') { + return request(requestOptions); + } + if (typeof requestOptions === 'object') { + var _url = requestOptions.url, + rest = Object(objectWithoutProperties["a" /* default */])(requestOptions, ["url"]); + return request(_url, rest); + } + throw new Error('request options error'); + } + }, options)); +} +var ErrorShowType = /*#__PURE__*/function (ErrorShowType) { + ErrorShowType[ErrorShowType["SILENT"] = 0] = "SILENT"; + ErrorShowType[ErrorShowType["WARN_MESSAGE"] = 1] = "WARN_MESSAGE"; + ErrorShowType[ErrorShowType["ERROR_MESSAGE"] = 2] = "ERROR_MESSAGE"; + ErrorShowType[ErrorShowType["NOTIFICATION"] = 4] = "NOTIFICATION"; + ErrorShowType[ErrorShowType["REDIRECT"] = 9] = "REDIRECT"; + return ErrorShowType; +}({}); +var DEFAULT_ERROR_PAGE = '/exception'; +var requestMethodInstance; +var request_getRequestMethod = function getRequestMethod() { + var _requestConfig$errorC; + if (requestMethodInstance) { + // request method 已经示例化 + return requestMethodInstance; + } + + // runtime 配置可能应为依赖顺序的问题在模块初始化的时候无法获取,所以需要封装一层在异步调用后初始化相关方法 + // 当用户的 app.ts 中依赖了该文件的情况下就该模块的初始化时间就会被提前,无法获取到运行时配置 + var requestConfig = core_plugin["a" /* plugin */].applyPlugins({ + key: 'request', + type: dist_index_esm["a" /* ApplyPluginsType */].modify, + initialValue: {} + }); + var errorAdaptor = ((_requestConfig$errorC = requestConfig.errorConfig) === null || _requestConfig$errorC === void 0 ? void 0 : _requestConfig$errorC.adaptor) || function (resData) { + return resData; + }; + requestMethodInstance = Object(index_esm["a" /* extend */])(Object(objectSpread2["a" /* default */])({ + errorHandler: function errorHandler(error) { + var _error$request, _error$request$option; + // @ts-ignore + if (error === null || error === void 0 ? void 0 : (_error$request = error.request) === null || _error$request === void 0 ? void 0 : (_error$request$option = _error$request.options) === null || _error$request$option === void 0 ? void 0 : _error$request$option.skipErrorHandler) { + throw error; + } + var errorInfo; + if (error.name === 'ResponseError' && error.data && error.request) { + var _errorInfo; + var _ctx = { + req: error.request, + res: error.response + }; + errorInfo = errorAdaptor(error.data, _ctx); + error.message = ((_errorInfo = errorInfo) === null || _errorInfo === void 0 ? void 0 : _errorInfo.errorMessage) || error.message; + error.data = error.data; + error.info = errorInfo; + } + errorInfo = error.info; + if (errorInfo) { + var _errorInfo2, _errorInfo3, _requestConfig$errorC2, _errorInfo4; + var errorMessage = (_errorInfo2 = errorInfo) === null || _errorInfo2 === void 0 ? void 0 : _errorInfo2.errorMessage; + var errorCode = (_errorInfo3 = errorInfo) === null || _errorInfo3 === void 0 ? void 0 : _errorInfo3.errorCode; + var errorPage = ((_requestConfig$errorC2 = requestConfig.errorConfig) === null || _requestConfig$errorC2 === void 0 ? void 0 : _requestConfig$errorC2.errorPage) || DEFAULT_ERROR_PAGE; + switch ((_errorInfo4 = errorInfo) === null || _errorInfo4 === void 0 ? void 0 : _errorInfo4.showType) { + case ErrorShowType.SILENT: + // do nothing + break; + case ErrorShowType.WARN_MESSAGE: + message["b" /* default */].warn(errorMessage); + break; + case ErrorShowType.ERROR_MESSAGE: + message["b" /* default */].error(errorMessage); + break; + case ErrorShowType.NOTIFICATION: + notification["a" /* default */].open({ + message: errorMessage + }); + break; + case ErrorShowType.REDIRECT: + // @ts-ignore + core_history["b" /* history */].push({ + pathname: errorPage, + query: { + errorCode: errorCode, + errorMessage: errorMessage + } + }); + // redirect to error page + break; + default: + message["b" /* default */].error(errorMessage); + break; + } + } else { + message["b" /* default */].error(error.message || 'Request error, please retry.'); + } + throw error; + } + }, requestConfig)); + + // 中间件统一错误处理 + // 后端返回格式 { success: boolean, data: any } + // 按照项目具体情况修改该部分逻辑 + requestMethodInstance.use( /*#__PURE__*/function () { + var _ref = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(ctx, next) { + var _req$options; + var req, res, options, getResponse, resData, errorInfo, error; + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return next(); + case 2: + req = ctx.req, res = ctx.res; // @ts-ignore + if (!((_req$options = req.options) === null || _req$options === void 0 ? void 0 : _req$options.skipErrorHandler)) { + _context.next = 5; + break; + } + return _context.abrupt("return"); + case 5: + options = req.options; + getResponse = options.getResponse; + resData = getResponse ? res.data : res; + errorInfo = errorAdaptor(resData, ctx); + if (!(errorInfo.success === false)) { + _context.next = 15; + break; + } + // 抛出错误到 errorHandler 中处理 + error = new Error(errorInfo.errorMessage); + error.name = 'BizError'; + error.data = resData; + error.info = errorInfo; + throw error; + case 15: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function (_x, _x2) { + return _ref.apply(this, arguments); + }; + }()); + + // Add user custom middlewares + var customMiddlewares = requestConfig.middlewares || []; + customMiddlewares.forEach(function (mw) { + requestMethodInstance.use(mw); + }); + + // Add user custom interceptors + var requestInterceptors = requestConfig.requestInterceptors || []; + var responseInterceptors = requestConfig.responseInterceptors || []; + requestInterceptors.map(function (ri) { + requestMethodInstance.interceptors.request.use(ri); + }); + responseInterceptors.map(function (ri) { + requestMethodInstance.interceptors.response.use(ri); + }); + return requestMethodInstance; +}; +var request = function request(url, options) { + var requestMethod = request_getRequestMethod(); + return requestMethod(url, options); +}; + +// EXTERNAL MODULE: ./node_modules/react-helmet/es/Helmet.js +var Helmet = __webpack_require__("qhky"); + +// CONCATENATED MODULE: ./src/.umi-production/plugin-helmet/exports.ts +// @ts-nocheck +// @ts-ignore + +// CONCATENATED MODULE: ./src/.umi-production/core/umiExports.ts +// @ts-nocheck + + + + + + + + + + + +/***/ }), + +/***/ "9mRW": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es.math.fround.js ***! + \********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var fround = __webpack_require__(/*! ../internals/math-fround */ "vo4V"); + +// `Math.fround` method +// https://tc39.github.io/ecma262/#sec-math.fround +$({ target: 'Math', stat: true }, { fround: fround }); + + +/***/ }), + +/***/ "9mu1": +/*!*******************************************************!*\ + !*** ./node_modules/rc-align/es/index.js + 6 modules ***! + \*******************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js because of ./node_modules/@ant-design/icons/es/components/twoTonePrimaryColor.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js because of ./node_modules/rc-tooltip/es/Tooltip.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js because of ./node_modules/rc-tooltip/node_modules/rc-trigger/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/contains.js because of ./node_modules/rc-tooltip/node_modules/rc-trigger/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useLayoutEffect.js because of ./node_modules/rc-util/es/hooks/useMergedState.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js because of ./node_modules/rc-tooltip/node_modules/rc-trigger/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js because of ./node_modules/antd/es/breadcrumb/Breadcrumb.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules +var slicedToArray = __webpack_require__("ODXe"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js +var esm_typeof = __webpack_require__("U8pU"); + +// CONCATENATED MODULE: ./node_modules/dom-align/dist-web/index.js +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + enumerableOnly && (symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + })), keys.push.apply(keys, symbols); + } + return keys; +} +function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = null != arguments[i] ? arguments[i] : {}; + i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { + _defineProperty(target, key, source[key]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + return target; +} +function _typeof(obj) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, _typeof(obj); +} +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; +} + +var vendorPrefix; +var jsCssMap = { + Webkit: '-webkit-', + Moz: '-moz-', + // IE did it wrong again ... + ms: '-ms-', + O: '-o-' +}; +function getVendorPrefix() { + if (vendorPrefix !== undefined) { + return vendorPrefix; + } + vendorPrefix = ''; + var style = document.createElement('p').style; + var testProp = 'Transform'; + for (var key in jsCssMap) { + if (key + testProp in style) { + vendorPrefix = key; + } + } + return vendorPrefix; +} +function getTransitionName() { + return getVendorPrefix() ? "".concat(getVendorPrefix(), "TransitionProperty") : 'transitionProperty'; +} +function getTransformName() { + return getVendorPrefix() ? "".concat(getVendorPrefix(), "Transform") : 'transform'; +} +function setTransitionProperty(node, value) { + var name = getTransitionName(); + if (name) { + node.style[name] = value; + if (name !== 'transitionProperty') { + node.style.transitionProperty = value; + } + } +} +function setTransform(node, value) { + var name = getTransformName(); + if (name) { + node.style[name] = value; + if (name !== 'transform') { + node.style.transform = value; + } + } +} +function getTransitionProperty(node) { + return node.style.transitionProperty || node.style[getTransitionName()]; +} +function getTransformXY(node) { + var style = window.getComputedStyle(node, null); + var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName()); + if (transform && transform !== 'none') { + var matrix = transform.replace(/[^0-9\-.,]/g, '').split(','); + return { + x: parseFloat(matrix[12] || matrix[4], 0), + y: parseFloat(matrix[13] || matrix[5], 0) + }; + } + return { + x: 0, + y: 0 + }; +} +var matrix2d = /matrix\((.*)\)/; +var matrix3d = /matrix3d\((.*)\)/; +function setTransformXY(node, xy) { + var style = window.getComputedStyle(node, null); + var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName()); + if (transform && transform !== 'none') { + var arr; + var match2d = transform.match(matrix2d); + if (match2d) { + match2d = match2d[1]; + arr = match2d.split(',').map(function (item) { + return parseFloat(item, 10); + }); + arr[4] = xy.x; + arr[5] = xy.y; + setTransform(node, "matrix(".concat(arr.join(','), ")")); + } else { + var match3d = transform.match(matrix3d)[1]; + arr = match3d.split(',').map(function (item) { + return parseFloat(item, 10); + }); + arr[12] = xy.x; + arr[13] = xy.y; + setTransform(node, "matrix3d(".concat(arr.join(','), ")")); + } + } else { + setTransform(node, "translateX(".concat(xy.x, "px) translateY(").concat(xy.y, "px) translateZ(0)")); + } +} + +var RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source; +var getComputedStyleX; + +// https://stackoverflow.com/a/3485654/3040605 +function forceRelayout(elem) { + var originalStyle = elem.style.display; + elem.style.display = 'none'; + elem.offsetHeight; // eslint-disable-line + elem.style.display = originalStyle; +} +function css(el, name, v) { + var value = v; + if (_typeof(name) === 'object') { + for (var i in name) { + if (name.hasOwnProperty(i)) { + css(el, i, name[i]); + } + } + return undefined; + } + if (typeof value !== 'undefined') { + if (typeof value === 'number') { + value = "".concat(value, "px"); + } + el.style[name] = value; + return undefined; + } + return getComputedStyleX(el, name); +} +function getClientPosition(elem) { + var box; + var x; + var y; + var doc = elem.ownerDocument; + var body = doc.body; + var docElem = doc && doc.documentElement; + // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式 + box = elem.getBoundingClientRect(); + + // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop + // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确 + // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin + + x = Math.floor(box.left); + y = Math.floor(box.top); + + // In IE, most of the time, 2 extra pixels are added to the top and left + // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and + // IE6 standards mode, this border can be overridden by setting the + // document element's border to zero -- thus, we cannot rely on the + // offset always being 2 pixels. + + // In quirks mode, the offset can be determined by querying the body's + // clientLeft/clientTop, but in standards mode, it is found by querying + // the document element's clientLeft/clientTop. Since we already called + // getClientBoundingRect we have already forced a reflow, so it is not + // too expensive just to query them all. + + // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的 + // 窗口边框标准是设 documentElement ,quirks 时设置 body + // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去 + // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置 + // 标准 ie 下 docElem.clientTop 就是 border-top + // ie7 html 即窗口边框改变不了。永远为 2 + // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0 + + x -= docElem.clientLeft || body.clientLeft || 0; + y -= docElem.clientTop || body.clientTop || 0; + return { + left: x, + top: y + }; +} +function getScroll(w, top) { + var ret = w["page".concat(top ? 'Y' : 'X', "Offset")]; + var method = "scroll".concat(top ? 'Top' : 'Left'); + if (typeof ret !== 'number') { + var d = w.document; + // ie6,7,8 standard mode + ret = d.documentElement[method]; + if (typeof ret !== 'number') { + // quirks mode + ret = d.body[method]; + } + } + return ret; +} +function getScrollLeft(w) { + return getScroll(w); +} +function getScrollTop(w) { + return getScroll(w, true); +} +function getOffset(el) { + var pos = getClientPosition(el); + var doc = el.ownerDocument; + var w = doc.defaultView || doc.parentWindow; + pos.left += getScrollLeft(w); + pos.top += getScrollTop(w); + return pos; +} + +/** + * A crude way of determining if an object is a window + * @member util + */ +function isWindow(obj) { + // must use == for ie8 + /* eslint eqeqeq:0 */ + return obj !== null && obj !== undefined && obj == obj.window; +} +function getDocument(node) { + if (isWindow(node)) { + return node.document; + } + if (node.nodeType === 9) { + return node; + } + return node.ownerDocument; +} +function _getComputedStyle(elem, name, cs) { + var computedStyle = cs; + var val = ''; + var d = getDocument(elem); + computedStyle = computedStyle || d.defaultView.getComputedStyle(elem, null); + + // https://github.com/kissyteam/kissy/issues/61 + if (computedStyle) { + val = computedStyle.getPropertyValue(name) || computedStyle[name]; + } + return val; +} +var _RE_NUM_NO_PX = new RegExp("^(".concat(RE_NUM, ")(?!px)[a-z%]+$"), 'i'); +var RE_POS = /^(top|right|bottom|left)$/; +var CURRENT_STYLE = 'currentStyle'; +var RUNTIME_STYLE = 'runtimeStyle'; +var LEFT = 'left'; +var PX = 'px'; +function _getComputedStyleIE(elem, name) { + // currentStyle maybe null + // http://msdn.microsoft.com/en-us/library/ms535231.aspx + var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name]; + + // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值 + // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19 + // 在 ie 下不对,需要直接用 offset 方式 + // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了 + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + // exclude left right for relativity + if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) { + // Remember the original values + var style = elem.style; + var left = style[LEFT]; + var rsLeft = elem[RUNTIME_STYLE][LEFT]; + + // prevent flashing of content + elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT]; + + // Put in the new values to get a computed value out + style[LEFT] = name === 'fontSize' ? '1em' : ret || 0; + ret = style.pixelLeft + PX; + + // Revert the changed values + style[LEFT] = left; + elem[RUNTIME_STYLE][LEFT] = rsLeft; + } + return ret === '' ? 'auto' : ret; +} +if (typeof window !== 'undefined') { + getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE; +} +function getOffsetDirection(dir, option) { + if (dir === 'left') { + return option.useCssRight ? 'right' : dir; + } + return option.useCssBottom ? 'bottom' : dir; +} +function oppositeOffsetDirection(dir) { + if (dir === 'left') { + return 'right'; + } else if (dir === 'right') { + return 'left'; + } else if (dir === 'top') { + return 'bottom'; + } else if (dir === 'bottom') { + return 'top'; + } +} + +// 设置 elem 相对 elem.ownerDocument 的坐标 +function setLeftTop(elem, offset, option) { + // set position first, in-case top/left are set even on static elem + if (css(elem, 'position') === 'static') { + elem.style.position = 'relative'; + } + var presetH = -999; + var presetV = -999; + var horizontalProperty = getOffsetDirection('left', option); + var verticalProperty = getOffsetDirection('top', option); + var oppositeHorizontalProperty = oppositeOffsetDirection(horizontalProperty); + var oppositeVerticalProperty = oppositeOffsetDirection(verticalProperty); + if (horizontalProperty !== 'left') { + presetH = 999; + } + if (verticalProperty !== 'top') { + presetV = 999; + } + var originalTransition = ''; + var originalOffset = getOffset(elem); + if ('left' in offset || 'top' in offset) { + originalTransition = getTransitionProperty(elem) || ''; + setTransitionProperty(elem, 'none'); + } + if ('left' in offset) { + elem.style[oppositeHorizontalProperty] = ''; + elem.style[horizontalProperty] = "".concat(presetH, "px"); + } + if ('top' in offset) { + elem.style[oppositeVerticalProperty] = ''; + elem.style[verticalProperty] = "".concat(presetV, "px"); + } + // force relayout + forceRelayout(elem); + var old = getOffset(elem); + var originalStyle = {}; + for (var key in offset) { + if (offset.hasOwnProperty(key)) { + var dir = getOffsetDirection(key, option); + var preset = key === 'left' ? presetH : presetV; + var off = originalOffset[key] - old[key]; + if (dir === key) { + originalStyle[dir] = preset + off; + } else { + originalStyle[dir] = preset - off; + } + } + } + css(elem, originalStyle); + // force relayout + forceRelayout(elem); + if ('left' in offset || 'top' in offset) { + setTransitionProperty(elem, originalTransition); + } + var ret = {}; + for (var _key in offset) { + if (offset.hasOwnProperty(_key)) { + var _dir = getOffsetDirection(_key, option); + var _off = offset[_key] - originalOffset[_key]; + if (_key === _dir) { + ret[_dir] = originalStyle[_dir] + _off; + } else { + ret[_dir] = originalStyle[_dir] - _off; + } + } + } + css(elem, ret); +} +function setTransform$1(elem, offset) { + var originalOffset = getOffset(elem); + var originalXY = getTransformXY(elem); + var resultXY = { + x: originalXY.x, + y: originalXY.y + }; + if ('left' in offset) { + resultXY.x = originalXY.x + offset.left - originalOffset.left; + } + if ('top' in offset) { + resultXY.y = originalXY.y + offset.top - originalOffset.top; + } + setTransformXY(elem, resultXY); +} +function setOffset(elem, offset, option) { + if (option.ignoreShake) { + var oriOffset = getOffset(elem); + var oLeft = oriOffset.left.toFixed(0); + var oTop = oriOffset.top.toFixed(0); + var tLeft = offset.left.toFixed(0); + var tTop = offset.top.toFixed(0); + if (oLeft === tLeft && oTop === tTop) { + return; + } + } + if (option.useCssRight || option.useCssBottom) { + setLeftTop(elem, offset, option); + } else if (option.useCssTransform && getTransformName() in document.body.style) { + setTransform$1(elem, offset); + } else { + setLeftTop(elem, offset, option); + } +} +function each(arr, fn) { + for (var i = 0; i < arr.length; i++) { + fn(arr[i]); + } +} +function isBorderBoxFn(elem) { + return getComputedStyleX(elem, 'boxSizing') === 'border-box'; +} +var BOX_MODELS = ['margin', 'border', 'padding']; +var CONTENT_INDEX = -1; +var PADDING_INDEX = 2; +var BORDER_INDEX = 1; +var MARGIN_INDEX = 0; +function swap(elem, options, callback) { + var old = {}; + var style = elem.style; + var name; + + // Remember the old values, and insert the new ones + for (name in options) { + if (options.hasOwnProperty(name)) { + old[name] = style[name]; + style[name] = options[name]; + } + } + callback.call(elem); + + // Revert the old values + for (name in options) { + if (options.hasOwnProperty(name)) { + style[name] = old[name]; + } + } +} +function getPBMWidth(elem, props, which) { + var value = 0; + var prop; + var j; + var i; + for (j = 0; j < props.length; j++) { + prop = props[j]; + if (prop) { + for (i = 0; i < which.length; i++) { + var cssProp = void 0; + if (prop === 'border') { + cssProp = "".concat(prop).concat(which[i], "Width"); + } else { + cssProp = prop + which[i]; + } + value += parseFloat(getComputedStyleX(elem, cssProp)) || 0; + } + } + } + return value; +} +var domUtils = { + getParent: function getParent(element) { + var parent = element; + do { + if (parent.nodeType === 11 && parent.host) { + parent = parent.host; + } else { + parent = parent.parentNode; + } + } while (parent && parent.nodeType !== 1 && parent.nodeType !== 9); + return parent; + } +}; +each(['Width', 'Height'], function (name) { + domUtils["doc".concat(name)] = function (refWin) { + var d = refWin.document; + return Math.max( + // firefox chrome documentElement.scrollHeight< body.scrollHeight + // ie standard mode : documentElement.scrollHeight> body.scrollHeight + d.documentElement["scroll".concat(name)], + // quirks : documentElement.scrollHeight 最大等于可视窗口多一点? + d.body["scroll".concat(name)], domUtils["viewport".concat(name)](d)); + }; + domUtils["viewport".concat(name)] = function (win) { + // pc browser includes scrollbar in window.innerWidth + var prop = "client".concat(name); + var doc = win.document; + var body = doc.body; + var documentElement = doc.documentElement; + var documentElementProp = documentElement[prop]; + // 标准模式取 documentElement + // backcompat 取 body + return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp; + }; +}); + +/* + 得到元素的大小信息 + @param elem + @param name + @param {String} [extra] 'padding' : (css width) + padding + 'border' : (css width) + padding + border + 'margin' : (css width) + padding + border + margin + */ +function getWH(elem, name, ex) { + var extra = ex; + if (isWindow(elem)) { + return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem); + } else if (elem.nodeType === 9) { + return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem); + } + var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; + var borderBoxValue = name === 'width' ? Math.floor(elem.getBoundingClientRect().width) : Math.floor(elem.getBoundingClientRect().height); + var isBorderBox = isBorderBoxFn(elem); + var cssBoxValue = 0; + if (borderBoxValue === null || borderBoxValue === undefined || borderBoxValue <= 0) { + borderBoxValue = undefined; + // Fall back to computed then un computed css if necessary + cssBoxValue = getComputedStyleX(elem, name); + if (cssBoxValue === null || cssBoxValue === undefined || Number(cssBoxValue) < 0) { + cssBoxValue = elem.style[name] || 0; + } + // Normalize '', auto, and prepare for extra + cssBoxValue = Math.floor(parseFloat(cssBoxValue)) || 0; + } + if (extra === undefined) { + extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX; + } + var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox; + var val = borderBoxValue || cssBoxValue; + if (extra === CONTENT_INDEX) { + if (borderBoxValueOrIsBorderBox) { + return val - getPBMWidth(elem, ['border', 'padding'], which); + } + return cssBoxValue; + } else if (borderBoxValueOrIsBorderBox) { + if (extra === BORDER_INDEX) { + return val; + } + return val + (extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which) : getPBMWidth(elem, ['margin'], which)); + } + return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which); +} +var cssShow = { + position: 'absolute', + visibility: 'hidden', + display: 'block' +}; + +// fix #119 : https://github.com/kissyteam/kissy/issues/119 +function getWHIgnoreDisplay() { + for (var _len = arguments.length, args = new Array(_len), _key2 = 0; _key2 < _len; _key2++) { + args[_key2] = arguments[_key2]; + } + var val; + var elem = args[0]; + // in case elem is window + // elem.offsetWidth === undefined + if (elem.offsetWidth !== 0) { + val = getWH.apply(undefined, args); + } else { + swap(elem, cssShow, function () { + val = getWH.apply(undefined, args); + }); + } + return val; +} +each(['width', 'height'], function (name) { + var first = name.charAt(0).toUpperCase() + name.slice(1); + domUtils["outer".concat(first)] = function (el, includeMargin) { + return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX); + }; + var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; + domUtils[name] = function (elem, v) { + var val = v; + if (val !== undefined) { + if (elem) { + var isBorderBox = isBorderBoxFn(elem); + if (isBorderBox) { + val += getPBMWidth(elem, ['padding', 'border'], which); + } + return css(elem, name, val); + } + return undefined; + } + return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX); + }; +}); +function mix(to, from) { + for (var i in from) { + if (from.hasOwnProperty(i)) { + to[i] = from[i]; + } + } + return to; +} +var utils = { + getWindow: function getWindow(node) { + if (node && node.document && node.setTimeout) { + return node; + } + var doc = node.ownerDocument || node; + return doc.defaultView || doc.parentWindow; + }, + getDocument: getDocument, + offset: function offset(el, value, option) { + if (typeof value !== 'undefined') { + setOffset(el, value, option || {}); + } else { + return getOffset(el); + } + }, + isWindow: isWindow, + each: each, + css: css, + clone: function clone(obj) { + var i; + var ret = {}; + for (i in obj) { + if (obj.hasOwnProperty(i)) { + ret[i] = obj[i]; + } + } + var overflow = obj.overflow; + if (overflow) { + for (i in obj) { + if (obj.hasOwnProperty(i)) { + ret.overflow[i] = obj.overflow[i]; + } + } + } + return ret; + }, + mix: mix, + getWindowScrollLeft: function getWindowScrollLeft(w) { + return getScrollLeft(w); + }, + getWindowScrollTop: function getWindowScrollTop(w) { + return getScrollTop(w); + }, + merge: function merge() { + var ret = {}; + for (var i = 0; i < arguments.length; i++) { + utils.mix(ret, i < 0 || arguments.length <= i ? undefined : arguments[i]); + } + return ret; + }, + viewportWidth: 0, + viewportHeight: 0 +}; +mix(utils, domUtils); + +/** + * 得到会导致元素显示不全的祖先元素 + */ +var getParent = utils.getParent; +function getOffsetParent(element) { + if (utils.isWindow(element) || element.nodeType === 9) { + return null; + } + // ie 这个也不是完全可行 + /* +
+
+ 元素 6 高 100px 宽 50px
+
+
+ */ + // element.offsetParent does the right thing in ie7 and below. Return parent with layout! + // In other browsers it only includes elements with position absolute, relative or + // fixed, not elements with overflow set to auto or scroll. + // if (UA.ie && ieMode < 8) { + // return element.offsetParent; + // } + // 统一的 offsetParent 方法 + var doc = utils.getDocument(element); + var body = doc.body; + var parent; + var positionStyle = utils.css(element, 'position'); + var skipStatic = positionStyle === 'fixed' || positionStyle === 'absolute'; + if (!skipStatic) { + return element.nodeName.toLowerCase() === 'html' ? null : getParent(element); + } + for (parent = getParent(element); parent && parent !== body && parent.nodeType !== 9; parent = getParent(parent)) { + positionStyle = utils.css(parent, 'position'); + if (positionStyle !== 'static') { + return parent; + } + } + return null; +} + +var getParent$1 = utils.getParent; +function isAncestorFixed(element) { + if (utils.isWindow(element) || element.nodeType === 9) { + return false; + } + var doc = utils.getDocument(element); + var body = doc.body; + var parent = null; + for (parent = getParent$1(element); + // 修复元素位于 document.documentElement 下导致崩溃问题 + parent && parent !== body && parent !== doc; parent = getParent$1(parent)) { + var positionStyle = utils.css(parent, 'position'); + if (positionStyle === 'fixed') { + return true; + } + } + return false; +} + +/** + * 获得元素的显示部分的区域 + */ +function getVisibleRectForElement(element, alwaysByViewport) { + var visibleRect = { + left: 0, + right: Infinity, + top: 0, + bottom: Infinity + }; + var el = getOffsetParent(element); + var doc = utils.getDocument(element); + var win = doc.defaultView || doc.parentWindow; + var body = doc.body; + var documentElement = doc.documentElement; + + // Determine the size of the visible rect by climbing the dom accounting for + // all scrollable containers. + while (el) { + // clientWidth is zero for inline block elements in ie. + if ((navigator.userAgent.indexOf('MSIE') === -1 || el.clientWidth !== 0) && + // body may have overflow set on it, yet we still get the entire + // viewport. In some browsers, el.offsetParent may be + // document.documentElement, so check for that too. + el !== body && el !== documentElement && utils.css(el, 'overflow') !== 'visible') { + var pos = utils.offset(el); + // add border + pos.left += el.clientLeft; + pos.top += el.clientTop; + visibleRect.top = Math.max(visibleRect.top, pos.top); + visibleRect.right = Math.min(visibleRect.right, + // consider area without scrollBar + pos.left + el.clientWidth); + visibleRect.bottom = Math.min(visibleRect.bottom, pos.top + el.clientHeight); + visibleRect.left = Math.max(visibleRect.left, pos.left); + } else if (el === body || el === documentElement) { + break; + } + el = getOffsetParent(el); + } + + // Set element position to fixed + // make sure absolute element itself don't affect it's visible area + // https://github.com/ant-design/ant-design/issues/7601 + var originalPosition = null; + if (!utils.isWindow(element) && element.nodeType !== 9) { + originalPosition = element.style.position; + var position = utils.css(element, 'position'); + if (position === 'absolute') { + element.style.position = 'fixed'; + } + } + var scrollX = utils.getWindowScrollLeft(win); + var scrollY = utils.getWindowScrollTop(win); + var viewportWidth = utils.viewportWidth(win); + var viewportHeight = utils.viewportHeight(win); + var documentWidth = documentElement.scrollWidth; + var documentHeight = documentElement.scrollHeight; + + // scrollXXX on html is sync with body which means overflow: hidden on body gets wrong scrollXXX. + // We should cut this ourself. + var bodyStyle = window.getComputedStyle(body); + if (bodyStyle.overflowX === 'hidden') { + documentWidth = win.innerWidth; + } + if (bodyStyle.overflowY === 'hidden') { + documentHeight = win.innerHeight; + } + + // Reset element position after calculate the visible area + if (element.style) { + element.style.position = originalPosition; + } + if (alwaysByViewport || isAncestorFixed(element)) { + // Clip by viewport's size. + visibleRect.left = Math.max(visibleRect.left, scrollX); + visibleRect.top = Math.max(visibleRect.top, scrollY); + visibleRect.right = Math.min(visibleRect.right, scrollX + viewportWidth); + visibleRect.bottom = Math.min(visibleRect.bottom, scrollY + viewportHeight); + } else { + // Clip by document's size. + var maxVisibleWidth = Math.max(documentWidth, scrollX + viewportWidth); + visibleRect.right = Math.min(visibleRect.right, maxVisibleWidth); + var maxVisibleHeight = Math.max(documentHeight, scrollY + viewportHeight); + visibleRect.bottom = Math.min(visibleRect.bottom, maxVisibleHeight); + } + return visibleRect.top >= 0 && visibleRect.left >= 0 && visibleRect.bottom > visibleRect.top && visibleRect.right > visibleRect.left ? visibleRect : null; +} + +function adjustForViewport(elFuturePos, elRegion, visibleRect, overflow) { + var pos = utils.clone(elFuturePos); + var size = { + width: elRegion.width, + height: elRegion.height + }; + if (overflow.adjustX && pos.left < visibleRect.left) { + pos.left = visibleRect.left; + } + + // Left edge inside and right edge outside viewport, try to resize it. + if (overflow.resizeWidth && pos.left >= visibleRect.left && pos.left + size.width > visibleRect.right) { + size.width -= pos.left + size.width - visibleRect.right; + } + + // Right edge outside viewport, try to move it. + if (overflow.adjustX && pos.left + size.width > visibleRect.right) { + // 保证左边界和可视区域左边界对齐 + pos.left = Math.max(visibleRect.right - size.width, visibleRect.left); + } + + // Top edge outside viewport, try to move it. + if (overflow.adjustY && pos.top < visibleRect.top) { + pos.top = visibleRect.top; + } + + // Top edge inside and bottom edge outside viewport, try to resize it. + if (overflow.resizeHeight && pos.top >= visibleRect.top && pos.top + size.height > visibleRect.bottom) { + size.height -= pos.top + size.height - visibleRect.bottom; + } + + // Bottom edge outside viewport, try to move it. + if (overflow.adjustY && pos.top + size.height > visibleRect.bottom) { + // 保证上边界和可视区域上边界对齐 + pos.top = Math.max(visibleRect.bottom - size.height, visibleRect.top); + } + return utils.mix(pos, size); +} + +function getRegion(node) { + var offset; + var w; + var h; + if (!utils.isWindow(node) && node.nodeType !== 9) { + offset = utils.offset(node); + w = utils.outerWidth(node); + h = utils.outerHeight(node); + } else { + var win = utils.getWindow(node); + offset = { + left: utils.getWindowScrollLeft(win), + top: utils.getWindowScrollTop(win) + }; + w = utils.viewportWidth(win); + h = utils.viewportHeight(win); + } + offset.width = w; + offset.height = h; + return offset; +} + +/** + * 获取 node 上的 align 对齐点 相对于页面的坐标 + */ + +function getAlignOffset(region, align) { + var V = align.charAt(0); + var H = align.charAt(1); + var w = region.width; + var h = region.height; + var x = region.left; + var y = region.top; + if (V === 'c') { + y += h / 2; + } else if (V === 'b') { + y += h; + } + if (H === 'c') { + x += w / 2; + } else if (H === 'r') { + x += w; + } + return { + left: x, + top: y + }; +} + +function getElFuturePos(elRegion, refNodeRegion, points, offset, targetOffset) { + var p1 = getAlignOffset(refNodeRegion, points[1]); + var p2 = getAlignOffset(elRegion, points[0]); + var diff = [p2.left - p1.left, p2.top - p1.top]; + return { + left: Math.round(elRegion.left - diff[0] + offset[0] - targetOffset[0]), + top: Math.round(elRegion.top - diff[1] + offset[1] - targetOffset[1]) + }; +} + +/** + * align dom node flexibly + * @author yiminghe@gmail.com + */ + +// http://yiminghe.iteye.com/blog/1124720 + +function isFailX(elFuturePos, elRegion, visibleRect) { + return elFuturePos.left < visibleRect.left || elFuturePos.left + elRegion.width > visibleRect.right; +} +function isFailY(elFuturePos, elRegion, visibleRect) { + return elFuturePos.top < visibleRect.top || elFuturePos.top + elRegion.height > visibleRect.bottom; +} +function isCompleteFailX(elFuturePos, elRegion, visibleRect) { + return elFuturePos.left > visibleRect.right || elFuturePos.left + elRegion.width < visibleRect.left; +} +function isCompleteFailY(elFuturePos, elRegion, visibleRect) { + return elFuturePos.top > visibleRect.bottom || elFuturePos.top + elRegion.height < visibleRect.top; +} +function flip(points, reg, map) { + var ret = []; + utils.each(points, function (p) { + ret.push(p.replace(reg, function (m) { + return map[m]; + })); + }); + return ret; +} +function flipOffset(offset, index) { + offset[index] = -offset[index]; + return offset; +} +function convertOffset(str, offsetLen) { + var n; + if (/%$/.test(str)) { + n = parseInt(str.substring(0, str.length - 1), 10) / 100 * offsetLen; + } else { + n = parseInt(str, 10); + } + return n || 0; +} +function normalizeOffset(offset, el) { + offset[0] = convertOffset(offset[0], el.width); + offset[1] = convertOffset(offset[1], el.height); +} + +/** + * @param el + * @param tgtRegion 参照节点所占的区域: { left, top, width, height } + * @param align + */ +function doAlign(el, tgtRegion, align, isTgtRegionVisible) { + var points = align.points; + var offset = align.offset || [0, 0]; + var targetOffset = align.targetOffset || [0, 0]; + var overflow = align.overflow; + var source = align.source || el; + offset = [].concat(offset); + targetOffset = [].concat(targetOffset); + overflow = overflow || {}; + var newOverflowCfg = {}; + var fail = 0; + var alwaysByViewport = !!(overflow && overflow.alwaysByViewport); + // 当前节点可以被放置的显示区域 + var visibleRect = getVisibleRectForElement(source, alwaysByViewport); + // 当前节点所占的区域, left/top/width/height + var elRegion = getRegion(source); + // 将 offset 转换成数值,支持百分比 + normalizeOffset(offset, elRegion); + normalizeOffset(targetOffset, tgtRegion); + // 当前节点将要被放置的位置 + var elFuturePos = getElFuturePos(elRegion, tgtRegion, points, offset, targetOffset); + // 当前节点将要所处的区域 + var newElRegion = utils.merge(elRegion, elFuturePos); + + // 如果可视区域不能完全放置当前节点时允许调整 + if (visibleRect && (overflow.adjustX || overflow.adjustY) && isTgtRegionVisible) { + if (overflow.adjustX) { + // 如果横向不能放下 + if (isFailX(elFuturePos, elRegion, visibleRect)) { + // 对齐位置反下 + var newPoints = flip(points, /[lr]/gi, { + l: 'r', + r: 'l' + }); + // 偏移量也反下 + var newOffset = flipOffset(offset, 0); + var newTargetOffset = flipOffset(targetOffset, 0); + var newElFuturePos = getElFuturePos(elRegion, tgtRegion, newPoints, newOffset, newTargetOffset); + if (!isCompleteFailX(newElFuturePos, elRegion, visibleRect)) { + fail = 1; + points = newPoints; + offset = newOffset; + targetOffset = newTargetOffset; + } + } + } + if (overflow.adjustY) { + // 如果纵向不能放下 + if (isFailY(elFuturePos, elRegion, visibleRect)) { + // 对齐位置反下 + var _newPoints = flip(points, /[tb]/gi, { + t: 'b', + b: 't' + }); + // 偏移量也反下 + var _newOffset = flipOffset(offset, 1); + var _newTargetOffset = flipOffset(targetOffset, 1); + var _newElFuturePos = getElFuturePos(elRegion, tgtRegion, _newPoints, _newOffset, _newTargetOffset); + if (!isCompleteFailY(_newElFuturePos, elRegion, visibleRect)) { + fail = 1; + points = _newPoints; + offset = _newOffset; + targetOffset = _newTargetOffset; + } + } + } + + // 如果失败,重新计算当前节点将要被放置的位置 + if (fail) { + elFuturePos = getElFuturePos(elRegion, tgtRegion, points, offset, targetOffset); + utils.mix(newElRegion, elFuturePos); + } + var isStillFailX = isFailX(elFuturePos, elRegion, visibleRect); + var isStillFailY = isFailY(elFuturePos, elRegion, visibleRect); + // 检查反下后的位置是否可以放下了,如果仍然放不下: + // 1. 复原修改过的定位参数 + if (isStillFailX || isStillFailY) { + var _newPoints2 = points; + + // 重置对应部分的翻转逻辑 + if (isStillFailX) { + _newPoints2 = flip(points, /[lr]/gi, { + l: 'r', + r: 'l' + }); + } + if (isStillFailY) { + _newPoints2 = flip(points, /[tb]/gi, { + t: 'b', + b: 't' + }); + } + points = _newPoints2; + offset = align.offset || [0, 0]; + targetOffset = align.targetOffset || [0, 0]; + } + // 2. 只有指定了可以调整当前方向才调整 + newOverflowCfg.adjustX = overflow.adjustX && isStillFailX; + newOverflowCfg.adjustY = overflow.adjustY && isStillFailY; + + // 确实要调整,甚至可能会调整高度宽度 + if (newOverflowCfg.adjustX || newOverflowCfg.adjustY) { + newElRegion = adjustForViewport(elFuturePos, elRegion, visibleRect, newOverflowCfg); + } + } + + // need judge to in case set fixed with in css on height auto element + if (newElRegion.width !== elRegion.width) { + utils.css(source, 'width', utils.width(source) + newElRegion.width - elRegion.width); + } + if (newElRegion.height !== elRegion.height) { + utils.css(source, 'height', utils.height(source) + newElRegion.height - elRegion.height); + } + + // https://github.com/kissyteam/kissy/issues/190 + // 相对于屏幕位置没变,而 left/top 变了 + // 例如
+ utils.offset(source, { + left: newElRegion.left, + top: newElRegion.top + }, { + useCssRight: align.useCssRight, + useCssBottom: align.useCssBottom, + useCssTransform: align.useCssTransform, + ignoreShake: align.ignoreShake + }); + return { + points: points, + offset: offset, + targetOffset: targetOffset, + overflow: newOverflowCfg + }; +} +/** + * 2012-04-26 yiminghe@gmail.com + * - 优化智能对齐算法 + * - 慎用 resizeXX + * + * 2011-07-13 yiminghe@gmail.com note: + * - 增加智能对齐,以及大小调整选项 + **/ + +function isOutOfVisibleRect(target, alwaysByViewport) { + var visibleRect = getVisibleRectForElement(target, alwaysByViewport); + var targetRegion = getRegion(target); + return !visibleRect || targetRegion.left + targetRegion.width <= visibleRect.left || targetRegion.top + targetRegion.height <= visibleRect.top || targetRegion.left >= visibleRect.right || targetRegion.top >= visibleRect.bottom; +} +function alignElement(el, refNode, align) { + var target = align.target || refNode; + var refNodeRegion = getRegion(target); + var isTargetNotOutOfVisible = !isOutOfVisibleRect(target, align.overflow && align.overflow.alwaysByViewport); + return doAlign(el, refNodeRegion, align, isTargetNotOutOfVisible); +} +alignElement.__getOffsetParent = getOffsetParent; +alignElement.__getVisibleRectForElement = getVisibleRectForElement; + +/** + * `tgtPoint`: { pageX, pageY } or { clientX, clientY }. + * If client position provided, will internal convert to page position. + */ + +function alignPoint(el, tgtPoint, align) { + var pageX; + var pageY; + var doc = utils.getDocument(el); + var win = doc.defaultView || doc.parentWindow; + var scrollX = utils.getWindowScrollLeft(win); + var scrollY = utils.getWindowScrollTop(win); + var viewportWidth = utils.viewportWidth(win); + var viewportHeight = utils.viewportHeight(win); + if ('pageX' in tgtPoint) { + pageX = tgtPoint.pageX; + } else { + pageX = scrollX + tgtPoint.clientX; + } + if ('pageY' in tgtPoint) { + pageY = tgtPoint.pageY; + } else { + pageY = scrollY + tgtPoint.clientY; + } + var tgtRegion = { + left: pageX, + top: pageY, + width: 0, + height: 0 + }; + var pointInView = pageX >= 0 && pageX <= scrollX + viewportWidth && pageY >= 0 && pageY <= scrollY + viewportHeight; + + // Provide default target point + var points = [align.points[0], 'cc']; + return doAlign(el, tgtRegion, _objectSpread2(_objectSpread2({}, align), {}, { + points: points + }), pointInView); +} + +/* harmony default export */ var dist_web = (alignElement); + +//# sourceMappingURL=index.js.map + +// EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js +var warning = __webpack_require__("Kwbf"); + +// CONCATENATED MODULE: ./node_modules/rc-util/es/isEqual.js + + + +/** + * Deeply compares two object literals. + * @param obj1 object 1 + * @param obj2 object 2 + * @param shallow shallow compare + * @returns + */ +function isEqual(obj1, obj2) { + var shallow = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + // https://github.com/mapbox/mapbox-gl-js/pull/5979/files#diff-fde7145050c47cc3a306856efd5f9c3016e86e859de9afbd02c879be5067e58f + var refSet = new Set(); + function deepEqual(a, b) { + var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; + var circular = refSet.has(a); + Object(warning["a" /* default */])(!circular, 'Warning: There may be circular references'); + if (circular) { + return false; + } + if (a === b) { + return true; + } + if (shallow && level > 1) { + return false; + } + refSet.add(a); + var newLevel = level + 1; + if (Array.isArray(a)) { + if (!Array.isArray(b) || a.length !== b.length) { + return false; + } + for (var i = 0; i < a.length; i++) { + if (!deepEqual(a[i], b[i], newLevel)) { + return false; + } + } + return true; + } + if (a && b && Object(esm_typeof["a" /* default */])(a) === 'object' && Object(esm_typeof["a" /* default */])(b) === 'object') { + var keys = Object.keys(a); + if (keys.length !== Object.keys(b).length) { + return false; + } + return keys.every(function (key) { + return deepEqual(a[key], b[key], newLevel); + }); + } + // other + return false; + } + return deepEqual(obj1, obj2); +} +/* harmony default export */ var es_isEqual = (isEqual); +// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/addEventListener.js +var addEventListener = __webpack_require__("zT1h"); + +// CONCATENATED MODULE: ./node_modules/rc-util/es/Dom/isVisible.js +/* harmony default export */ var isVisible = (function (element) { + if (!element) { + return false; + } + if (element instanceof Element) { + if (element.offsetParent) { + return true; + } + if (element.getBBox) { + var _getBBox = element.getBBox(), + width = _getBBox.width, + height = _getBBox.height; + if (width || height) { + return true; + } + } + if (element.getBoundingClientRect) { + var _element$getBoundingC = element.getBoundingClientRect(), + _width = _element$getBoundingC.width, + _height = _element$getBoundingC.height; + if (_width || _height) { + return true; + } + } + } + return false; +}); +// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useLayoutEffect.js +var useLayoutEffect = __webpack_require__("TNol"); + +// EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js +var es_ref = __webpack_require__("c+Xe"); + +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__("q1tI"); +var react_default = /*#__PURE__*/__webpack_require__.n(react); + +// CONCATENATED MODULE: ./node_modules/rc-align/es/hooks/useBuffer.js + +/* harmony default export */ var useBuffer = (function (callback, buffer) { + var calledRef = react_default.a.useRef(false); + var timeoutRef = react_default.a.useRef(null); + + function cancelTrigger() { + window.clearTimeout(timeoutRef.current); + } + + function trigger(force) { + cancelTrigger(); + + if (!calledRef.current || force === true) { + if (callback(force) === false) { + // Not delay since callback cancelled self + return; + } + + calledRef.current = true; + timeoutRef.current = window.setTimeout(function () { + calledRef.current = false; + }, buffer); + } else { + timeoutRef.current = window.setTimeout(function () { + calledRef.current = false; + trigger(); + }, buffer); + } + } + + return [trigger, function () { + calledRef.current = false; + cancelTrigger(); + }]; +}); +// EXTERNAL MODULE: ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +var ResizeObserver_es = __webpack_require__("bdgK"); + +// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/contains.js +var contains = __webpack_require__("l4aY"); + +// CONCATENATED MODULE: ./node_modules/rc-align/es/util.js + + + +function isSamePoint(prev, next) { + if (prev === next) return true; + if (!prev || !next) return false; + + if ('pageX' in next && 'pageY' in next) { + return prev.pageX === next.pageX && prev.pageY === next.pageY; + } + + if ('clientX' in next && 'clientY' in next) { + return prev.clientX === next.clientX && prev.clientY === next.clientY; + } + + return false; +} +function restoreFocus(activeElement, container) { + // Focus back if is in the container + if (activeElement !== document.activeElement && Object(contains["a" /* default */])(container, activeElement) && typeof activeElement.focus === 'function') { + activeElement.focus(); + } +} +function monitorResize(element, callback) { + var prevWidth = null; + var prevHeight = null; + + function onResize(_ref) { + var _ref2 = Object(slicedToArray["a" /* default */])(_ref, 1), + target = _ref2[0].target; + + if (!document.documentElement.contains(target)) return; + + var _target$getBoundingCl = target.getBoundingClientRect(), + width = _target$getBoundingCl.width, + height = _target$getBoundingCl.height; + + var fixedWidth = Math.floor(width); + var fixedHeight = Math.floor(height); + + if (prevWidth !== fixedWidth || prevHeight !== fixedHeight) { + // https://webkit.org/blog/9997/resizeobserver-in-webkit/ + Promise.resolve().then(function () { + callback({ + width: fixedWidth, + height: fixedHeight + }); + }); + } + + prevWidth = fixedWidth; + prevHeight = fixedHeight; + } + + var resizeObserver = new ResizeObserver_es["default"](onResize); + + if (element) { + resizeObserver.observe(element); + } + + return function () { + resizeObserver.disconnect(); + }; +} +// CONCATENATED MODULE: ./node_modules/rc-align/es/Align.js + + + +/** + * Removed props: + * - childrenProps + */ + + + + + + + + + + +function getElement(func) { + if (typeof func !== 'function') return null; + return func(); +} + +function getPoint(point) { + if (Object(esm_typeof["a" /* default */])(point) !== 'object' || !point) return null; + return point; +} + +var Align_Align = function Align(_ref, ref) { + var children = _ref.children, + disabled = _ref.disabled, + target = _ref.target, + align = _ref.align, + onAlign = _ref.onAlign, + monitorWindowResize = _ref.monitorWindowResize, + _ref$monitorBufferTim = _ref.monitorBufferTime, + monitorBufferTime = _ref$monitorBufferTim === void 0 ? 0 : _ref$monitorBufferTim; + var cacheRef = react_default.a.useRef({}); + /** Popup node ref */ + + var nodeRef = react_default.a.useRef(); + var childNode = react_default.a.Children.only(children); // ===================== Align ====================== + // We save the props here to avoid closure makes props ood + + var forceAlignPropsRef = react_default.a.useRef({}); + forceAlignPropsRef.current.disabled = disabled; + forceAlignPropsRef.current.target = target; + forceAlignPropsRef.current.align = align; + forceAlignPropsRef.current.onAlign = onAlign; + + var _useBuffer = useBuffer(function () { + var _forceAlignPropsRef$c = forceAlignPropsRef.current, + latestDisabled = _forceAlignPropsRef$c.disabled, + latestTarget = _forceAlignPropsRef$c.target, + latestAlign = _forceAlignPropsRef$c.align, + latestOnAlign = _forceAlignPropsRef$c.onAlign; + var source = nodeRef.current; + + if (!latestDisabled && latestTarget && source) { + var _result; + + var _element = getElement(latestTarget); + + var _point = getPoint(latestTarget); + + cacheRef.current.element = _element; + cacheRef.current.point = _point; + cacheRef.current.align = latestAlign; // IE lose focus after element realign + // We should record activeElement and restore later + + var _document = document, + activeElement = _document.activeElement; // We only align when element is visible + + if (_element && isVisible(_element)) { + _result = alignElement(source, _element, latestAlign); + } else if (_point) { + _result = alignPoint(source, _point, latestAlign); + } + + restoreFocus(activeElement, source); + + if (latestOnAlign && _result) { + latestOnAlign(source, _result); + } + + return true; + } + + return false; + }, monitorBufferTime), + _useBuffer2 = Object(slicedToArray["a" /* default */])(_useBuffer, 2), + _forceAlign = _useBuffer2[0], + cancelForceAlign = _useBuffer2[1]; // ===================== Effect ===================== + // Handle props change + + + var _React$useState = react_default.a.useState(), + _React$useState2 = Object(slicedToArray["a" /* default */])(_React$useState, 2), + element = _React$useState2[0], + setElement = _React$useState2[1]; + + var _React$useState3 = react_default.a.useState(), + _React$useState4 = Object(slicedToArray["a" /* default */])(_React$useState3, 2), + point = _React$useState4[0], + setPoint = _React$useState4[1]; + + Object(useLayoutEffect["a" /* default */])(function () { + setElement(getElement(target)); + setPoint(getPoint(target)); + }); + react_default.a.useEffect(function () { + if (cacheRef.current.element !== element || !isSamePoint(cacheRef.current.point, point) || !es_isEqual(cacheRef.current.align, align)) { + _forceAlign(); + } + }); // Watch popup element resize + + react_default.a.useEffect(function () { + var cancelFn = monitorResize(nodeRef.current, _forceAlign); + return cancelFn; + }, [nodeRef.current]); // Watch target element resize + + react_default.a.useEffect(function () { + var cancelFn = monitorResize(element, _forceAlign); + return cancelFn; + }, [element]); // Listen for disabled change + + react_default.a.useEffect(function () { + if (!disabled) { + _forceAlign(); + } else { + cancelForceAlign(); + } + }, [disabled]); // Listen for window resize + + react_default.a.useEffect(function () { + if (monitorWindowResize) { + var cancelFn = Object(addEventListener["a" /* default */])(window, 'resize', _forceAlign); + return cancelFn.remove; + } + }, [monitorWindowResize]); // Clear all if unmount + + react_default.a.useEffect(function () { + return function () { + cancelForceAlign(); + }; + }, []); // ====================== Ref ======================= + + react_default.a.useImperativeHandle(ref, function () { + return { + forceAlign: function forceAlign() { + return _forceAlign(true); + } + }; + }); // ===================== Render ===================== + + if ( /*#__PURE__*/react_default.a.isValidElement(childNode)) { + childNode = /*#__PURE__*/react_default.a.cloneElement(childNode, { + ref: Object(es_ref["a" /* composeRef */])(childNode.ref, nodeRef) + }); + } + + return childNode; +}; + +var RcAlign = /*#__PURE__*/react_default.a.forwardRef(Align_Align); +RcAlign.displayName = 'Align'; +/* harmony default export */ var es_Align = (RcAlign); +// CONCATENATED MODULE: ./node_modules/rc-align/es/index.js +// export this package's api + +/* harmony default export */ var es = __webpack_exports__["a"] = (es_Align); + +/***/ }), + +/***/ "9og8": +/*!**********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.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 _asyncToGenerator; }); +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(_next, _throw); + } +} + +function _asyncToGenerator(fn) { + return function () { + var self = this, + args = arguments; + return new Promise(function (resolve, reject) { + var gen = fn.apply(self, args); + + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); + } + + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); + } + + _next(undefined); + }); + }; +} + +/***/ }), + +/***/ "9tb/": +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.from-code-point.js ***! + \*******************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "I8vh"); + +var fromCharCode = String.fromCharCode; +var nativeFromCodePoint = String.fromCodePoint; + +// length should be 1, old FF problem +var INCORRECT_LENGTH = !!nativeFromCodePoint && nativeFromCodePoint.length != 1; + +// `String.fromCodePoint` method +// https://tc39.github.io/ecma262/#sec-string.fromcodepoint +$({ target: 'String', stat: true, forced: INCORRECT_LENGTH }, { + fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars + var elements = []; + var length = arguments.length; + var i = 0; + var code; + while (length > i) { + code = +arguments[i++]; + if (toAbsoluteIndex(code, 0x10FFFF) !== code) throw RangeError(code + ' is not a valid code point'); + elements.push(code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xD800, code % 0x400 + 0xDC00) + ); + } return elements.join(''); + } +}); + + +/***/ }), + +/***/ "9xmf": +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray */ "EdiO"); + +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return arrayLikeToArray(arr); +} + +module.exports = _arrayWithoutHoles; + +/***/ }), + +/***/ "A2ZE": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/internals/function-bind-context.js ***! + \*****************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM"); + +// optional / simple context binding +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 0: return function () { + return fn.call(that); + }; + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; + + +/***/ }), + +/***/ "ACnJ": +/*!*********************************************************!*\ + !*** ./node_modules/antd/es/_util/responsiveObserve.js ***! + \*********************************************************/ +/*! exports provided: responsiveArray, responsiveMap, default */ +/*! exports used: default, responsiveArray */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return responsiveArray; }); +/* unused harmony export responsiveMap */ +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "lSNA"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "pVnL"); +/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__); + + +var responsiveArray = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs']; +var responsiveMap = { + xs: '(max-width: 575px)', + sm: '(min-width: 576px)', + md: '(min-width: 768px)', + lg: '(min-width: 992px)', + xl: '(min-width: 1200px)', + xxl: '(min-width: 1600px)' +}; +var subscribers = new Map(); +var subUid = -1; +var screens = {}; +var responsiveObserve = { + matchHandlers: {}, + dispatch: function dispatch(pointMap) { + screens = pointMap; + subscribers.forEach(function (func) { + return func(screens); + }); + return subscribers.size >= 1; + }, + subscribe: function subscribe(func) { + if (!subscribers.size) this.register(); + subUid += 1; + subscribers.set(subUid, func); + func(screens); + return subUid; + }, + unsubscribe: function unsubscribe(token) { + subscribers["delete"](token); + if (!subscribers.size) this.unregister(); + }, + unregister: function unregister() { + var _this = this; + + Object.keys(responsiveMap).forEach(function (screen) { + var matchMediaQuery = responsiveMap[screen]; + var handler = _this.matchHandlers[matchMediaQuery]; + handler === null || handler === void 0 ? void 0 : handler.mql.removeListener(handler === null || handler === void 0 ? void 0 : handler.listener); + }); + subscribers.clear(); + }, + register: function register() { + var _this2 = this; + + Object.keys(responsiveMap).forEach(function (screen) { + var matchMediaQuery = responsiveMap[screen]; + + var listener = function listener(_ref) { + var matches = _ref.matches; + + _this2.dispatch(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, screens), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, screen, matches))); + }; + + var mql = window.matchMedia(matchMediaQuery); + mql.addListener(listener); + _this2.matchHandlers[matchMediaQuery] = { + mql: mql, + listener: listener + }; + listener(mql); + }); + } +}; +/* harmony default export */ __webpack_exports__["a"] = (responsiveObserve); + +/***/ }), + +/***/ "AJpP": +/*!***********************************************************************!*\ + !*** ./node_modules/@ant-design/colors/dist/index.esm.js + 4 modules ***! + \***********************************************************************/ +/*! exports provided: blue, cyan, geekblue, generate, gold, green, grey, lime, magenta, orange, presetDarkPalettes, presetPalettes, presetPrimaryColors, purple, red, volcano, yellow */ +/*! all exports used */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// EXPORTS +__webpack_require__.d(__webpack_exports__, "blue", function() { return /* binding */ blue; }); +__webpack_require__.d(__webpack_exports__, "cyan", function() { return /* binding */ cyan; }); +__webpack_require__.d(__webpack_exports__, "geekblue", function() { return /* binding */ geekblue; }); +__webpack_require__.d(__webpack_exports__, "generate", function() { return /* binding */ generate; }); +__webpack_require__.d(__webpack_exports__, "gold", function() { return /* binding */ gold; }); +__webpack_require__.d(__webpack_exports__, "green", function() { return /* binding */ green; }); +__webpack_require__.d(__webpack_exports__, "grey", function() { return /* binding */ grey; }); +__webpack_require__.d(__webpack_exports__, "lime", function() { return /* binding */ lime; }); +__webpack_require__.d(__webpack_exports__, "magenta", function() { return /* binding */ magenta; }); +__webpack_require__.d(__webpack_exports__, "orange", function() { return /* binding */ orange; }); +__webpack_require__.d(__webpack_exports__, "presetDarkPalettes", function() { return /* binding */ presetDarkPalettes; }); +__webpack_require__.d(__webpack_exports__, "presetPalettes", function() { return /* binding */ presetPalettes; }); +__webpack_require__.d(__webpack_exports__, "presetPrimaryColors", function() { return /* binding */ presetPrimaryColors; }); +__webpack_require__.d(__webpack_exports__, "purple", function() { return /* binding */ purple; }); +__webpack_require__.d(__webpack_exports__, "red", function() { return /* binding */ red; }); +__webpack_require__.d(__webpack_exports__, "volcano", function() { return /* binding */ volcano; }); +__webpack_require__.d(__webpack_exports__, "yellow", function() { return /* binding */ yellow; }); + +// CONCATENATED MODULE: ./node_modules/@ctrl/tinycolor/dist/module/util.js +/** + * Take input from [0, n] and return it as [0, 1] + * @hidden + */ +function bound01(n, max) { + if (isOnePointZero(n)) { + n = '100%'; + } + var isPercent = isPercentage(n); + n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n))); + // Automatically convert percentage into number + if (isPercent) { + n = parseInt(String(n * max), 10) / 100; + } + // Handle floating point rounding errors + if (Math.abs(n - max) < 0.000001) { + return 1; + } + // Convert into [0, 1] range if it isn't already + if (max === 360) { + // If n is a hue given in degrees, + // wrap around out-of-range values into [0, 360] range + // then convert into [0, 1]. + n = (n < 0 ? (n % max) + max : n % max) / parseFloat(String(max)); + } + else { + // If n not a hue given in degrees + // Convert into [0, 1] range if it isn't already. + n = (n % max) / parseFloat(String(max)); + } + return n; +} +/** + * Force a number between 0 and 1 + * @hidden + */ +function clamp01(val) { + return Math.min(1, Math.max(0, val)); +} +/** + * Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1 + * + * @hidden + */ +function isOnePointZero(n) { + return typeof n === 'string' && n.indexOf('.') !== -1 && parseFloat(n) === 1; +} +/** + * Check to see if string passed in is a percentage + * @hidden + */ +function isPercentage(n) { + return typeof n === 'string' && n.indexOf('%') !== -1; +} +/** + * Return a valid alpha value [0,1] with all invalid values being set to 1 + * @hidden + */ +function boundAlpha(a) { + a = parseFloat(a); + if (isNaN(a) || a < 0 || a > 1) { + a = 1; + } + return a; +} +/** + * Replace a decimal with it's percentage value + * @hidden + */ +function convertToPercentage(n) { + if (n <= 1) { + return "".concat(Number(n) * 100, "%"); + } + return n; +} +/** + * Force a hex value to have 2 characters + * @hidden + */ +function pad2(c) { + return c.length === 1 ? '0' + c : String(c); +} + +// CONCATENATED MODULE: ./node_modules/@ctrl/tinycolor/dist/module/conversion.js + +// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from: +// +/** + * Handle bounds / percentage checking to conform to CSS color spec + * + * *Assumes:* r, g, b in [0, 255] or [0, 1] + * *Returns:* { r, g, b } in [0, 255] + */ +function rgbToRgb(r, g, b) { + return { + r: bound01(r, 255) * 255, + g: bound01(g, 255) * 255, + b: bound01(b, 255) * 255, + }; +} +/** + * Converts an RGB color value to HSL. + * *Assumes:* r, g, and b are contained in [0, 255] or [0, 1] + * *Returns:* { h, s, l } in [0,1] + */ +function rgbToHsl(r, g, b) { + r = bound01(r, 255); + g = bound01(g, 255); + b = bound01(b, 255); + var max = Math.max(r, g, b); + var min = Math.min(r, g, b); + var h = 0; + var s = 0; + var l = (max + min) / 2; + if (max === min) { + s = 0; + h = 0; // achromatic + } + else { + var d = max - min; + s = l > 0.5 ? d / (2 - max - min) : d / (max + min); + switch (max) { + case r: + h = (g - b) / d + (g < b ? 6 : 0); + break; + case g: + h = (b - r) / d + 2; + break; + case b: + h = (r - g) / d + 4; + break; + default: + break; + } + h /= 6; + } + return { h: h, s: s, l: l }; +} +function hue2rgb(p, q, t) { + if (t < 0) { + t += 1; + } + if (t > 1) { + t -= 1; + } + if (t < 1 / 6) { + return p + (q - p) * (6 * t); + } + if (t < 1 / 2) { + return q; + } + if (t < 2 / 3) { + return p + (q - p) * (2 / 3 - t) * 6; + } + return p; +} +/** + * Converts an HSL color value to RGB. + * + * *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100] + * *Returns:* { r, g, b } in the set [0, 255] + */ +function hslToRgb(h, s, l) { + var r; + var g; + var b; + h = bound01(h, 360); + s = bound01(s, 100); + l = bound01(l, 100); + if (s === 0) { + // achromatic + g = l; + b = l; + r = l; + } + else { + var q = l < 0.5 ? l * (1 + s) : l + s - l * s; + var p = 2 * l - q; + r = hue2rgb(p, q, h + 1 / 3); + g = hue2rgb(p, q, h); + b = hue2rgb(p, q, h - 1 / 3); + } + return { r: r * 255, g: g * 255, b: b * 255 }; +} +/** + * Converts an RGB color value to HSV + * + * *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1] + * *Returns:* { h, s, v } in [0,1] + */ +function rgbToHsv(r, g, b) { + r = bound01(r, 255); + g = bound01(g, 255); + b = bound01(b, 255); + var max = Math.max(r, g, b); + var min = Math.min(r, g, b); + var h = 0; + var v = max; + var d = max - min; + var s = max === 0 ? 0 : d / max; + if (max === min) { + h = 0; // achromatic + } + else { + switch (max) { + case r: + h = (g - b) / d + (g < b ? 6 : 0); + break; + case g: + h = (b - r) / d + 2; + break; + case b: + h = (r - g) / d + 4; + break; + default: + break; + } + h /= 6; + } + return { h: h, s: s, v: v }; +} +/** + * Converts an HSV color value to RGB. + * + * *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100] + * *Returns:* { r, g, b } in the set [0, 255] + */ +function hsvToRgb(h, s, v) { + h = bound01(h, 360) * 6; + s = bound01(s, 100); + v = bound01(v, 100); + var i = Math.floor(h); + var f = h - i; + var p = v * (1 - s); + var q = v * (1 - f * s); + var t = v * (1 - (1 - f) * s); + var mod = i % 6; + var r = [v, q, p, p, t, v][mod]; + var g = [t, v, v, q, p, p][mod]; + var b = [p, p, t, v, v, q][mod]; + return { r: r * 255, g: g * 255, b: b * 255 }; +} +/** + * Converts an RGB color to hex + * + * Assumes r, g, and b are contained in the set [0, 255] + * Returns a 3 or 6 character hex + */ +function rgbToHex(r, g, b, allow3Char) { + var hex = [ + pad2(Math.round(r).toString(16)), + pad2(Math.round(g).toString(16)), + pad2(Math.round(b).toString(16)), + ]; + // Return a 3 character hex if possible + if (allow3Char && + hex[0].startsWith(hex[0].charAt(1)) && + hex[1].startsWith(hex[1].charAt(1)) && + hex[2].startsWith(hex[2].charAt(1))) { + return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); + } + return hex.join(''); +} +/** + * Converts an RGBA color plus alpha transparency to hex + * + * Assumes r, g, b are contained in the set [0, 255] and + * a in [0, 1]. Returns a 4 or 8 character rgba hex + */ +// eslint-disable-next-line max-params +function rgbaToHex(r, g, b, a, allow4Char) { + var hex = [ + pad2(Math.round(r).toString(16)), + pad2(Math.round(g).toString(16)), + pad2(Math.round(b).toString(16)), + pad2(convertDecimalToHex(a)), + ]; + // Return a 4 character hex if possible + if (allow4Char && + hex[0].startsWith(hex[0].charAt(1)) && + hex[1].startsWith(hex[1].charAt(1)) && + hex[2].startsWith(hex[2].charAt(1)) && + hex[3].startsWith(hex[3].charAt(1))) { + return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0); + } + return hex.join(''); +} +/** + * Converts an RGBA color to an ARGB Hex8 string + * Rarely used, but required for "toFilter()" + */ +function rgbaToArgbHex(r, g, b, a) { + var hex = [ + pad2(convertDecimalToHex(a)), + pad2(Math.round(r).toString(16)), + pad2(Math.round(g).toString(16)), + pad2(Math.round(b).toString(16)), + ]; + return hex.join(''); +} +/** Converts a decimal to a hex value */ +function convertDecimalToHex(d) { + return Math.round(parseFloat(d) * 255).toString(16); +} +/** Converts a hex value to a decimal */ +function convertHexToDecimal(h) { + return parseIntFromHex(h) / 255; +} +/** Parse a base-16 hex value into a base-10 integer */ +function parseIntFromHex(val) { + return parseInt(val, 16); +} +function numberInputToObject(color) { + return { + r: color >> 16, + g: (color & 0xff00) >> 8, + b: color & 0xff, + }; +} + +// CONCATENATED MODULE: ./node_modules/@ctrl/tinycolor/dist/module/css-color-names.js +// https://github.com/bahamas10/css-color-names/blob/master/css-color-names.json +/** + * @hidden + */ +var names = { + aliceblue: '#f0f8ff', + antiquewhite: '#faebd7', + aqua: '#00ffff', + aquamarine: '#7fffd4', + azure: '#f0ffff', + beige: '#f5f5dc', + bisque: '#ffe4c4', + black: '#000000', + blanchedalmond: '#ffebcd', + blue: '#0000ff', + blueviolet: '#8a2be2', + brown: '#a52a2a', + burlywood: '#deb887', + cadetblue: '#5f9ea0', + chartreuse: '#7fff00', + chocolate: '#d2691e', + coral: '#ff7f50', + cornflowerblue: '#6495ed', + cornsilk: '#fff8dc', + crimson: '#dc143c', + cyan: '#00ffff', + darkblue: '#00008b', + darkcyan: '#008b8b', + darkgoldenrod: '#b8860b', + darkgray: '#a9a9a9', + darkgreen: '#006400', + darkgrey: '#a9a9a9', + darkkhaki: '#bdb76b', + darkmagenta: '#8b008b', + darkolivegreen: '#556b2f', + darkorange: '#ff8c00', + darkorchid: '#9932cc', + darkred: '#8b0000', + darksalmon: '#e9967a', + darkseagreen: '#8fbc8f', + darkslateblue: '#483d8b', + darkslategray: '#2f4f4f', + darkslategrey: '#2f4f4f', + darkturquoise: '#00ced1', + darkviolet: '#9400d3', + deeppink: '#ff1493', + deepskyblue: '#00bfff', + dimgray: '#696969', + dimgrey: '#696969', + dodgerblue: '#1e90ff', + firebrick: '#b22222', + floralwhite: '#fffaf0', + forestgreen: '#228b22', + fuchsia: '#ff00ff', + gainsboro: '#dcdcdc', + ghostwhite: '#f8f8ff', + goldenrod: '#daa520', + gold: '#ffd700', + gray: '#808080', + green: '#008000', + greenyellow: '#adff2f', + grey: '#808080', + honeydew: '#f0fff0', + hotpink: '#ff69b4', + indianred: '#cd5c5c', + indigo: '#4b0082', + ivory: '#fffff0', + khaki: '#f0e68c', + lavenderblush: '#fff0f5', + lavender: '#e6e6fa', + lawngreen: '#7cfc00', + lemonchiffon: '#fffacd', + lightblue: '#add8e6', + lightcoral: '#f08080', + lightcyan: '#e0ffff', + lightgoldenrodyellow: '#fafad2', + lightgray: '#d3d3d3', + lightgreen: '#90ee90', + lightgrey: '#d3d3d3', + lightpink: '#ffb6c1', + lightsalmon: '#ffa07a', + lightseagreen: '#20b2aa', + lightskyblue: '#87cefa', + lightslategray: '#778899', + lightslategrey: '#778899', + lightsteelblue: '#b0c4de', + lightyellow: '#ffffe0', + lime: '#00ff00', + limegreen: '#32cd32', + linen: '#faf0e6', + magenta: '#ff00ff', + maroon: '#800000', + mediumaquamarine: '#66cdaa', + mediumblue: '#0000cd', + mediumorchid: '#ba55d3', + mediumpurple: '#9370db', + mediumseagreen: '#3cb371', + mediumslateblue: '#7b68ee', + mediumspringgreen: '#00fa9a', + mediumturquoise: '#48d1cc', + mediumvioletred: '#c71585', + midnightblue: '#191970', + mintcream: '#f5fffa', + mistyrose: '#ffe4e1', + moccasin: '#ffe4b5', + navajowhite: '#ffdead', + navy: '#000080', + oldlace: '#fdf5e6', + olive: '#808000', + olivedrab: '#6b8e23', + orange: '#ffa500', + orangered: '#ff4500', + orchid: '#da70d6', + palegoldenrod: '#eee8aa', + palegreen: '#98fb98', + paleturquoise: '#afeeee', + palevioletred: '#db7093', + papayawhip: '#ffefd5', + peachpuff: '#ffdab9', + peru: '#cd853f', + pink: '#ffc0cb', + plum: '#dda0dd', + powderblue: '#b0e0e6', + purple: '#800080', + rebeccapurple: '#663399', + red: '#ff0000', + rosybrown: '#bc8f8f', + royalblue: '#4169e1', + saddlebrown: '#8b4513', + salmon: '#fa8072', + sandybrown: '#f4a460', + seagreen: '#2e8b57', + seashell: '#fff5ee', + sienna: '#a0522d', + silver: '#c0c0c0', + skyblue: '#87ceeb', + slateblue: '#6a5acd', + slategray: '#708090', + slategrey: '#708090', + snow: '#fffafa', + springgreen: '#00ff7f', + steelblue: '#4682b4', + tan: '#d2b48c', + teal: '#008080', + thistle: '#d8bfd8', + tomato: '#ff6347', + turquoise: '#40e0d0', + violet: '#ee82ee', + wheat: '#f5deb3', + white: '#ffffff', + whitesmoke: '#f5f5f5', + yellow: '#ffff00', + yellowgreen: '#9acd32', +}; + +// CONCATENATED MODULE: ./node_modules/@ctrl/tinycolor/dist/module/format-input.js +/* eslint-disable @typescript-eslint/no-redundant-type-constituents */ + + + +/** + * Given a string or object, convert that input to RGB + * + * Possible string inputs: + * ``` + * "red" + * "#f00" or "f00" + * "#ff0000" or "ff0000" + * "#ff000000" or "ff000000" + * "rgb 255 0 0" or "rgb (255, 0, 0)" + * "rgb 1.0 0 0" or "rgb (1, 0, 0)" + * "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1" + * "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1" + * "hsl(0, 100%, 50%)" or "hsl 0 100% 50%" + * "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1" + * "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" + * ``` + */ +function inputToRGB(color) { + var rgb = { r: 0, g: 0, b: 0 }; + var a = 1; + var s = null; + var v = null; + var l = null; + var ok = false; + var format = false; + if (typeof color === 'string') { + color = stringInputToObject(color); + } + if (typeof color === 'object') { + if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) { + rgb = rgbToRgb(color.r, color.g, color.b); + ok = true; + format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb'; + } + else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) { + s = convertToPercentage(color.s); + v = convertToPercentage(color.v); + rgb = hsvToRgb(color.h, s, v); + ok = true; + format = 'hsv'; + } + else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) { + s = convertToPercentage(color.s); + l = convertToPercentage(color.l); + rgb = hslToRgb(color.h, s, l); + ok = true; + format = 'hsl'; + } + if (Object.prototype.hasOwnProperty.call(color, 'a')) { + a = color.a; + } + } + a = boundAlpha(a); + return { + ok: ok, + format: color.format || format, + r: Math.min(255, Math.max(rgb.r, 0)), + g: Math.min(255, Math.max(rgb.g, 0)), + b: Math.min(255, Math.max(rgb.b, 0)), + a: a, + }; +} +// +var CSS_INTEGER = '[-\\+]?\\d+%?'; +// +var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?'; +// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome. +var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")"); +// Actual matching. +// Parentheses and commas are optional, but not required. +// Whitespace can take the place of commas or opening paren +var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?"); +var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?"); +var matchers = { + CSS_UNIT: new RegExp(CSS_UNIT), + rgb: new RegExp('rgb' + PERMISSIVE_MATCH3), + rgba: new RegExp('rgba' + PERMISSIVE_MATCH4), + hsl: new RegExp('hsl' + PERMISSIVE_MATCH3), + hsla: new RegExp('hsla' + PERMISSIVE_MATCH4), + hsv: new RegExp('hsv' + PERMISSIVE_MATCH3), + hsva: new RegExp('hsva' + PERMISSIVE_MATCH4), + hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, + hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, + hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, + hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, +}; +/** + * Permissive string parsing. Take in a number of formats, and output an object + * based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}` + */ +function stringInputToObject(color) { + color = color.trim().toLowerCase(); + if (color.length === 0) { + return false; + } + var named = false; + if (names[color]) { + color = names[color]; + named = true; + } + else if (color === 'transparent') { + return { r: 0, g: 0, b: 0, a: 0, format: 'name' }; + } + // Try to match string input using regular expressions. + // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360] + // Just return an object and let the conversion functions handle that. + // This way the result will be the same whether the tinycolor is initialized with string or object. + var match = matchers.rgb.exec(color); + if (match) { + return { r: match[1], g: match[2], b: match[3] }; + } + match = matchers.rgba.exec(color); + if (match) { + return { r: match[1], g: match[2], b: match[3], a: match[4] }; + } + match = matchers.hsl.exec(color); + if (match) { + return { h: match[1], s: match[2], l: match[3] }; + } + match = matchers.hsla.exec(color); + if (match) { + return { h: match[1], s: match[2], l: match[3], a: match[4] }; + } + match = matchers.hsv.exec(color); + if (match) { + return { h: match[1], s: match[2], v: match[3] }; + } + match = matchers.hsva.exec(color); + if (match) { + return { h: match[1], s: match[2], v: match[3], a: match[4] }; + } + match = matchers.hex8.exec(color); + if (match) { + return { + r: parseIntFromHex(match[1]), + g: parseIntFromHex(match[2]), + b: parseIntFromHex(match[3]), + a: convertHexToDecimal(match[4]), + format: named ? 'name' : 'hex8', + }; + } + match = matchers.hex6.exec(color); + if (match) { + return { + r: parseIntFromHex(match[1]), + g: parseIntFromHex(match[2]), + b: parseIntFromHex(match[3]), + format: named ? 'name' : 'hex', + }; + } + match = matchers.hex4.exec(color); + if (match) { + return { + r: parseIntFromHex(match[1] + match[1]), + g: parseIntFromHex(match[2] + match[2]), + b: parseIntFromHex(match[3] + match[3]), + a: convertHexToDecimal(match[4] + match[4]), + format: named ? 'name' : 'hex8', + }; + } + match = matchers.hex3.exec(color); + if (match) { + return { + r: parseIntFromHex(match[1] + match[1]), + g: parseIntFromHex(match[2] + match[2]), + b: parseIntFromHex(match[3] + match[3]), + format: named ? 'name' : 'hex', + }; + } + return false; +} +/** + * Check to see if it looks like a CSS unit + * (see `matchers` above for definition). + */ +function isValidCSSUnit(color) { + return Boolean(matchers.CSS_UNIT.exec(String(color))); +} + +// CONCATENATED MODULE: ./node_modules/@ant-design/colors/dist/index.esm.js + + +var hueStep = 2; // 色相阶梯 + +var saturationStep = 0.16; // 饱和度阶梯,浅色部分 + +var saturationStep2 = 0.05; // 饱和度阶梯,深色部分 + +var brightnessStep1 = 0.05; // 亮度阶梯,浅色部分 + +var brightnessStep2 = 0.15; // 亮度阶梯,深色部分 + +var lightColorCount = 5; // 浅色数量,主色上 + +var darkColorCount = 4; // 深色数量,主色下 +// 暗色主题颜色映射关系表 + +var darkColorMap = [{ + index: 7, + opacity: 0.15 +}, { + index: 6, + opacity: 0.25 +}, { + index: 5, + opacity: 0.3 +}, { + index: 5, + opacity: 0.45 +}, { + index: 5, + opacity: 0.65 +}, { + index: 5, + opacity: 0.85 +}, { + index: 4, + opacity: 0.9 +}, { + index: 3, + opacity: 0.95 +}, { + index: 2, + opacity: 0.97 +}, { + index: 1, + opacity: 0.98 +}]; // Wrapper function ported from TinyColor.prototype.toHsv +// Keep it here because of `hsv.h * 360` + +function toHsv(_ref) { + var r = _ref.r, + g = _ref.g, + b = _ref.b; + var hsv = rgbToHsv(r, g, b); + return { + h: hsv.h * 360, + s: hsv.s, + v: hsv.v + }; +} // Wrapper function ported from TinyColor.prototype.toHexString +// Keep it here because of the prefix `#` + + +function toHex(_ref2) { + var r = _ref2.r, + g = _ref2.g, + b = _ref2.b; + return "#".concat(rgbToHex(r, g, b, false)); +} // Wrapper function ported from TinyColor.prototype.mix, not treeshakable. +// Amount in range [0, 1] +// Assume color1 & color2 has no alpha, since the following src code did so. + + +function mix(rgb1, rgb2, amount) { + var p = amount / 100; + var rgb = { + r: (rgb2.r - rgb1.r) * p + rgb1.r, + g: (rgb2.g - rgb1.g) * p + rgb1.g, + b: (rgb2.b - rgb1.b) * p + rgb1.b + }; + return rgb; +} + +function getHue(hsv, i, light) { + var hue; // 根据色相不同,色相转向不同 + + if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) { + hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i; + } else { + hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i; + } + + if (hue < 0) { + hue += 360; + } else if (hue >= 360) { + hue -= 360; + } + + return hue; +} + +function getSaturation(hsv, i, light) { + // grey color don't change saturation + if (hsv.h === 0 && hsv.s === 0) { + return hsv.s; + } + + var saturation; + + if (light) { + saturation = hsv.s - saturationStep * i; + } else if (i === darkColorCount) { + saturation = hsv.s + saturationStep; + } else { + saturation = hsv.s + saturationStep2 * i; + } // 边界值修正 + + + if (saturation > 1) { + saturation = 1; + } // 第一格的 s 限制在 0.06-0.1 之间 + + + if (light && i === lightColorCount && saturation > 0.1) { + saturation = 0.1; + } + + if (saturation < 0.06) { + saturation = 0.06; + } + + return Number(saturation.toFixed(2)); +} + +function getValue(hsv, i, light) { + var value; + + if (light) { + value = hsv.v + brightnessStep1 * i; + } else { + value = hsv.v - brightnessStep2 * i; + } + + if (value > 1) { + value = 1; + } + + return Number(value.toFixed(2)); +} + +function generate(color) { + var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var patterns = []; + var pColor = inputToRGB(color); + + for (var i = lightColorCount; i > 0; i -= 1) { + var hsv = toHsv(pColor); + var colorString = toHex(inputToRGB({ + h: getHue(hsv, i, true), + s: getSaturation(hsv, i, true), + v: getValue(hsv, i, true) + })); + patterns.push(colorString); + } + + patterns.push(toHex(pColor)); + + for (var _i = 1; _i <= darkColorCount; _i += 1) { + var _hsv = toHsv(pColor); + + var _colorString = toHex(inputToRGB({ + h: getHue(_hsv, _i), + s: getSaturation(_hsv, _i), + v: getValue(_hsv, _i) + })); + + patterns.push(_colorString); + } // dark theme patterns + + + if (opts.theme === 'dark') { + return darkColorMap.map(function (_ref3) { + var index = _ref3.index, + opacity = _ref3.opacity; + var darkColorString = toHex(mix(inputToRGB(opts.backgroundColor || '#141414'), inputToRGB(patterns[index]), opacity * 100)); + return darkColorString; + }); + } + + return patterns; +} + +var presetPrimaryColors = { + red: '#F5222D', + volcano: '#FA541C', + orange: '#FA8C16', + gold: '#FAAD14', + yellow: '#FADB14', + lime: '#A0D911', + green: '#52C41A', + cyan: '#13C2C2', + blue: '#1890FF', + geekblue: '#2F54EB', + purple: '#722ED1', + magenta: '#EB2F96', + grey: '#666666' +}; +var presetPalettes = {}; +var presetDarkPalettes = {}; +Object.keys(presetPrimaryColors).forEach(function (key) { + presetPalettes[key] = generate(presetPrimaryColors[key]); + presetPalettes[key].primary = presetPalettes[key][5]; // dark presetPalettes + + presetDarkPalettes[key] = generate(presetPrimaryColors[key], { + theme: 'dark', + backgroundColor: '#141414' + }); + presetDarkPalettes[key].primary = presetDarkPalettes[key][5]; +}); +var red = presetPalettes.red; +var volcano = presetPalettes.volcano; +var gold = presetPalettes.gold; +var orange = presetPalettes.orange; +var yellow = presetPalettes.yellow; +var lime = presetPalettes.lime; +var green = presetPalettes.green; +var cyan = presetPalettes.cyan; +var blue = presetPalettes.blue; +var geekblue = presetPalettes.geekblue; +var purple = presetPalettes.purple; +var magenta = presetPalettes.magenta; +var grey = presetPalettes.grey; + + + + +/***/ }), + +/***/ "AM7I": +/*!*********************************************!*\ + !*** ./node_modules/get-intrinsic/index.js ***! + \*********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(/*! es-errors */ "pkW7"); +var $EvalError = __webpack_require__(/*! es-errors/eval */ "QX98"); +var $RangeError = __webpack_require__(/*! es-errors/range */ "3JnH"); +var $ReferenceError = __webpack_require__(/*! es-errors/ref */ "FAml"); +var $SyntaxError = __webpack_require__(/*! es-errors/syntax */ "Z+6F"); +var $TypeError = __webpack_require__(/*! es-errors/type */ "DSU0"); +var $URIError = __webpack_require__(/*! es-errors/uri */ "Z9lY"); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(/*! has-symbols */ "UVaH")(); +var hasProto = __webpack_require__(/*! has-proto */ "CjYj")(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(/*! function-bind */ "D3zA"); +var hasOwn = __webpack_require__(/*! hasown */ "lnE3"); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ "ANhw": +/*!*************************************!*\ + !*** ./node_modules/crypt/crypt.js ***! + \*************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +(function() { + var base64map + = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', + + crypt = { + // Bit-wise rotation left + rotl: function(n, b) { + return (n << b) | (n >>> (32 - b)); + }, + + // Bit-wise rotation right + rotr: function(n, b) { + return (n << (32 - b)) | (n >>> b); + }, + + // Swap big-endian to little-endian and vice versa + endian: function(n) { + // If number given, swap endian + if (n.constructor == Number) { + return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00; + } + + // Else, assume array and swap all items + for (var i = 0; i < n.length; i++) + n[i] = crypt.endian(n[i]); + return n; + }, + + // Generate an array of any length of random bytes + randomBytes: function(n) { + for (var bytes = []; n > 0; n--) + bytes.push(Math.floor(Math.random() * 256)); + return bytes; + }, + + // Convert a byte array to big-endian 32-bit words + bytesToWords: function(bytes) { + for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8) + words[b >>> 5] |= bytes[i] << (24 - b % 32); + return words; + }, + + // Convert big-endian 32-bit words to a byte array + wordsToBytes: function(words) { + for (var bytes = [], b = 0; b < words.length * 32; b += 8) + bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF); + return bytes; + }, + + // Convert a byte array to a hex string + bytesToHex: function(bytes) { + for (var hex = [], i = 0; i < bytes.length; i++) { + hex.push((bytes[i] >>> 4).toString(16)); + hex.push((bytes[i] & 0xF).toString(16)); + } + return hex.join(''); + }, + + // Convert a hex string to a byte array + hexToBytes: function(hex) { + for (var bytes = [], c = 0; c < hex.length; c += 2) + bytes.push(parseInt(hex.substr(c, 2), 16)); + return bytes; + }, + + // Convert a byte array to a base-64 string + bytesToBase64: function(bytes) { + for (var base64 = [], i = 0; i < bytes.length; i += 3) { + var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2]; + for (var j = 0; j < 4; j++) + if (i * 8 + j * 6 <= bytes.length * 8) + base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F)); + else + base64.push('='); + } + return base64.join(''); + }, + + // Convert a base-64 string to a byte array + base64ToBytes: function(base64) { + // Remove non-base-64 characters + base64 = base64.replace(/[^A-Z0-9+\/]/ig, ''); + + for (var bytes = [], i = 0, imod4 = 0; i < base64.length; + imod4 = ++i % 4) { + if (imod4 == 0) continue; + bytes.push(((base64map.indexOf(base64.charAt(i - 1)) + & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2)) + | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2))); + } + return bytes; + } + }; + + module.exports = crypt; +})(); + + +/***/ }), + +/***/ "AO7/": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/internals/to-string-tag-support.js ***! + \*****************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp"); + +var TO_STRING_TAG = wellKnownSymbol('toStringTag'); +var test = {}; + +test[TO_STRING_TAG] = 'z'; + +module.exports = String(test) === '[object z]'; + + +/***/ }), + +/***/ "AP2z": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_getRawTag.js ***! + \*******************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var Symbol = __webpack_require__(/*! ./_Symbol */ "nmnc"); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} + +module.exports = getRawTag; + + +/***/ }), + +/***/ "AVoK": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.set.delete-all.js ***! + \***************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR"); +var collectionDeleteAll = __webpack_require__(/*! ../internals/collection-delete-all */ "Cg3G"); + +// `Set.prototype.deleteAll` method +// https://github.com/tc39/proposal-collection-methods +$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { + deleteAll: function deleteAll(/* ...elements */) { + return collectionDeleteAll.apply(this, arguments); + } +}); + + +/***/ }), + +/***/ "AmFO": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/es.math.sinh.js ***! + \******************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var fails = __webpack_require__(/*! ../internals/fails */ "0Dky"); +var expm1 = __webpack_require__(/*! ../internals/math-expm1 */ "jrUv"); + +var abs = Math.abs; +var exp = Math.exp; +var E = Math.E; + +var FORCED = fails(function () { + return Math.sinh(-2e-17) != -2e-17; +}); + +// `Math.sinh` method +// https://tc39.github.io/ecma262/#sec-math.sinh +// V8 near Chromium 38 has a problem with very small numbers +$({ target: 'Math', stat: true, forced: FORCED }, { + sinh: function sinh(x) { + return abs(x = +x) < 1 ? (expm1(x) - expm1(-x)) / 2 : (exp(x - 1) - exp(-x - 1)) * (E / 2); + } +}); + + +/***/ }), + +/***/ "AqCL": +/*!*******************************************************************!*\ + !*** ./node_modules/path-to-regexp/node_modules/isarray/index.js ***! + \*******************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +module.exports = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]'; +}; + + +/***/ }), + +/***/ "AwgR": +/*!*************************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.reflect.has-own-metadata.js ***! + \*************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ "eDxR"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk"); + +var ordinaryHasOwnMetadata = ReflectMetadataModule.has; +var toMetadataKey = ReflectMetadataModule.toKey; + +// `Reflect.hasOwnMetadata` method +// https://github.com/rbuckton/reflect-metadata +$({ target: 'Reflect', stat: true }, { + hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) { + var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]); + return ordinaryHasOwnMetadata(metadataKey, anObject(target), targetKey); + } +}); + + +/***/ }), + +/***/ "B/J0": +/*!**************************************************!*\ + !*** ./node_modules/hash.js/lib/hash/sha/224.js ***! + \**************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(/*! ../utils */ "w8CP"); +var SHA256 = __webpack_require__(/*! ./256 */ "bu2F"); + +function SHA224() { + if (!(this instanceof SHA224)) + return new SHA224(); + + SHA256.call(this); + this.h = [ + 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, + 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ]; +} +utils.inherits(SHA224, SHA256); +module.exports = SHA224; + +SHA224.blockSize = 512; +SHA224.outSize = 224; +SHA224.hmacStrength = 192; +SHA224.padLength = 64; + +SHA224.prototype._digest = function digest(enc) { + // Just truncate output + if (enc === 'hex') + return utils.toHex32(this.h.slice(0, 7), 'big'); + else + return utils.split32(this.h.slice(0, 7), 'big'); +}; + + + +/***/ }), + +/***/ "B6y2": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/es.object.values.js ***! + \**********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var $values = __webpack_require__(/*! ../internals/object-to-array */ "b1O7").values; + +// `Object.values` method +// https://tc39.github.io/ecma262/#sec-object.values +$({ target: 'Object', stat: true }, { + values: function values(O) { + return $values(O); + } +}); + + +/***/ }), + +/***/ "BEtg": +/*!*****************************************!*\ + !*** ./node_modules/is-buffer/index.js ***! + \*****************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +/*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +// The _isBuffer check is for Safari 5-7 support, because it's missing +// Object.prototype.constructor. Remove this eventually +module.exports = function (obj) { + return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) +} + +function isBuffer (obj) { + return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) +} + +// For Node v0.10 support. Remove this eventually. +function isSlowBuffer (obj) { + return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) +} + + +/***/ }), + +/***/ "BGR+": +/*!******************************************!*\ + !*** ./node_modules/omit.js/es/index.js ***! + \******************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +function omit(obj, fields) { + // eslint-disable-next-line prefer-object-spread + var shallowCopy = Object.assign({}, obj); + + for (var i = 0; i < fields.length; i += 1) { + var key = fields[i]; + delete shallowCopy[key]; + } + + return shallowCopy; +} + +/* harmony default export */ __webpack_exports__["a"] = (omit); + +/***/ }), + +/***/ "BGb9": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.set.union.js ***! + \**********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR"); +var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM"); +var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN"); + +// `Set.prototype.union` method +// https://github.com/tc39/proposal-set-methods +$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { + union: function union(iterable) { + var set = anObject(this); + var newSet = new (speciesConstructor(set, getBuiltIn('Set')))(set); + iterate(iterable, aFunction(newSet.add), newSet); + return newSet; + } +}); + + +/***/ }), + +/***/ "BIHw": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/es.array.flat.js ***! + \*******************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var flattenIntoArray = __webpack_require__(/*! ../internals/flatten-into-array */ "or9q"); +var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW"); +var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ"); +var toInteger = __webpack_require__(/*! ../internals/to-integer */ "ppGB"); +var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "ZfDv"); + +// `Array.prototype.flat` method +// https://github.com/tc39/proposal-flatMap +$({ target: 'Array', proto: true }, { + flat: function flat(/* depthArg = 1 */) { + var depthArg = arguments.length ? arguments[0] : undefined; + var O = toObject(this); + var sourceLen = toLength(O.length); + var A = arraySpeciesCreate(O, 0); + A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg)); + return A; + } +}); + + +/***/ }), + +/***/ "BMrR": +/*!*******************************************!*\ + !*** ./node_modules/antd/es/row/index.js ***! + \*******************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../grid */ "qrJ5"); + +/* harmony default export */ __webpack_exports__["a"] = (_grid__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]); + +/***/ }), + +/***/ "BNMt": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.blink.js ***! + \*********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var createHTML = __webpack_require__(/*! ../internals/create-html */ "hXpO"); +var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "rwPt"); + +// `String.prototype.blink` method +// https://tc39.github.io/ecma262/#sec-string.prototype.blink +$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('blink') }, { + blink: function blink() { + return createHTML(this, 'blink', '', ''); + } +}); + + +/***/ }), + +/***/ "BTho": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/internals/function-bind.js ***! + \*********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM"); +var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v"); + +var slice = [].slice; +var factories = {}; + +var construct = function (C, argsLength, args) { + if (!(argsLength in factories)) { + for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']'; + // eslint-disable-next-line no-new-func + factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')'); + } return factories[argsLength](C, args); +}; + +// `Function.prototype.bind` method implementation +// https://tc39.github.io/ecma262/#sec-function.prototype.bind +module.exports = Function.bind || function bind(that /* , ...args */) { + var fn = aFunction(this); + var partArgs = slice.call(arguments, 1); + var boundFunction = function bound(/* args... */) { + var args = partArgs.concat(slice.call(arguments)); + return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args); + }; + if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype; + return boundFunction; +}; + + +/***/ }), + +/***/ "BU3w": +/*!***************************************************!*\ + !*** ./node_modules/rc-util/es/Dom/dynamicCSS.js ***! + \***************************************************/ +/*! exports provided: injectCSS, removeCSS, clearContainerCache, updateCSS */ +/*! exports used: removeCSS, updateCSS */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* unused harmony export injectCSS */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return removeCSS; }); +/* unused harmony export clearContainerCache */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return updateCSS; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "VTBJ"); +/* harmony import */ var _canUseDom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./canUseDom */ "MNnm"); +/* harmony import */ var _contains__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./contains */ "l4aY"); + + + +var APPEND_ORDER = 'data-rc-order'; +var APPEND_PRIORITY = 'data-rc-priority'; +var MARK_KEY = "rc-util-key"; +var containerCache = new Map(); +function getMark() { + var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + mark = _ref.mark; + if (mark) { + return mark.startsWith('data-') ? mark : "data-".concat(mark); + } + return MARK_KEY; +} +function getContainer(option) { + if (option.attachTo) { + return option.attachTo; + } + var head = document.querySelector('head'); + return head || document.body; +} +function getOrder(prepend) { + if (prepend === 'queue') { + return 'prependQueue'; + } + return prepend ? 'prepend' : 'append'; +} + +/** + * Find style which inject by rc-util + */ +function findStyles(container) { + return Array.from((containerCache.get(container) || container).children).filter(function (node) { + return node.tagName === 'STYLE'; + }); +} +function injectCSS(css) { + var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + if (!Object(_canUseDom__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])()) { + return null; + } + var csp = option.csp, + prepend = option.prepend, + _option$priority = option.priority, + priority = _option$priority === void 0 ? 0 : _option$priority; + var mergedOrder = getOrder(prepend); + var isPrependQueue = mergedOrder === 'prependQueue'; + var styleNode = document.createElement('style'); + styleNode.setAttribute(APPEND_ORDER, mergedOrder); + if (isPrependQueue && priority) { + styleNode.setAttribute(APPEND_PRIORITY, "".concat(priority)); + } + if (csp !== null && csp !== void 0 && csp.nonce) { + styleNode.nonce = csp === null || csp === void 0 ? void 0 : csp.nonce; + } + styleNode.innerHTML = css; + var container = getContainer(option); + var firstChild = container.firstChild; + if (prepend) { + // If is queue `prepend`, it will prepend first style and then append rest style + if (isPrependQueue) { + var existStyle = (option.styles || findStyles(container)).filter(function (node) { + // Ignore style which not injected by rc-util with prepend + if (!['prepend', 'prependQueue'].includes(node.getAttribute(APPEND_ORDER))) { + return false; + } + + // Ignore style which priority less then new style + var nodePriority = Number(node.getAttribute(APPEND_PRIORITY) || 0); + return priority >= nodePriority; + }); + if (existStyle.length) { + container.insertBefore(styleNode, existStyle[existStyle.length - 1].nextSibling); + return styleNode; + } + } + + // Use `insertBefore` as `prepend` + container.insertBefore(styleNode, firstChild); + } else { + container.appendChild(styleNode); + } + return styleNode; +} +function findExistNode(key) { + var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var container = getContainer(option); + return (option.styles || findStyles(container)).find(function (node) { + return node.getAttribute(getMark(option)) === key; + }); +} +function removeCSS(key) { + var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var existNode = findExistNode(key, option); + if (existNode) { + var container = getContainer(option); + container.removeChild(existNode); + } +} + +/** + * qiankun will inject `appendChild` to insert into other + */ +function syncRealContainer(container, option) { + var cachedRealContainer = containerCache.get(container); + + // Find real container when not cached or cached container removed + if (!cachedRealContainer || !Object(_contains__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(document, cachedRealContainer)) { + var placeholderStyle = injectCSS('', option); + var parentNode = placeholderStyle.parentNode; + containerCache.set(container, parentNode); + container.removeChild(placeholderStyle); + } +} + +/** + * manually clear container cache to avoid global cache in unit testes + */ +function clearContainerCache() { + containerCache.clear(); +} +function updateCSS(css, key) { + var originOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var container = getContainer(originOption); + var styles = findStyles(container); + var option = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, originOption), {}, { + styles: styles + }); + + // Sync real parent + syncRealContainer(container, option); + var existNode = findExistNode(key, option); + if (existNode) { + var _option$csp, _option$csp2; + if ((_option$csp = option.csp) !== null && _option$csp !== void 0 && _option$csp.nonce && existNode.nonce !== ((_option$csp2 = option.csp) === null || _option$csp2 === void 0 ? void 0 : _option$csp2.nonce)) { + var _option$csp3; + existNode.nonce = (_option$csp3 = option.csp) === null || _option$csp3 === void 0 ? void 0 : _option$csp3.nonce; + } + if (existNode.innerHTML !== css) { + existNode.innerHTML = css; + } + return existNode; + } + var newNode = injectCSS(css, option); + newNode.setAttribute(getMark(option), key); + return newNode; +} + +/***/ }), + +/***/ "BX/b": +/*!**********************************************************************************!*\ + !*** ./node_modules/core-js/internals/object-get-own-property-names-external.js ***! + \**********************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU"); +var nativeGetOwnPropertyNames = __webpack_require__(/*! ../internals/object-get-own-property-names */ "JBy8").f; + +var toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return nativeGetOwnPropertyNames(it); + } catch (error) { + return windowNames.slice(); + } +}; + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' + ? getWindowNames(it) + : nativeGetOwnPropertyNames(toIndexedObject(it)); +}; + + +/***/ }), + +/***/ "Bgsj": +/*!******************************************************************!*\ + !*** ./node_modules/@ant-design/icons/lib/components/Context.js ***! + \******************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _react = __webpack_require__(/*! react */ "q1tI"); +var IconContext = /*#__PURE__*/(0, _react.createContext)({}); +var _default = exports.default = IconContext; + +/***/ }), + +/***/ "Bnag": +/*!******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***! + \******************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "Bs8V": +/*!******************************************************************************!*\ + !*** ./node_modules/core-js/internals/object-get-own-property-descriptor.js ***! + \******************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/"); +var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "0eef"); +var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "XGwC"); +var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU"); +var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "wE6v"); +var has = __webpack_require__(/*! ../internals/has */ "UTVS"); +var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ "DPsx"); + +var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + +// `Object.getOwnPropertyDescriptor` method +// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor +exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { + O = toIndexedObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) try { + return nativeGetOwnPropertyDescriptor(O, P); + } catch (error) { /* empty */ } + if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]); +}; + + +/***/ }), + +/***/ "BsWD": +/*!*******************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.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 _unsupportedIterableToArray; }); +/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ "a3WO"); + +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return Object(_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen); +} + +/***/ }), + +/***/ "C1JJ": +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.set.is-disjoint-from.js ***! + \*********************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN"); + +// `Set.prototype.isDisjointFrom` method +// https://tc39.github.io/proposal-set-methods/#Set.prototype.isDisjointFrom +$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { + isDisjointFrom: function isDisjointFrom(iterable) { + var set = anObject(this); + var hasCheck = aFunction(set.has); + return !iterate(iterable, function (value) { + if (hasCheck.call(set, value) === true) return iterate.stop(); + }).stopped; + } +}); + + +/***/ }), + +/***/ "CUyW": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.map.map-values.js ***! + \***************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR"); +var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM"); +var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE"); +var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh"); +var getMapIterator = __webpack_require__(/*! ../internals/get-map-iterator */ "Sssf"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN"); + +// `Map.prototype.mapValues` method +// https://github.com/tc39/proposal-collection-methods +$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, { + mapValues: function mapValues(callbackfn /* , thisArg */) { + var map = anObject(this); + var iterator = getMapIterator(map); + var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var newMap = new (speciesConstructor(map, getBuiltIn('Map')))(); + var setter = aFunction(newMap.set); + iterate(iterator, function (key, value) { + setter.call(newMap, key, boundFunction(value, key, map)); + }, undefined, true, true); + return newMap; + } +}); + + +/***/ }), + +/***/ "CWQg": +/*!********************************************!*\ + !*** ./node_modules/antd/es/_util/type.js ***! + \********************************************/ +/*! exports provided: tuple, tupleNum */ +/*! exports used: tuple */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return tuple; }); +/* unused harmony export tupleNum */ +// https://stackoverflow.com/questions/46176165/ways-to-get-string-literal-type-of-array-values-without-enum-overhead +var tuple = function tuple() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return args; +}; +var tupleNum = function tupleNum() { + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + return args; +}; + +/***/ }), + +/***/ "Cb9Y": +/*!****************************************************!*\ + !*** ./src/models/classrooms/polls.ts + 1 modules ***! + \****************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/pages/metting/home/index.jsx */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// 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/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +var asyncToGenerator = __webpack_require__("9og8"); + +// EXTERNAL MODULE: ./src/utils/fetch.ts +var fetch = __webpack_require__("ErOA"); + +// CONCATENATED MODULE: ./src/service/polls.ts + + +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + +//试卷详情答题列表 +function polls_getPollsList(_x) { + return _getPollsList.apply(this, arguments); +} +function _getPollsList() { + _getPollsList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) { + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", Object(fetch["a" /* default */])("/api/polls/".concat(params.categoryId, "/poll_lists.json"), { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context.stop(); + } + }, _callee); + })); + return _getPollsList.apply(this, arguments); +} +function polls_getCommonHeader(_x2) { + return _getCommonHeader.apply(this, arguments); +} +function _getCommonHeader() { + _getCommonHeader = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", Object(fetch["a" /* default */])("/api/polls/".concat(params.categoryId, "/common_header.json"), { + method: 'get' + })); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return _getCommonHeader.apply(this, arguments); +} +function polls_getPollsSetting(_x3) { + return _getPollsSetting.apply(this, arguments); +} +function _getPollsSetting() { + _getPollsSetting = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) { + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + return _context3.abrupt("return", Object(fetch["a" /* default */])("/api/polls/".concat(params.categoryId, "/poll_setting.json"), { + method: 'get' + })); + case 1: + case "end": + return _context3.stop(); + } + }, _callee3); + })); + return _getPollsSetting.apply(this, arguments); +} +function updateSetting(_x4) { + return _updateSetting.apply(this, arguments); +} + +// 截止班级列表 +function _updateSetting() { + _updateSetting = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) { + return _regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + return _context4.abrupt("return", Object(fetch["a" /* default */])("/api/polls/".concat(params.categoryId, "/commit_setting.json"), { + method: 'post', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context4.stop(); + } + }, _callee4); + })); + return _updateSetting.apply(this, arguments); +} +function polls_getEndGroups(_x5) { + return _getEndGroups.apply(this, arguments); +} +function _getEndGroups() { + _getEndGroups = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) { + return _regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + return _context5.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/polls/end_poll_modal.json"), { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context5.stop(); + } + }, _callee5); + })); + return _getEndGroups.apply(this, arguments); +} +function polls_getPublishGroups(_x6) { + return _getPublishGroups.apply(this, arguments); +} +//试卷统计 +function _getPublishGroups() { + _getPublishGroups = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) { + return _regeneratorRuntime().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + return _context6.abrupt("return", Object(fetch["a" /* default */])("/api/polls/".concat(params.categoryId, "/publish_groups.json"), { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context6.stop(); + } + }, _callee6); + })); + return _getPublishGroups.apply(this, arguments); +} +function polls_getPollsStatistics(_x7) { + return _getPollsStatistics.apply(this, arguments); +} +// 题库列表 +function _getPollsStatistics() { + _getPollsStatistics = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) { + return _regeneratorRuntime().wrap(function _callee7$(_context7) { + while (1) switch (_context7.prev = _context7.next) { + case 0: + return _context7.abrupt("return", Object(fetch["a" /* default */])("/api/polls/".concat(params.categoryId, "/commit_result.json"), { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context7.stop(); + } + }, _callee7); + })); + return _getPollsStatistics.apply(this, arguments); +} +function polls_getBrankList(_x8) { + return _getBrankList.apply(this, arguments); +} + +// 保存题库 +function _getBrankList() { + _getBrankList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) { + return _regeneratorRuntime().wrap(function _callee8$(_context8) { + while (1) switch (_context8.prev = _context8.next) { + case 0: + return _context8.abrupt("return", Object(fetch["a" /* default */])("/api/question_banks/bank_list.json", { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context8.stop(); + } + }, _callee8); + })); + return _getBrankList.apply(this, arguments); +} +function polls_saveBanks(_x9) { + return _saveBanks.apply(this, arguments); +} + +// 获取班级列表 publish_modal +function _saveBanks() { + _saveBanks = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params) { + return _regeneratorRuntime().wrap(function _callee9$(_context9) { + while (1) switch (_context9.prev = _context9.next) { + case 0: + return _context9.abrupt("return", Object(fetch["a" /* default */])("/api/question_banks/save_banks.json", { + method: 'POST', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context9.stop(); + } + }, _callee9); + })); + return _saveBanks.apply(this, arguments); +} +function polls_getPollsCourses(_x10) { + return _getPollsCourses.apply(this, arguments); +} + +// 试卷发送到课堂 +// export async function postCoursesPublish(params: any) { +// return Fetch(`/api/courses/${params.coursesId}/exercises/publish.json`, { +// method: 'get', +// body: { ...params }, +// }); +// } + +// 添加问卷 +function _getPollsCourses() { + _getPollsCourses = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) { + return _regeneratorRuntime().wrap(function _callee10$(_context10) { + while (1) switch (_context10.prev = _context10.next) { + case 0: + return _context10.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/polls/publish_modal.json"), { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context10.stop(); + } + }, _callee10); + })); + return _getPollsCourses.apply(this, arguments); +} +function addPolls(_x11) { + return _addPolls.apply(this, arguments); +} +function _addPolls() { + _addPolls = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(params) { + return _regeneratorRuntime().wrap(function _callee11$(_context11) { + while (1) switch (_context11.prev = _context11.next) { + case 0: + return _context11.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/polls.json"), { + method: 'POST', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context11.stop(); + } + }, _callee11); + })); + return _addPolls.apply(this, arguments); +} +function polls_editPolls(_x12) { + return _editPolls.apply(this, arguments); +} +function _editPolls() { + _editPolls = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(params) { + return _regeneratorRuntime().wrap(function _callee12$(_context12) { + while (1) switch (_context12.prev = _context12.next) { + case 0: + return _context12.abrupt("return", Object(fetch["a" /* default */])("/api/polls/".concat(params.categoryId, "/edit.json"), { + method: 'get' + })); + case 1: + case "end": + return _context12.stop(); + } + }, _callee12); + })); + return _editPolls.apply(this, arguments); +} +function putPolls(_x13) { + return _putPolls.apply(this, arguments); +} +// 编辑问卷选题 +function _putPolls() { + _putPolls = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(params) { + return _regeneratorRuntime().wrap(function _callee13$(_context13) { + while (1) switch (_context13.prev = _context13.next) { + case 0: + return _context13.abrupt("return", Object(fetch["a" /* default */])("/api/polls/".concat(params.pollsId, ".json"), { + method: 'put', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context13.stop(); + } + }, _callee13); + })); + return _putPolls.apply(this, arguments); +} +function editPollsQuestion(_x14) { + return _editPollsQuestion.apply(this, arguments); +} +// 添加问卷选题 +function _editPollsQuestion() { + _editPollsQuestion = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(params) { + return _regeneratorRuntime().wrap(function _callee14$(_context14) { + while (1) switch (_context14.prev = _context14.next) { + case 0: + return _context14.abrupt("return", Object(fetch["a" /* default */])("/api/poll_questions/".concat(params.pollsId, ".json"), { + method: 'put', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context14.stop(); + } + }, _callee14); + })); + return _editPollsQuestion.apply(this, arguments); +} +function addExerciseQuestion(_x15) { + return _addExerciseQuestion.apply(this, arguments); +} +// 删除问卷选题 +function _addExerciseQuestion() { + _addExerciseQuestion = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(params) { + return _regeneratorRuntime().wrap(function _callee15$(_context15) { + while (1) switch (_context15.prev = _context15.next) { + case 0: + return _context15.abrupt("return", Object(fetch["a" /* default */])("/api/polls/".concat(params.pollsId, "/poll_questions.json"), { + method: 'post', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context15.stop(); + } + }, _callee15); + })); + return _addExerciseQuestion.apply(this, arguments); +} +function deletePollsQuestion(_x16) { + return _deletePollsQuestion.apply(this, arguments); +} +// 问卷问题上下排序 +function _deletePollsQuestion() { + _deletePollsQuestion = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(params) { + return _regeneratorRuntime().wrap(function _callee16$(_context16) { + while (1) switch (_context16.prev = _context16.next) { + case 0: + return _context16.abrupt("return", Object(fetch["a" /* default */])("/api/poll_questions/".concat(params.pollsId, ".json"), { + method: 'delete', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context16.stop(); + } + }, _callee16); + })); + return _deletePollsQuestion.apply(this, arguments); +} +function pollsMoveUpDown(_x17) { + return _pollsMoveUpDown.apply(this, arguments); +} +function _pollsMoveUpDown() { + _pollsMoveUpDown = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(params) { + return _regeneratorRuntime().wrap(function _callee17$(_context17) { + while (1) switch (_context17.prev = _context17.next) { + case 0: + return _context17.abrupt("return", Object(fetch["a" /* default */])("/api/poll_questions/".concat(params.pollsId, "/up_down.json"), { + method: 'post', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context17.stop(); + } + }, _callee17); + })); + return _pollsMoveUpDown.apply(this, arguments); +} +function polls_getExerciseBanks(_x18) { + return _getExerciseBanks.apply(this, arguments); +} +function _getExerciseBanks() { + _getExerciseBanks = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(params) { + return _regeneratorRuntime().wrap(function _callee18$(_context18) { + while (1) switch (_context18.prev = _context18.next) { + case 0: + return _context18.abrupt("return", Object(fetch["a" /* default */])("/api/exercise_banks/".concat(params.topicId, ".json"), { + method: 'get' + })); + case 1: + case "end": + return _context18.stop(); + } + }, _callee18); + })); + return _getExerciseBanks.apply(this, arguments); +} +function putExerciseBanks(_x19) { + return _putExerciseBanks.apply(this, arguments); +} +function _putExerciseBanks() { + _putExerciseBanks = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(params) { + return _regeneratorRuntime().wrap(function _callee19$(_context19) { + while (1) switch (_context19.prev = _context19.next) { + case 0: + return _context19.abrupt("return", Object(fetch["a" /* default */])("/api/exercise_banks/".concat(params.topicId, ".json"), { + method: 'put', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context19.stop(); + } + }, _callee19); + })); + return _putExerciseBanks.apply(this, arguments); +} +function deleteExerciseBanks(_x20) { + return _deleteExerciseBanks.apply(this, arguments); +} +function _deleteExerciseBanks() { + _deleteExerciseBanks = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(params) { + return _regeneratorRuntime().wrap(function _callee20$(_context20) { + while (1) switch (_context20.prev = _context20.next) { + case 0: + return _context20.abrupt("return", Object(fetch["a" /* default */])("/api/exercise_banks/".concat(params.topicId, ".json"), { + method: 'put', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context20.stop(); + } + }, _callee20); + })); + return _deleteExerciseBanks.apply(this, arguments); +} +function deleteExerciseBanksQuestion(_x21) { + return _deleteExerciseBanksQuestion.apply(this, arguments); +} +// 问卷问题上下排序 +function _deleteExerciseBanksQuestion() { + _deleteExerciseBanksQuestion = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(params) { + return _regeneratorRuntime().wrap(function _callee21$(_context21) { + while (1) switch (_context21.prev = _context21.next) { + case 0: + return _context21.abrupt("return", Object(fetch["a" /* default */])("/api/exercise_bank_questions/".concat(params.pollsId, ".json"), { + method: 'delete', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context21.stop(); + } + }, _callee21); + })); + return _deleteExerciseBanksQuestion.apply(this, arguments); +} +function exerciseBanksMoveUpDown(_x22) { + return _exerciseBanksMoveUpDown.apply(this, arguments); +} +function _exerciseBanksMoveUpDown() { + _exerciseBanksMoveUpDown = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(params) { + return _regeneratorRuntime().wrap(function _callee22$(_context22) { + while (1) switch (_context22.prev = _context22.next) { + case 0: + return _context22.abrupt("return", Object(fetch["a" /* default */])("/api/poll_questions/".concat(params.pollsId, "/up_down.json"), { + method: 'post', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context22.stop(); + } + }, _callee22); + })); + return _exerciseBanksMoveUpDown.apply(this, arguments); +} +function addPollBankQuestions(_x23) { + return _addPollBankQuestions.apply(this, arguments); +} +function _addPollBankQuestions() { + _addPollBankQuestions = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23(params) { + return _regeneratorRuntime().wrap(function _callee23$(_context23) { + while (1) switch (_context23.prev = _context23.next) { + case 0: + return _context23.abrupt("return", Object(fetch["a" /* default */])("/api/poll_bank_questions.json", { + method: 'post', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context23.stop(); + } + }, _callee23); + })); + return _addPollBankQuestions.apply(this, arguments); +} +function putPollBankQuestions(_x24) { + return _putPollBankQuestions.apply(this, arguments); +} +function _putPollBankQuestions() { + _putPollBankQuestions = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(params) { + return _regeneratorRuntime().wrap(function _callee24$(_context24) { + while (1) switch (_context24.prev = _context24.next) { + case 0: + return _context24.abrupt("return", Object(fetch["a" /* default */])("/api/poll_bank_questions/".concat(params.pollsId, ".json"), { + method: 'put', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context24.stop(); + } + }, _callee24); + })); + return _putPollBankQuestions.apply(this, arguments); +} +function putExerciseBankQuestions(_x25) { + return _putExerciseBankQuestions.apply(this, arguments); +} +function _putExerciseBankQuestions() { + _putExerciseBankQuestions = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25(params) { + return _regeneratorRuntime().wrap(function _callee25$(_context25) { + while (1) switch (_context25.prev = _context25.next) { + case 0: + return _context25.abrupt("return", Object(fetch["a" /* default */])("/api/exercise_bank_questions/".concat(params.id, ".json"), { + method: 'put', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context25.stop(); + } + }, _callee25); + })); + return _putExerciseBankQuestions.apply(this, arguments); +} +function addExerciseBankQuestions(_x26) { + return _addExerciseBankQuestions.apply(this, arguments); +} +function _addExerciseBankQuestions() { + _addExerciseBankQuestions = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26(params) { + return _regeneratorRuntime().wrap(function _callee26$(_context26) { + while (1) switch (_context26.prev = _context26.next) { + case 0: + return _context26.abrupt("return", Object(fetch["a" /* default */])("/api/exercise_bank_questions.json", { + method: 'post', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context26.stop(); + } + }, _callee26); + })); + return _addExerciseBankQuestions.apply(this, arguments); +} +function exercisesBanksMoveUpDown(_x27) { + return _exercisesBanksMoveUpDown.apply(this, arguments); +} +function _exercisesBanksMoveUpDown() { + _exercisesBanksMoveUpDown = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(params) { + return _regeneratorRuntime().wrap(function _callee27$(_context27) { + while (1) switch (_context27.prev = _context27.next) { + case 0: + return _context27.abrupt("return", Object(fetch["a" /* default */])("/api/exercise_bank_questions/".concat(params.exerciseId, "/up_down.json"), { + method: 'post', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context27.stop(); + } + }, _callee27); + })); + return _exercisesBanksMoveUpDown.apply(this, arguments); +} +// CONCATENATED MODULE: ./src/models/classrooms/polls.ts + +function polls_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ polls_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + +var PollsModel = { + namespace: 'polls', + state: { + name: '普通试卷,随机试卷详情页面', + loading: true, + // 试卷作业列表 + pollsList: {}, + // 试卷统计 + statisticsList: {}, + // 试卷班级 + pollsCoursesList: {}, + // 题库 + brankList: {}, + actionTabs: {}, + commonHeader: {}, + pollSetting: {}, + endGroups: {}, + publishGroups: {}, + exerciseBanks: {} + }, + effects: { + // 试卷 - 作业列表 + getPollsList: function getPollsList(_ref, _ref2) { + var payload = _ref.payload, + callback = _ref.callback; + var call = _ref2.call, + put = _ref2.put; + return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee() { + var response; + return polls_regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return call(polls_getPollsList, payload); + case 2: + response = _context.sent; + _context.next = 5; + return put({ + type: 'save', + payload: { + pollsList: Object(objectSpread2["a" /* default */])({}, response) + } + }); + case 5: + return _context.abrupt("return", response); + case 6: + case "end": + return _context.stop(); + } + }, _callee); + })(); + }, + getCommonHeader: function getCommonHeader(_ref3, _ref4) { + var payload = _ref3.payload, + callback = _ref3.callback; + var call = _ref4.call, + put = _ref4.put; + return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee2() { + var response; + return polls_regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return call(polls_getCommonHeader, payload); + case 2: + response = _context2.sent; + _context2.next = 5; + return put({ + type: 'save', + payload: { + commonHeader: Object(objectSpread2["a" /* default */])({}, response) + } + }); + case 5: + return _context2.abrupt("return", response); + case 6: + case "end": + return _context2.stop(); + } + }, _callee2); + })(); + }, + // 试卷-统计 + getPollsStatistics: function getPollsStatistics(_ref5, _ref6) { + var payload = _ref5.payload, + callback = _ref5.callback; + var call = _ref6.call, + put = _ref6.put; + return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee3() { + var response; + return polls_regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + _context3.next = 2; + return call(polls_getPollsStatistics, payload); + case 2: + response = _context3.sent; + _context3.next = 5; + return put({ + type: 'save', + payload: { + statisticsList: Object(objectSpread2["a" /* default */])({}, response) + } + }); + case 5: + return _context3.abrupt("return", response); + case 6: + case "end": + return _context3.stop(); + } + }, _callee3); + })(); + }, + // 试卷 题库列表 + getBrankList: function getBrankList(_ref7, _ref8) { + var payload = _ref7.payload, + callback = _ref7.callback; + var call = _ref8.call, + put = _ref8.put; + return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee4() { + var response; + return polls_regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + _context4.next = 2; + return call(polls_getBrankList, payload); + case 2: + response = _context4.sent; + _context4.next = 5; + return put({ + type: 'save', + payload: { + brankList: Object(objectSpread2["a" /* default */])({}, response) + } + }); + case 5: + return _context4.abrupt("return", response); + case 6: + case "end": + return _context4.stop(); + } + }, _callee4); + })(); + }, + // 试卷保存题库 + saveBanks: function saveBanks(_ref9, _ref10) { + var payload = _ref9.payload, + callback = _ref9.callback; + var call = _ref10.call, + put = _ref10.put; + return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee5() { + var response; + return polls_regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + _context5.next = 2; + return call(polls_saveBanks, payload); + case 2: + response = _context5.sent; + return _context5.abrupt("return", response); + case 4: + case "end": + return _context5.stop(); + } + }, _callee5); + })(); + }, + // 试卷课堂列表 + getPollsCourses: function getPollsCourses(_ref11, _ref12) { + var payload = _ref11.payload, + callback = _ref11.callback; + var call = _ref12.call, + put = _ref12.put; + return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee6() { + var response; + return polls_regeneratorRuntime().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + _context6.next = 2; + return call(polls_getPollsCourses, payload); + case 2: + response = _context6.sent; + _context6.next = 5; + return put({ + type: 'save', + payload: { + pollsCoursesList: Object(objectSpread2["a" /* default */])({}, response) + } + }); + case 5: + return _context6.abrupt("return", response); + case 6: + case "end": + return _context6.stop(); + } + }, _callee6); + })(); + }, + getPollsSetting: function getPollsSetting(_ref13, _ref14) { + var payload = _ref13.payload, + callback = _ref13.callback; + var call = _ref14.call, + put = _ref14.put; + return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee7() { + var response; + return polls_regeneratorRuntime().wrap(function _callee7$(_context7) { + while (1) switch (_context7.prev = _context7.next) { + case 0: + _context7.next = 2; + return call(polls_getPollsSetting, payload); + case 2: + response = _context7.sent; + _context7.next = 5; + return put({ + type: 'save', + payload: { + pollSetting: Object(objectSpread2["a" /* default */])({}, response) + } + }); + case 5: + return _context7.abrupt("return", response); + case 6: + case "end": + return _context7.stop(); + } + }, _callee7); + })(); + }, + editPolls: function editPolls(_ref15, _ref16) { + var payload = _ref15.payload, + callback = _ref15.callback; + var call = _ref16.call, + put = _ref16.put; + return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee8() { + var response; + return polls_regeneratorRuntime().wrap(function _callee8$(_context8) { + while (1) switch (_context8.prev = _context8.next) { + case 0: + _context8.next = 2; + return call(polls_editPolls, payload); + case 2: + response = _context8.sent; + _context8.next = 5; + return put({ + type: 'save', + payload: { + editData: Object(objectSpread2["a" /* default */])({}, JSON.parse(JSON.stringify(response))) + } + }); + case 5: + return _context8.abrupt("return", response); + case 6: + case "end": + return _context8.stop(); + } + }, _callee8); + })(); + }, + getEndGroups: function getEndGroups(_ref17, _ref18) { + var payload = _ref17.payload, + callback = _ref17.callback; + var call = _ref18.call, + put = _ref18.put; + return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee9() { + var response; + return polls_regeneratorRuntime().wrap(function _callee9$(_context9) { + while (1) switch (_context9.prev = _context9.next) { + case 0: + _context9.next = 2; + return call(polls_getEndGroups, payload); + case 2: + response = _context9.sent; + _context9.next = 5; + return put({ + type: 'save', + payload: { + endGroups: Object(objectSpread2["a" /* default */])({}, response) + } + }); + case 5: + return _context9.abrupt("return", response); + case 6: + case "end": + return _context9.stop(); + } + }, _callee9); + })(); + }, + getPublishGroups: function getPublishGroups(_ref19, _ref20) { + var payload = _ref19.payload, + callback = _ref19.callback; + var call = _ref20.call, + put = _ref20.put; + return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee10() { + var response; + return polls_regeneratorRuntime().wrap(function _callee10$(_context10) { + while (1) switch (_context10.prev = _context10.next) { + case 0: + _context10.next = 2; + return call(polls_getPublishGroups, payload); + case 2: + response = _context10.sent; + _context10.next = 5; + return put({ + type: 'save', + payload: { + publishGroups: Object(objectSpread2["a" /* default */])({}, response) + } + }); + case 5: + return _context10.abrupt("return", response); + case 6: + case "end": + return _context10.stop(); + } + }, _callee10); + })(); + }, + getExerciseBanks: function getExerciseBanks(_ref21, _ref22) { + var payload = _ref21.payload, + callback = _ref21.callback; + var call = _ref22.call, + put = _ref22.put; + return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee11() { + var response; + return polls_regeneratorRuntime().wrap(function _callee11$(_context11) { + while (1) switch (_context11.prev = _context11.next) { + case 0: + _context11.next = 2; + return call(polls_getExerciseBanks, payload); + case 2: + response = _context11.sent; + _context11.next = 5; + return put({ + type: 'save', + payload: { + exerciseBanks: Object(objectSpread2["a" /* default */])({}, response) + } + }); + case 5: + return _context11.abrupt("return", response); + case 6: + case "end": + return _context11.stop(); + } + }, _callee11); + })(); + }, + // 设置操做action + setActionTabs: function setActionTabs(_ref23, _ref24) { + var payload = _ref23.payload; + var call = _ref24.call, + put = _ref24.put; + return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee12() { + return polls_regeneratorRuntime().wrap(function _callee12$(_context12) { + while (1) switch (_context12.prev = _context12.next) { + case 0: + _context12.next = 2; + return put({ + type: 'save', + payload: { + actionTabs: Object(objectSpread2["a" /* default */])({}, payload) + } + }); + case 2: + case "end": + return _context12.stop(); + } + }, _callee12); + })(); + } + }, + reducers: { + save: function save(state, action) { + return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload); + } + }, + subscriptions: { + setup: function setup(_ref25) { + var dispatch = _ref25.dispatch, + history = _ref25.history; + } + } +}; +/* harmony default export */ var polls = __webpack_exports__["a"] = (PollsModel); + +/***/ }), + +/***/ "Cg3G": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/internals/collection-delete-all.js ***! + \*****************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM"); + +// https://github.com/tc39/collection-methods +module.exports = function (/* ...elements */) { + var collection = anObject(this); + var remover = aFunction(collection['delete']); + var allDeleted = true; + var wasDeleted; + for (var k = 0, len = arguments.length; k < len; k++) { + wasDeleted = remover.call(collection, arguments[k]); + allDeleted = allDeleted && wasDeleted; + } + return !!allDeleted; +}; + + +/***/ }), + +/***/ "CjYj": +/*!*****************************************!*\ + !*** ./node_modules/has-proto/index.js ***! + \*****************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var test = { + __proto__: null, + foo: {} +}; + +var $Object = Object; + +/** @type {import('.')} */ +module.exports = function hasProto() { + // @ts-expect-error: TS errors on an inherited property for some reason + return { __proto__: test }.foo === test.foo + && !(test instanceof $Object); +}; + + +/***/ }), + +/***/ "Co1j": +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.set.is-superset-of.js ***! + \*******************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN"); + +// `Set.prototype.isSupersetOf` method +// https://tc39.github.io/proposal-set-methods/#Set.prototype.isSupersetOf +$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { + isSupersetOf: function isSupersetOf(iterable) { + var set = anObject(this); + var hasCheck = aFunction(set.has); + return !iterate(iterable, function (value) { + if (hasCheck.call(set, value) === false) return iterate.stop(); + }).stopped; + } +}); + + +/***/ }), + +/***/ "CsgD": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/es.math.expm1.js ***! + \*******************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var expm1 = __webpack_require__(/*! ../internals/math-expm1 */ "jrUv"); + +// `Math.expm1` method +// https://tc39.github.io/ecma262/#sec-math.expm1 +$({ target: 'Math', stat: true, forced: expm1 != Math.expm1 }, { expm1: expm1 }); + + +/***/ }), + +/***/ "CyXQ": +/*!****************************************************!*\ + !*** ./node_modules/core-js/internals/to-index.js ***! + \****************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(/*! ../internals/to-integer */ "ppGB"); +var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ"); + +// `ToIndex` abstract operation +// https://tc39.github.io/ecma262/#sec-toindex +module.exports = function (it) { + if (it === undefined) return 0; + var number = toInteger(it); + var length = toLength(number); + if (number !== length) throw RangeError('Wrong length or index'); + return length; +}; + + +/***/ }), + +/***/ "D3zA": +/*!*********************************************!*\ + !*** ./node_modules/function-bind/index.js ***! + \*********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(/*! ./implementation */ "aI7X"); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ "DEfu": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/es.json.to-string-tag.js ***! + \***************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(/*! ../internals/global */ "2oRo"); +var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "1E5z"); + +// JSON[@@toStringTag] property +// https://tc39.github.io/ecma262/#sec-json-@@tostringtag +setToStringTag(global.JSON, 'JSON', true); + + +/***/ }), + +/***/ "DMt2": +/*!******************************************************!*\ + !*** ./node_modules/core-js/internals/string-pad.js ***! + \******************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-string-pad-start-end +var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ"); +var repeat = __webpack_require__(/*! ../internals/string-repeat */ "EUja"); +var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF"); + +var ceil = Math.ceil; + +// `String.prototype.{ padStart, padEnd }` methods implementation +var createMethod = function (IS_END) { + return function ($this, maxLength, fillString) { + var S = String(requireObjectCoercible($this)); + var stringLength = S.length; + var fillStr = fillString === undefined ? ' ' : String(fillString); + var intMaxLength = toLength(maxLength); + var fillLen, stringFiller; + if (intMaxLength <= stringLength || fillStr == '') return S; + fillLen = intMaxLength - stringLength; + stringFiller = repeat.call(fillStr, ceil(fillLen / fillStr.length)); + if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); + return IS_END ? S + stringFiller : stringFiller + S; + }; +}; + +module.exports = { + // `String.prototype.padStart` method + // https://tc39.github.io/ecma262/#sec-string.prototype.padstart + start: createMethod(false), + // `String.prototype.padEnd` method + // https://tc39.github.io/ecma262/#sec-string.prototype.padend + end: createMethod(true) +}; + + +/***/ }), + +/***/ "DPsx": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/internals/ie8-dom-define.js ***! + \**********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/"); +var fails = __webpack_require__(/*! ../internals/fails */ "0Dky"); +var createElement = __webpack_require__(/*! ../internals/document-create-element */ "zBJ4"); + +// Thank's IE8 for his funny defineProperty +module.exports = !DESCRIPTORS && !fails(function () { + return Object.defineProperty(createElement('div'), 'a', { + get: function () { return 7; } + }).a != 7; +}); + + +/***/ }), + +/***/ "DSFK": +/*!*******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.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 _arrayWithHoles; }); +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} + +/***/ }), + +/***/ "DSU0": +/*!****************************************!*\ + !*** ./node_modules/es-errors/type.js ***! + \****************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** @type {import('./type')} */ +module.exports = TypeError; + + +/***/ }), + +/***/ "DTth": +/*!******************************************************!*\ + !*** ./node_modules/core-js/internals/native-url.js ***! + \******************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var fails = __webpack_require__(/*! ../internals/fails */ "0Dky"); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR"); + +var ITERATOR = wellKnownSymbol('iterator'); + +module.exports = !fails(function () { + var url = new URL('b?a=1&b=2&c=3', 'http://a'); + var searchParams = url.searchParams; + var result = ''; + url.pathname = 'c%20d'; + searchParams.forEach(function (value, key) { + searchParams['delete']('b'); + result += key + value; + }); + return (IS_PURE && !url.toJSON) + || !searchParams.sort + || url.href !== 'http://a/c%20d?a=1&c=3' + || searchParams.get('c') !== '3' + || String(new URLSearchParams('?a=1')) !== 'a=1' + || !searchParams[ITERATOR] + // throws in Edge + || new URL('https://a@b').username !== 'a' + || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b' + // not punycoded in Edge + || new URL('http://тест').host !== 'xn--e1aybc' + // not escaped in Chrome 62- + || new URL('http://a#б').hash !== '#%D0%B1' + // fails in Chrome 66- + || result !== 'a1c3' + // throws in Safari + || new URL('http://x', undefined).host !== 'x'; +}); + + +/***/ }), + +/***/ "DUzY": +/*!***************************************************************************************!*\ + !*** ./node_modules/react-redux/node_modules/react-is/cjs/react-is.production.min.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** @license React v17.0.2 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131; +if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x("react.element");c=x("react.portal");d=x("react.fragment");e=x("react.strict_mode");f=x("react.profiler");g=x("react.provider");h=x("react.context");k=x("react.forward_ref");l=x("react.suspense");m=x("react.suspense_list");n=x("react.memo");p=x("react.lazy");q=x("react.block");r=x("react.server.block");u=x("react.fundamental");v=x("react.debug_trace_mode");w=x("react.legacy_hidden")} +function y(a){if("object"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;exports.ContextConsumer=h;exports.ContextProvider=z;exports.Element=A;exports.ForwardRef=B;exports.Fragment=C;exports.Lazy=D;exports.Memo=E;exports.Portal=F;exports.Profiler=G;exports.StrictMode=H; +exports.Suspense=I;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return y(a)===h};exports.isContextProvider=function(a){return y(a)===g};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return y(a)===k};exports.isFragment=function(a){return y(a)===d};exports.isLazy=function(a){return y(a)===p};exports.isMemo=function(a){return y(a)===n}; +exports.isPortal=function(a){return y(a)===c};exports.isProfiler=function(a){return y(a)===f};exports.isStrictMode=function(a){return y(a)===e};exports.isSuspense=function(a){return y(a)===l};exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1}; +exports.typeOf=y; + + +/***/ }), + +/***/ "DhMN": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.string.match-all.js ***! + \*****************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +// TODO: Remove from `core-js@4` +__webpack_require__(/*! ./es.string.match-all */ "ofBz"); + + +/***/ }), + +/***/ "DrvE": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.promise.any.js ***! + \************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM"); +var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY"); +var newPromiseCapabilityModule = __webpack_require__(/*! ../internals/new-promise-capability */ "8GlL"); +var perform = __webpack_require__(/*! ../internals/perform */ "5mdu"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN"); + +var PROMISE_ANY_ERROR = 'No one promise resolved'; + +// `Promise.any` method +// https://github.com/tc39/proposal-promise-any +$({ target: 'Promise', stat: true }, { + any: function any(iterable) { + var C = this; + var capability = newPromiseCapabilityModule.f(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var promiseResolve = aFunction(C.resolve); + var errors = []; + var counter = 0; + var remaining = 1; + var alreadyResolved = false; + iterate(iterable, function (promise) { + var index = counter++; + var alreadyRejected = false; + errors.push(undefined); + remaining++; + promiseResolve.call(C, promise).then(function (value) { + if (alreadyRejected || alreadyResolved) return; + alreadyResolved = true; + resolve(value); + }, function (e) { + if (alreadyRejected || alreadyResolved) return; + alreadyRejected = true; + errors[index] = e; + --remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR)); + }); + }); + --remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR)); + }); + if (result.error) reject(result.value); + return capability.promise; + } +}); + + +/***/ }), + +/***/ "E+IA": +/*!************************************************!*\ + !*** ./node_modules/hash.js/lib/hash/sha/1.js ***! + \************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(/*! ../utils */ "w8CP"); +var common = __webpack_require__(/*! ../common */ "7ckf"); +var shaCommon = __webpack_require__(/*! ./common */ "qlaj"); + +var rotl32 = utils.rotl32; +var sum32 = utils.sum32; +var sum32_5 = utils.sum32_5; +var ft_1 = shaCommon.ft_1; +var BlockHash = common.BlockHash; + +var sha1_K = [ + 0x5A827999, 0x6ED9EBA1, + 0x8F1BBCDC, 0xCA62C1D6 +]; + +function SHA1() { + if (!(this instanceof SHA1)) + return new SHA1(); + + BlockHash.call(this); + this.h = [ + 0x67452301, 0xefcdab89, 0x98badcfe, + 0x10325476, 0xc3d2e1f0 ]; + this.W = new Array(80); +} + +utils.inherits(SHA1, BlockHash); +module.exports = SHA1; + +SHA1.blockSize = 512; +SHA1.outSize = 160; +SHA1.hmacStrength = 80; +SHA1.padLength = 64; + +SHA1.prototype._update = function _update(msg, start) { + var W = this.W; + + for (var i = 0; i < 16; i++) + W[i] = msg[start + i]; + + for(; i < W.length; i++) + W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1); + + var a = this.h[0]; + var b = this.h[1]; + var c = this.h[2]; + var d = this.h[3]; + var e = this.h[4]; + + for (i = 0; i < W.length; i++) { + var s = ~~(i / 20); + var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]); + e = d; + d = c; + c = rotl32(b, 30); + b = a; + a = t; + } + + this.h[0] = sum32(this.h[0], a); + this.h[1] = sum32(this.h[1], b); + this.h[2] = sum32(this.h[2], c); + this.h[3] = sum32(this.h[3], d); + this.h[4] = sum32(this.h[4], e); +}; + +SHA1.prototype._digest = function digest(enc) { + if (enc === 'hex') + return utils.toHex32(this.h, 'big'); + else + return utils.split32(this.h, 'big'); +}; + + +/***/ }), + +/***/ "E5NM": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.big.js ***! + \*******************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var createHTML = __webpack_require__(/*! ../internals/create-html */ "hXpO"); +var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "rwPt"); + +// `String.prototype.big` method +// https://tc39.github.io/ecma262/#sec-string.prototype.big +$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('big') }, { + big: function big() { + return createHTML(this, 'big', '', ''); + } +}); + + +/***/ }), + +/***/ "E9XD": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/es.array.reduce.js ***! + \*********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var $reduce = __webpack_require__(/*! ../internals/array-reduce */ "1Y/n").left; +var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "pkCn"); +var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "rkAj"); + +var STRICT_METHOD = arrayMethodIsStrict('reduce'); +var USES_TO_LENGTH = arrayMethodUsesToLength('reduce', { 1: 0 }); + +// `Array.prototype.reduce` method +// https://tc39.github.io/ecma262/#sec-array.prototype.reduce +$({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH }, { + reduce: function reduce(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined); + } +}); + + +/***/ }), + +/***/ "EAZv": +/*!**************************************************************************!*\ + !*** ./node_modules/@ant-design/icons-svg/lib/asn/InfoCircleOutlined.js ***! + \**************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// This icon file is generated automatically. +Object.defineProperty(exports, "__esModule", { value: true }); +var InfoCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z" } }] }, "name": "info-circle", "theme": "outlined" }; +exports.default = InfoCircleOutlined; + + +/***/ }), + +/***/ "ECub": +/*!*********************************************************!*\ + !*** ./node_modules/antd/es/empty/index.js + 2 modules ***! + \*********************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js +var helpers_extends = __webpack_require__("pVnL"); +var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js +var defineProperty = __webpack_require__("lSNA"); +var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty); + +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__("q1tI"); + +// EXTERNAL MODULE: ./node_modules/classnames/index.js +var classnames = __webpack_require__("TSYQ"); +var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); + +// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js + 1 modules +var context = __webpack_require__("H84U"); + +// EXTERNAL MODULE: ./node_modules/antd/es/locale-provider/LocaleReceiver.js + 1 modules +var LocaleReceiver = __webpack_require__("YMnH"); + +// CONCATENATED MODULE: ./node_modules/antd/es/empty/empty.js + + + +var empty_Empty = function Empty() { + var _React$useContext = react["useContext"](context["b" /* ConfigContext */]), + getPrefixCls = _React$useContext.getPrefixCls; + + var prefixCls = getPrefixCls('empty-img-default'); + return /*#__PURE__*/react["createElement"]("svg", { + className: prefixCls, + width: "184", + height: "152", + viewBox: "0 0 184 152", + xmlns: "http://www.w3.org/2000/svg" + }, /*#__PURE__*/react["createElement"]("g", { + fill: "none", + fillRule: "evenodd" + }, /*#__PURE__*/react["createElement"]("g", { + transform: "translate(24 31.67)" + }, /*#__PURE__*/react["createElement"]("ellipse", { + className: "".concat(prefixCls, "-ellipse"), + cx: "67.797", + cy: "106.89", + rx: "67.797", + ry: "12.668" + }), /*#__PURE__*/react["createElement"]("path", { + className: "".concat(prefixCls, "-path-1"), + d: "M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z" + }), /*#__PURE__*/react["createElement"]("path", { + className: "".concat(prefixCls, "-path-2"), + d: "M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z", + transform: "translate(13.56)" + }), /*#__PURE__*/react["createElement"]("path", { + className: "".concat(prefixCls, "-path-3"), + d: "M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z" + }), /*#__PURE__*/react["createElement"]("path", { + className: "".concat(prefixCls, "-path-4"), + d: "M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z" + })), /*#__PURE__*/react["createElement"]("path", { + className: "".concat(prefixCls, "-path-5"), + d: "M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z" + }), /*#__PURE__*/react["createElement"]("g", { + className: "".concat(prefixCls, "-g"), + transform: "translate(149.65 15.383)" + }, /*#__PURE__*/react["createElement"]("ellipse", { + cx: "20.654", + cy: "3.167", + rx: "2.849", + ry: "2.815" + }), /*#__PURE__*/react["createElement"]("path", { + d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z" + })))); +}; + +/* harmony default export */ var empty = (empty_Empty); +// CONCATENATED MODULE: ./node_modules/antd/es/empty/simple.js + + + +var simple_Simple = function Simple() { + var _React$useContext = react["useContext"](context["b" /* ConfigContext */]), + getPrefixCls = _React$useContext.getPrefixCls; + + var prefixCls = getPrefixCls('empty-img-simple'); + return /*#__PURE__*/react["createElement"]("svg", { + className: prefixCls, + width: "64", + height: "41", + viewBox: "0 0 64 41", + xmlns: "http://www.w3.org/2000/svg" + }, /*#__PURE__*/react["createElement"]("g", { + transform: "translate(0 1)", + fill: "none", + fillRule: "evenodd" + }, /*#__PURE__*/react["createElement"]("ellipse", { + className: "".concat(prefixCls, "-ellipse"), + cx: "32", + cy: "33", + rx: "32", + ry: "7" + }), /*#__PURE__*/react["createElement"]("g", { + className: "".concat(prefixCls, "-g"), + fillRule: "nonzero" + }, /*#__PURE__*/react["createElement"]("path", { + d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z" + }), /*#__PURE__*/react["createElement"]("path", { + d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z", + className: "".concat(prefixCls, "-path") + })))); +}; + +/* harmony default export */ var simple = (simple_Simple); +// CONCATENATED MODULE: ./node_modules/antd/es/empty/index.js + + + +var __rest = undefined && undefined.__rest || function (s, e) { + var t = {}; + + for (var p in s) { + if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; + } + + if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; + } + return t; +}; + + + + + + + +var defaultEmptyImg = /*#__PURE__*/react["createElement"](empty, null); +var simpleEmptyImg = /*#__PURE__*/react["createElement"](simple, null); + +var es_empty_Empty = function Empty(props) { + return /*#__PURE__*/react["createElement"](context["a" /* ConfigConsumer */], null, function (_ref) { + var getPrefixCls = _ref.getPrefixCls, + direction = _ref.direction; + + var className = props.className, + customizePrefixCls = props.prefixCls, + _props$image = props.image, + image = _props$image === void 0 ? defaultEmptyImg : _props$image, + description = props.description, + children = props.children, + imageStyle = props.imageStyle, + restProps = __rest(props, ["className", "prefixCls", "image", "description", "children", "imageStyle"]); + + return /*#__PURE__*/react["createElement"](LocaleReceiver["a" /* default */], { + componentName: "Empty" + }, function (locale) { + var _classNames; + + var prefixCls = getPrefixCls('empty', customizePrefixCls); + var des = typeof description !== 'undefined' ? description : locale.description; + var alt = typeof des === 'string' ? des : 'empty'; + var imageNode = null; + + if (typeof image === 'string') { + imageNode = /*#__PURE__*/react["createElement"]("img", { + alt: alt, + src: image + }); + } else { + imageNode = image; + } + + return /*#__PURE__*/react["createElement"]("div", extends_default()({ + className: classnames_default()(prefixCls, (_classNames = {}, defineProperty_default()(_classNames, "".concat(prefixCls, "-normal"), image === simpleEmptyImg), defineProperty_default()(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className) + }, restProps), /*#__PURE__*/react["createElement"]("div", { + className: "".concat(prefixCls, "-image"), + style: imageStyle + }, imageNode), des && /*#__PURE__*/react["createElement"]("p", { + className: "".concat(prefixCls, "-description") + }, des), children && /*#__PURE__*/react["createElement"]("div", { + className: "".concat(prefixCls, "-footer") + }, children)); + }); + }); +}; + +es_empty_Empty.PRESENTED_IMAGE_DEFAULT = defaultEmptyImg; +es_empty_Empty.PRESENTED_IMAGE_SIMPLE = simpleEmptyImg; +/* harmony default export */ var es_empty = __webpack_exports__["a"] = (es_empty_Empty); + +/***/ }), + +/***/ "EDT/": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.composite-symbol.js ***! + \*****************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var getCompositeKeyNode = __webpack_require__(/*! ../internals/composite-key */ "p5mE"); +var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY"); + +// https://github.com/tc39/proposal-richer-keys/tree/master/compositeKey +$({ global: true }, { + compositeSymbol: function compositeSymbol() { + if (arguments.length === 1 && typeof arguments[0] === 'string') return getBuiltIn('Symbol')['for'](arguments[0]); + return getCompositeKeyNode.apply(null, arguments).get('symbol', getBuiltIn('Symbol')); + } +}); + + +/***/ }), + +/***/ "EE3K": +/*!***************************************************!*\ + !*** ./node_modules/rc-notification/es/Notice.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 Notice; }); +/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "rePB"); +/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "1OyB"); +/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "vuIU"); +/* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "Ji7U"); +/* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "md7G"); +/* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "foSv"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ "q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react-dom */ "i8i4"); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ "TSYQ"); +/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__); + + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + + +var Notice = /*#__PURE__*/function (_Component) { + Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Notice, _Component); + + var _super = _createSuper(Notice); + + function Notice() { + var _this; + + Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, Notice); + + _this = _super.apply(this, arguments); + _this.closeTimer = null; + + _this.close = function (e) { + if (e) { + e.stopPropagation(); + } + + _this.clearCloseTimer(); + + var onClose = _this.props.onClose; + + if (onClose) { + onClose(); + } + }; + + _this.startCloseTimer = function () { + if (_this.props.duration) { + _this.closeTimer = window.setTimeout(function () { + _this.close(); + }, _this.props.duration * 1000); + } + }; + + _this.clearCloseTimer = function () { + if (_this.closeTimer) { + clearTimeout(_this.closeTimer); + _this.closeTimer = null; + } + }; + + return _this; + } + + Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Notice, [{ + key: "componentDidMount", + value: function componentDidMount() { + this.startCloseTimer(); + } + }, { + key: "componentDidUpdate", + value: function componentDidUpdate(prevProps) { + if (this.props.duration !== prevProps.duration || this.props.update) { + this.restartCloseTimer(); + } + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + this.clearCloseTimer(); + } + }, { + key: "restartCloseTimer", + value: function restartCloseTimer() { + this.clearCloseTimer(); + this.startCloseTimer(); + } + }, { + key: "render", + value: function render() { + var _this2 = this; + + var _this$props = this.props, + prefixCls = _this$props.prefixCls, + className = _this$props.className, + closable = _this$props.closable, + closeIcon = _this$props.closeIcon, + style = _this$props.style, + onClick = _this$props.onClick, + children = _this$props.children, + holder = _this$props.holder; + var componentClass = "".concat(prefixCls, "-notice"); + var dataOrAriaAttributeProps = Object.keys(this.props).reduce(function (acc, key) { + if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') { + acc[key] = _this2.props[key]; + } + + return acc; + }, {}); + var node = react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("div", Object.assign({ + className: classnames__WEBPACK_IMPORTED_MODULE_8___default()(componentClass, className, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(componentClass, "-closable"), closable)), + style: style, + onMouseEnter: this.clearCloseTimer, + onMouseLeave: this.startCloseTimer, + onClick: onClick + }, dataOrAriaAttributeProps), react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("div", { + className: "".concat(componentClass, "-content") + }, children), closable ? react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("a", { + tabIndex: 0, + onClick: this.close, + className: "".concat(componentClass, "-close") + }, closeIcon || react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("span", { + className: "".concat(componentClass, "-close-x") + })) : null); + + if (holder) { + return react_dom__WEBPACK_IMPORTED_MODULE_7___default.a.createPortal(node, holder); + } + + return node; + } + }]); + + return Notice; +}(react__WEBPACK_IMPORTED_MODULE_6__["Component"]); + + +Notice.defaultProps = { + onClose: function onClose() {}, + duration: 1.5, + style: { + right: '50%' + } +}; + +/***/ }), + +/***/ "ENF9": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/es.weak-map.js ***! + \*****************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(/*! ../internals/global */ "2oRo"); +var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "4syw"); +var InternalMetadataModule = __webpack_require__(/*! ../internals/internal-metadata */ "8YOa"); +var collection = __webpack_require__(/*! ../internals/collection */ "bWFh"); +var collectionWeak = __webpack_require__(/*! ../internals/collection-weak */ "rKzb"); +var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v"); +var enforceIternalState = __webpack_require__(/*! ../internals/internal-state */ "afO8").enforce; +var NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/native-weak-map */ "f5p1"); + +var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; +var isExtensible = Object.isExtensible; +var InternalWeakMap; + +var wrapper = function (init) { + return function WeakMap() { + return init(this, arguments.length ? arguments[0] : undefined); + }; +}; + +// `WeakMap` constructor +// https://tc39.github.io/ecma262/#sec-weakmap-constructor +var $WeakMap = module.exports = collection('WeakMap', wrapper, collectionWeak); + +// IE11 WeakMap frozen keys fix +// We can't use feature detection because it crash some old IE builds +// https://github.com/zloirock/core-js/issues/485 +if (NATIVE_WEAK_MAP && IS_IE11) { + InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true); + InternalMetadataModule.REQUIRED = true; + var WeakMapPrototype = $WeakMap.prototype; + var nativeDelete = WeakMapPrototype['delete']; + var nativeHas = WeakMapPrototype.has; + var nativeGet = WeakMapPrototype.get; + var nativeSet = WeakMapPrototype.set; + redefineAll(WeakMapPrototype, { + 'delete': function (key) { + if (isObject(key) && !isExtensible(key)) { + var state = enforceIternalState(this); + if (!state.frozen) state.frozen = new InternalWeakMap(); + return nativeDelete.call(this, key) || state.frozen['delete'](key); + } return nativeDelete.call(this, key); + }, + has: function has(key) { + if (isObject(key) && !isExtensible(key)) { + var state = enforceIternalState(this); + if (!state.frozen) state.frozen = new InternalWeakMap(); + return nativeHas.call(this, key) || state.frozen.has(key); + } return nativeHas.call(this, key); + }, + get: function get(key) { + if (isObject(key) && !isExtensible(key)) { + var state = enforceIternalState(this); + if (!state.frozen) state.frozen = new InternalWeakMap(); + return nativeHas.call(this, key) ? nativeGet.call(this, key) : state.frozen.get(key); + } return nativeGet.call(this, key); + }, + set: function set(key, value) { + if (isObject(key) && !isExtensible(key)) { + var state = enforceIternalState(this); + if (!state.frozen) state.frozen = new InternalWeakMap(); + nativeHas.call(this, key) ? nativeSet.call(this, key, value) : state.frozen.set(key, value); + } else nativeSet.call(this, key, value); + return this; + } + }); +} + + +/***/ }), + +/***/ "ESPI": +/*!**************************************************************!*\ + !*** ./node_modules/@ant-design/icons/InfoCircleOutlined.js ***! + \**************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; + + var _InfoCircleOutlined = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/InfoCircleOutlined */ "KtWR")); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _default = _InfoCircleOutlined; + exports.default = _default; + module.exports = _default; + +/***/ }), + +/***/ "EUja": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/internals/string-repeat.js ***! + \*********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var toInteger = __webpack_require__(/*! ../internals/to-integer */ "ppGB"); +var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF"); + +// `String.prototype.repeat` method implementation +// https://tc39.github.io/ecma262/#sec-string.prototype.repeat +module.exports = ''.repeat || function repeat(count) { + var str = String(requireObjectCoercible(this)); + var result = ''; + var n = toInteger(count); + if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions'); + for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str; + return result; +}; + + +/***/ }), + +/***/ "EbDI": +/*!****************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***! + \****************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); +} +module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "EdiO": +/*!******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! + \******************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + + return arr2; +} + +module.exports = _arrayLikeToArray; + +/***/ }), + +/***/ "Em2t": +/*!***********************************************!*\ + !*** ./node_modules/lodash/_stringToArray.js ***! + \***********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var asciiToArray = __webpack_require__(/*! ./_asciiToArray */ "bahg"), + hasUnicode = __webpack_require__(/*! ./_hasUnicode */ "quyA"), + unicodeToArray = __webpack_require__(/*! ./_unicodeToArray */ "0JQy"); + +/** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); +} + +module.exports = stringToArray; + + +/***/ }), + +/***/ "EnZy": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.split.js ***! + \*********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ "14Sl"); +var isRegExp = __webpack_require__(/*! ../internals/is-regexp */ "ROdP"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk"); +var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF"); +var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh"); +var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ "iqWW"); +var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ"); +var callRegExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "FMNM"); +var regexpExec = __webpack_require__(/*! ../internals/regexp-exec */ "kmMV"); +var fails = __webpack_require__(/*! ../internals/fails */ "0Dky"); + +var arrayPush = [].push; +var min = Math.min; +var MAX_UINT32 = 0xFFFFFFFF; + +// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError +var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); }); + +// @@split logic +fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) { + var internalSplit; + if ( + 'abbc'.split(/(b)*/)[1] == 'c' || + 'test'.split(/(?:)/, -1).length != 4 || + 'ab'.split(/(?:ab)*/).length != 2 || + '.'.split(/(.?)(.?)/).length != 4 || + '.'.split(/()()/).length > 1 || + ''.split(/.?/).length + ) { + // based on es5-shim implementation, need to rework it + internalSplit = function (separator, limit) { + var string = String(requireObjectCoercible(this)); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (separator === undefined) return [string]; + // If `separator` is not a regex, use native split + if (!isRegExp(separator)) { + return nativeSplit.call(string, separator, lim); + } + var output = []; + var flags = (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var match, lastIndex, lastLength; + while (match = regexpExec.call(separatorCopy, string)) { + lastIndex = separatorCopy.lastIndex; + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1)); + lastLength = match[0].length; + lastLastIndex = lastIndex; + if (output.length >= lim) break; + } + if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop + } + if (lastLastIndex === string.length) { + if (lastLength || !separatorCopy.test('')) output.push(''); + } else output.push(string.slice(lastLastIndex)); + return output.length > lim ? output.slice(0, lim) : output; + }; + // Chakra, V8 + } else if ('0'.split(undefined, 0).length) { + internalSplit = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit); + }; + } else internalSplit = nativeSplit; + + return [ + // `String.prototype.split` method + // https://tc39.github.io/ecma262/#sec-string.prototype.split + function split(separator, limit) { + var O = requireObjectCoercible(this); + var splitter = separator == undefined ? undefined : separator[SPLIT]; + return splitter !== undefined + ? splitter.call(separator, O, limit) + : internalSplit.call(String(O), separator, limit); + }, + // `RegExp.prototype[@@split]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split + // + // NOTE: This cannot be properly polyfilled in engines that don't support + // the 'y' flag. + function (regexp, limit) { + var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var C = speciesConstructor(rx, RegExp); + + var unicodeMatching = rx.unicode; + var flags = (rx.ignoreCase ? 'i' : '') + + (rx.multiline ? 'm' : '') + + (rx.unicode ? 'u' : '') + + (SUPPORTS_Y ? 'y' : 'g'); + + // ^(? + rx + ) is needed, in combination with some S slicing, to + // simulate the 'y' flag. + var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; + var p = 0; + var q = 0; + var A = []; + while (q < S.length) { + splitter.lastIndex = SUPPORTS_Y ? q : 0; + var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); + var e; + if ( + z === null || + (e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p + ) { + q = advanceStringIndex(S, q, unicodeMatching); + } else { + A.push(S.slice(p, q)); + if (A.length === lim) return A; + for (var i = 1; i <= z.length - 1; i++) { + A.push(z[i]); + if (A.length === lim) return A; + } + q = p = e; + } + } + A.push(S.slice(p)); + return A; + } + ]; +}, !SUPPORTS_Y); + + +/***/ }), + +/***/ "Ep9I": +/*!******************************************************!*\ + !*** ./node_modules/core-js/internals/same-value.js ***! + \******************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +// `SameValue` abstract operation +// https://tc39.github.io/ecma262/#sec-samevalue +module.exports = Object.is || function is(x, y) { + // eslint-disable-next-line no-self-compare + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; +}; + + +/***/ }), + +/***/ "Eqjn": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/modules/es.object.define-getter.js ***! + \*****************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/"); +var FORCED = __webpack_require__(/*! ../internals/object-prototype-accessors-forced */ "6x0u"); +var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM"); +var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "m/L8"); + +// `Object.prototype.__defineGetter__` method +// https://tc39.github.io/ecma262/#sec-object.prototype.__defineGetter__ +if (DESCRIPTORS) { + $({ target: 'Object', proto: true, forced: FORCED }, { + __defineGetter__: function __defineGetter__(P, getter) { + definePropertyModule.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true }); + } + }); +} + + +/***/ }), + +/***/ "ErOA": +/*!****************************!*\ + !*** ./src/utils/fetch.ts ***! + \****************************/ +/*! exports provided: parseParams, default, get, getqq, post, put, del */ +/*! exports used: default, parseParams */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return parseParams; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return request; }); +/* unused harmony export get */ +/* unused harmony export getqq */ +/* unused harmony export post */ +/* unused harmony export put */ +/* unused harmony export del */ +/* harmony import */ var antd_es_message_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/es/message/style */ "miYZ"); +/* harmony import */ var antd_es_message__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/es/message */ "tsqr"); +/* harmony import */ var antd_es_modal_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd/es/modal/style */ "2qtc"); +/* harmony import */ var antd_es_modal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd/es/modal */ "kLXV"); +/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw"); +/* harmony import */ var antd_es_notification_style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd/es/notification/style */ "/xke"); +/* harmony import */ var antd_es_notification__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! antd/es/notification */ "TeRw"); +/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */ "9og8"); +/* harmony import */ var dva__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! dva */ "LpSC"); +/* harmony import */ var dva__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(dva__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var _env__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./env */ "m3rI"); +/* harmony import */ var hash_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! hash.js */ "fZJM"); +/* harmony import */ var hash_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(hash_js__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! umi */ "9kvl"); +/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./util */ "1vsH"); + + + + + + + + +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + + + + + +var modalConfirm; +var codeMessage = { + 200: '服务器成功返回请求的数据。', + 201: '新建或修改数据成功。', + 202: '一个请求已经进入后台排队(异步任务)。', + 204: '删除数据成功。', + 400: '发出的请求有错误,服务器没有进行新建或修改数据的操作。', + 401: '用户没有权限(令牌、用户名、密码错误)。', + 403: '用户得到授权,但是访问是被禁止的。', + 404: '发出的请求针对的是不存在的记录,服务器没有进行操作。', + 406: '请求的格式不可得。', + 410: '请求的资源被永久删除,且不会再得到的。', + 422: '当创建一个对象时,发生一个验证错误。', + 500: '服务器发生错误,请检查服务器。', + 502: '网关错误。', + 503: '服务不可用,服务器暂时过载或维护。', + 504: '网关超时。' +}; +var checkStatus = /*#__PURE__*/function () { + var _ref = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(response, responseData) { + var errortext, text, resJson, error; + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + if (!(response.status >= 200 && response.status < 300)) { + _context.next = 2; + break; + } + return _context.abrupt("return", response); + case 2: + errortext = codeMessage[response.status] || response.statusText; + resJson = response.json(); + _context.next = 6; + return resJson.then(function (resolve, reject) { + setTimeout(function () { + var app = Object(umi__WEBPACK_IMPORTED_MODULE_11__[/* getDvaApp */ "b"])(); + // reportData(ENV.REPORT_SERVER + "/report/error", { + // code: resolve.code, + // status: response.status, + // message: resolve.message, + // requestData: { ...responseData, cookie: document.cookie }, + // responseData: { ...response, ...resolve }, + // user: app._store.getState().user.userInfo + // }) + }, 400); + text = resolve.message; + antd_es_notification__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].error({ + style: { + wordBreak: 'break-all' + }, + // duration: null, + message: resolve.message || "\u8BF7\u6C42\u9519\u8BEF ".concat(response.status, ": ").concat(response.message), + description: resolve.message ? '' : errortext + }); + }); + case 6: + error = new Error(errortext); + error.name = response.status; + error.response = response; + throw { + data: response, + code: response.status, + message: text || errortext + }; + case 10: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function checkStatus(_x, _x2) { + return _ref.apply(this, arguments); + }; +}(); +var cachedSave = function cachedSave(response, hashcode) { + var contentType = response.headers.get('Content-Type'); + if (contentType && contentType.match(/application\/json/i)) { + response.clone().text().then(function () { + // sessionStorage.setItem(hashcode, content) + // sessionStorage.setItem(`${hashcode}:timestamp`, Date.now()) + }); + } + return response; +}; +var parseParams = function parseParams(param) { + param = param || {}; + // param.domain = window.location.host + var paramStr = ''; + var _loop = function _loop(_key) { + if (typeof param[_key] === 'object') { + if (Array.isArray(param[_key])) { + param[_key].forEach(function (element, k) { + paramStr += '&' + _key + "[]=" + element; + }); + } + } else { + // if ((param[key]) || param[key] === 0) + paramStr += '&' + _key + '=' + param[_key]; + } + }; + for (var _key in param) { + _loop(_key); + } + return paramStr.substr(1); +}; +function request(url, option, flag) { + var _user$eduUserInfo; + !option.method ? option.method = 'get' : ''; + option.method = option.method.toUpperCase(); + option.mode = 'cors'; + var options = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({}, option); + // options.domain = window.location.host + + var fingerprint = url + (options.body ? JSON.stringify(options.body) : ''); + var hashcode = hash_js__WEBPACK_IMPORTED_MODULE_10___default.a.sha256().update(fingerprint).digest('hex'); + var defaultOptions = { + credentials: 'include', + withCredentials: true + }; + var newOptions = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({}, defaultOptions), options); + var eduHeader = { + 'X-Edu-Signature': '47626c90ec2104269a3a2785f98844ed', + 'X-Edu-Timestamp': '1725000798940', + 'X-Edu-Type': 'pc' + }; + if (newOptions.method === 'POST' || newOptions.method === 'PUT' || newOptions.method === 'PATCH' || newOptions.method === 'DELETE') { + if (!flag) { + newOptions.headers = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({ + Accept: 'application/json', + 'Content-Type': 'application/json; charset=utf-8' + }, newOptions.headers); + newOptions.body = JSON.stringify(options.body); + } else { + newOptions.headers = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({}, newOptions.headers); + newOptions.body = options.body; + } + } + if (newOptions.method == 'GET') { + newOptions.headers = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({ + Accept: 'application/json', + 'Content-Type': 'application/json; charset=utf-8' + }, eduHeader), newOptions.headers); + url += '?' + parseParams(options.params); + } + var _getDvaApp$_store$get = Object(umi__WEBPACK_IMPORTED_MODULE_11__[/* getDvaApp */ "b"])()._store.getState(), + user = _getDvaApp$_store$get.user; // if(user?.eduUserInfo?.token){ + // newOptions.headers={ + // ...newOptions.headers, + // Authorization:user?.eduUserInfo?.token + // } + // } + // newOptions.headers.Authorization = + // 'Bearer 09cb06de7874a0cfae0608ba5126b3b30dcb5d2a' + var token = (user === null || user === void 0 ? void 0 : (_user$eduUserInfo = user.eduUserInfo) === null || _user$eduUserInfo === void 0 ? void 0 : _user$eduUserInfo.token) || Object(_util__WEBPACK_IMPORTED_MODULE_12__[/* getCookie */ "i"])("logintrustie"); + if (token) { + newOptions.headers = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({}, newOptions.headers), {}, { + Authorization: token + }); + } + var expirys = options.expirys && 60; + /** + * @description: 枚举出请求数据格式类型 + * @param {type} 枚举类型 + * @return: + */ + var ContentType = /*#__PURE__*/function (ContentType) { + ContentType["json"] = "application/json;charset=UTF-8"; + ContentType["form"] = "application/x-www-form-urlencoded; charset=UTF-8"; + return ContentType; + }({}); + /** + * @description: 枚举request请求的method方法 + * @param {type} 枚举类型 + * @return: + */ + var HttpMethod = /*#__PURE__*/function (HttpMethod) { + HttpMethod["get"] = "GET"; + HttpMethod["post"] = "POST"; + return HttpMethod; + }({}); + /** + * @description: 声明请求头header的类型 + * @param {type} + * @return: + */ + /** + * @description: 声明fetch请求参数配置 + * @param {type} + * @return: + */ + // if (options.expirys !== false) { + // const cached = sessionStorage.getItem(hashcode) + // const whenCached = sessionStorage.getItem(`${hashcode}:timestamp`) + // if (cached !== null && whenCached !== null) { + // const age = (Date.now() - whenCached) / 1000 + // if (age < expirys) { + // const response = new Response(new Blob([cached])) + // return response.json() + // } + // sessionStorage.removeItem(hashcode) + // sessionStorage.removeItem(`${hashcode}:timestamp`) + // } + // } + + var downloadFile = /*#__PURE__*/function () { + var _ref2 = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(response) { + var d, fileName, blob, a, url, filename; + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return response.arrayBuffer(); + case 2: + d = _context2.sent; + blob = new Blob([d]); + try { + fileName = response.headers.get('content-type').split(';')[1].replace('filename=', ''); + } catch (e) { + fileName = 'userfiles.zip'; + } + a = document.createElement('a'); + url = window.URL.createObjectURL(blob); + filename = fileName; + a.href = url; + a.download = filename; + a.click(); + window.URL.revokeObjectURL(url); + case 12: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return function downloadFile(_x3) { + return _ref2.apply(this, arguments); + }; + }(); + var prefixUrl = _env__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].API_SERVER; + if (window.ENV === 'dev') prefixUrl = ''; + return dva__WEBPACK_IMPORTED_MODULE_8___default()(url.indexOf("https") > -1 ? url : prefixUrl + url, newOptions).then(function (response) { + return checkStatus(response, Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({ + url: url.indexOf("https") > -1 ? url : _env__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].API_SERVER + url + }, newOptions)); + }).then(function (response) { + return cachedSave(response, hashcode); + }).then( /*#__PURE__*/function () { + var _ref3 = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(response) { + var d, _newOptions$params, _newOptions$body; + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + if (!(response.status === 204)) { + _context3.next = 2; + break; + } + return _context3.abrupt("return", response.text()); + case 2: + if (!(response.headers.get('content-type').indexOf("application/json") > -1)) { + _context3.next = 8; + break; + } + _context3.next = 5; + return response.json(); + case 5: + d = _context3.sent; + _context3.next = 12; + break; + case 8: + downloadFile(response); + _context3.next = 11; + return response.arrayBuffer(); + case 11: + d = _context3.sent; + case 12: + try { + if (d.status === 401 && (!((_newOptions$params = newOptions.params) === null || _newOptions$params === void 0 ? void 0 : _newOptions$params.hidePopLogin) || !((_newOptions$body = newOptions.body) === null || _newOptions$body === void 0 ? void 0 : _newOptions$body.hidePopLogin))) { + Object(umi__WEBPACK_IMPORTED_MODULE_11__[/* getDvaApp */ "b"])()._store.dispatch({ + type: 'user/showPopLogin', + payload: { + showPopLogin: true, + showClosable: true + } + }); + } + if (d.status === 402) { + if (localStorage.getItem('addinfo') === '2') { + //弹窗 填充信息 + Object(umi__WEBPACK_IMPORTED_MODULE_11__[/* getDvaApp */ "b"])()._store.dispatch({ + type: 'shixunHomeworks/setActionTabs', + payload: { + key: '填充信息弹窗' + } + }); + } else { + modalConfirm = modalConfirm || antd_es_modal__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].confirm({ + visible: false, + okText: "确定", + cancelText: "取消" + }); + modalConfirm.update({ + centered: true, + visible: true, + title: "提示", + content: "您需要去完善您的个人资料,才能使用此功能", + okText: "立即完善", + cancelText: "稍后完善", + onOk: function onOk() { + umi__WEBPACK_IMPORTED_MODULE_11__[/* history */ "c"].push('/account/profile/edit'); + } + }); + } + } + } catch (e) { + console.log("fetcherr", e); + } + handleHttpStatus(d, url); + return _context3.abrupt("return", d); + case 15: + case "end": + return _context3.stop(); + } + }, _callee3); + })); + return function (_x4) { + return _ref3.apply(this, arguments); + }; + }()).catch(function (e) { + try { + var status = e.code; + if (status === 401) { + Object(umi__WEBPACK_IMPORTED_MODULE_11__[/* getDvaApp */ "b"])()._store.dispatch({ + type: 'user/showPopLogin', + payload: { + showPopLogin: true, + showClosable: true + } + }); + } + handleHttpStatus(e, url); + return e; + } catch (e) {} + }); +} +var historyFlag = false; +var errorFlag = false; +var handleHttpStatus = function handleHttpStatus(e, url) { + if ((e.status == -1 || e.status == -2 || e.status > 400) && e.status != 403 && !errorFlag) { + errorFlag = true; + setTimeout(function () { + return errorFlag = false; + }, 500); + antd_es_message__WEBPACK_IMPORTED_MODULE_1__[/* default */ "b"].warn({ + content: e.message, + key: "message-key" + }); + } + var mapping = { + 403: '/403', + 404: '/404', + 500: '/500' + }; + if (mapping[e.status] && !historyFlag) { + var _getDvaApp$_store$get2 = Object(umi__WEBPACK_IMPORTED_MODULE_11__[/* getDvaApp */ "b"])()._store.getState(), + user = _getDvaApp$_store$get2.user; + var userInfo = user.userInfo; + if (window.location.pathname.indexOf("/users") > -1 && document.domain === "kepukehuan.educoder.net") alert(e.status + ":" + (userInfo === null || userInfo === void 0 ? void 0 : userInfo.id) + "---" + url); + historyFlag = true; + setTimeout(function () { + return historyFlag = false; + }, 500); + if (e.status === 403) { + umi__WEBPACK_IMPORTED_MODULE_11__[/* history */ "c"].replace(mapping[e.status]); + } else { + umi__WEBPACK_IMPORTED_MODULE_11__[/* history */ "c"].replace(mapping[e.status]); + } + sessionStorage.setItem('errorStatus', JSON.stringify(e)); + } +}; +function get(url, params) { + return request("/api/".concat(url), { + method: 'Get', + params: params || {} + }); +} +function getqq(url, params) { + return request("/".concat(url), { + method: 'Get', + params: params + }); +} +function post(url, params) { + return request("/api/".concat(url), { + method: 'Post', + body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({}, params) + }); +} +function put(url, params) { + return request("/api/".concat(url), { + method: 'Put', + body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({}, params) + }); +} +function del(url) { + return request("/api/".concat(url), { + method: 'delete' + }); +} + +/***/ }), + +/***/ "Ew+T": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/web.immediate.js ***! + \*******************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var global = __webpack_require__(/*! ../internals/global */ "2oRo"); +var task = __webpack_require__(/*! ../internals/task */ "LPSS"); + +var FORCED = !global.setImmediate || !global.clearImmediate; + +// http://w3c.github.io/setImmediate/ +$({ global: true, bind: true, enumerable: true, forced: FORCED }, { + // `setImmediate` method + // http://w3c.github.io/setImmediate/#si-setImmediate + setImmediate: task.set, + // `clearImmediate` method + // http://w3c.github.io/setImmediate/#si-clearImmediate + clearImmediate: task.clear +}); + + +/***/ }), + +/***/ "ExA7": +/*!*********************************************!*\ + !*** ./node_modules/lodash/isObjectLike.js ***! + \*********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +module.exports = isObjectLike; + + +/***/ }), + +/***/ "F8JR": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/internals/array-for-each.js ***! + \**********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $forEach = __webpack_require__(/*! ../internals/array-iteration */ "tycR").forEach; +var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "pkCn"); +var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "rkAj"); + +var STRICT_METHOD = arrayMethodIsStrict('forEach'); +var USES_TO_LENGTH = arrayMethodUsesToLength('forEach'); + +// `Array.prototype.forEach` method implementation +// https://tc39.github.io/ecma262/#sec-array.prototype.foreach +module.exports = (!STRICT_METHOD || !USES_TO_LENGTH) ? function forEach(callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); +} : [].forEach; + + +/***/ }), + +/***/ "FAml": +/*!***************************************!*\ + !*** ./node_modules/es-errors/ref.js ***! + \***************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** @type {import('./ref')} */ +module.exports = ReferenceError; + + +/***/ }), + +/***/ "FDzp": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/modules/es.typed-array.int32-array.js ***! + \********************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var createTypedArrayConstructor = __webpack_require__(/*! ../internals/typed-array-constructor */ "dOgj"); + +// `Int32Array` constructor +// https://tc39.github.io/ecma262/#sec-typedarray-objects +createTypedArrayConstructor('Int32', function (init) { + return function Int32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ "FF6l": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/internals/array-copy-within.js ***! + \*************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW"); +var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "I8vh"); +var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ"); + +var min = Math.min; + +// `Array.prototype.copyWithin` method implementation +// https://tc39.github.io/ecma262/#sec-array.prototype.copywithin +module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { + var O = toObject(this); + var len = toLength(O.length); + var to = toAbsoluteIndex(target, len); + var from = toAbsoluteIndex(start, len); + var end = arguments.length > 2 ? arguments[2] : undefined; + var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); + var inc = 1; + if (from < to && to < from + count) { + inc = -1; + from += count - 1; + to += count - 1; + } + while (count-- > 0) { + if (from in O) O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } return O; +}; + + +/***/ }), + +/***/ "FIfw": +/*!****************************************************!*\ + !*** ./node_modules/antd/es/grid/style/index.less ***! + \****************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), + +/***/ "FMNM": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/internals/regexp-exec-abstract.js ***! + \****************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(/*! ./classof-raw */ "xrYK"); +var regexpExec = __webpack_require__(/*! ./regexp-exec */ "kmMV"); + +// `RegExpExec` abstract operation +// https://tc39.github.io/ecma262/#sec-regexpexec +module.exports = function (R, S) { + var exec = R.exec; + if (typeof exec === 'function') { + var result = exec.call(R, S); + if (typeof result !== 'object') { + throw TypeError('RegExp exec method returned something other than an Object or null'); + } + return result; + } + + if (classof(R) !== 'RegExp') { + throw TypeError('RegExp#exec called on incompatible receiver'); + } + + return regexpExec.call(R, S); +}; + + + +/***/ }), + +/***/ "FMtG": +/*!******************************************************************!*\ + !*** ./node_modules/@umijs/plugin-model/lib/helpers/constant.js ***! + \******************************************************************/ +/*! no static exports found */ +/*! exports used: UmiContext */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.UmiContext = void 0; + +var _react = _interopRequireDefault(__webpack_require__(/*! react */ "q1tI")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var UmiContext = _react.default.createContext({}); + +exports.UmiContext = UmiContext; + +/***/ }), + +/***/ "FUNW": +/*!********************************************************************************************!*\ + !*** ./node_modules/react-router/node_modules/mini-create-react-context/dist/esm/index.js ***! + \********************************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module uses injected variables (global) */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ "dI71"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "17x9"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); + + + + + +var MAX_SIGNED_31_BIT_INT = 1073741823; +var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : {}; + +function getUniqueId() { + var key = '__global_unique_id__'; + return commonjsGlobal[key] = (commonjsGlobal[key] || 0) + 1; +} + +function objectIs(x, y) { + if (x === y) { + return x !== 0 || 1 / x === 1 / y; + } else { + return x !== x && y !== y; + } +} + +function createEventEmitter(value) { + var handlers = []; + return { + on: function on(handler) { + handlers.push(handler); + }, + off: function off(handler) { + handlers = handlers.filter(function (h) { + return h !== handler; + }); + }, + get: function get() { + return value; + }, + set: function set(newValue, changedBits) { + value = newValue; + handlers.forEach(function (handler) { + return handler(value, changedBits); + }); + } + }; +} + +function onlyChild(children) { + return Array.isArray(children) ? children[0] : children; +} + +function createReactContext(defaultValue, calculateChangedBits) { + var _Provider$childContex, _Consumer$contextType; + + var contextProp = '__create-react-context-' + getUniqueId() + '__'; + + var Provider = /*#__PURE__*/function (_Component) { + Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Provider, _Component); + + function Provider() { + var _this; + + _this = _Component.apply(this, arguments) || this; + _this.emitter = createEventEmitter(_this.props.value); + return _this; + } + + var _proto = Provider.prototype; + + _proto.getChildContext = function getChildContext() { + var _ref; + + return _ref = {}, _ref[contextProp] = this.emitter, _ref; + }; + + _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + if (this.props.value !== nextProps.value) { + var oldValue = this.props.value; + var newValue = nextProps.value; + var changedBits; + + if (objectIs(oldValue, newValue)) { + changedBits = 0; + } else { + changedBits = typeof calculateChangedBits === 'function' ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT; + + if (false) {} + + changedBits |= 0; + + if (changedBits !== 0) { + this.emitter.set(nextProps.value, changedBits); + } + } + } + }; + + _proto.render = function render() { + return this.props.children; + }; + + return Provider; + }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]); + + Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object.isRequired, _Provider$childContex); + + var Consumer = /*#__PURE__*/function (_Component2) { + Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Consumer, _Component2); + + function Consumer() { + var _this2; + + _this2 = _Component2.apply(this, arguments) || this; + _this2.state = { + value: _this2.getValue() + }; + + _this2.onUpdate = function (newValue, changedBits) { + var observedBits = _this2.observedBits | 0; + + if ((observedBits & changedBits) !== 0) { + _this2.setState({ + value: _this2.getValue() + }); + } + }; + + return _this2; + } + + var _proto2 = Consumer.prototype; + + _proto2.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + var observedBits = nextProps.observedBits; + this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits; + }; + + _proto2.componentDidMount = function componentDidMount() { + if (this.context[contextProp]) { + this.context[contextProp].on(this.onUpdate); + } + + var observedBits = this.props.observedBits; + this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits; + }; + + _proto2.componentWillUnmount = function componentWillUnmount() { + if (this.context[contextProp]) { + this.context[contextProp].off(this.onUpdate); + } + }; + + _proto2.getValue = function getValue() { + if (this.context[contextProp]) { + return this.context[contextProp].get(); + } else { + return defaultValue; + } + }; + + _proto2.render = function render() { + return onlyChild(this.props.children)(this.state.value); + }; + + return Consumer; + }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]); + + Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object, _Consumer$contextType); + return { + Provider: Provider, + Consumer: Consumer + }; +} + +var index = react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext || createReactContext; + +/* harmony default export */ __webpack_exports__["a"] = (index); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ "yLpj"))) + +/***/ }), + +/***/ "FZtP": +/*!**********************************************************************!*\ + !*** ./node_modules/core-js/modules/web.dom-collections.for-each.js ***! + \**********************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(/*! ../internals/global */ "2oRo"); +var DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ "/byt"); +var forEach = __webpack_require__(/*! ../internals/array-for-each */ "F8JR"); +var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp"); + +for (var COLLECTION_NAME in DOMIterables) { + var Collection = global[COLLECTION_NAME]; + var CollectionPrototype = Collection && Collection.prototype; + // some Chrome versions have non-configurable methods on DOMTokenList + if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try { + createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach); + } catch (error) { + CollectionPrototype.forEach = forEach; + } +} + + +/***/ }), + +/***/ "Ff2n": +/*!****************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.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 _objectWithoutProperties; }); +/* harmony import */ var _objectWithoutPropertiesLoose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./objectWithoutPropertiesLoose.js */ "zLVn"); + +function _objectWithoutProperties(source, excluded) { + if (source == null) return {}; + var target = Object(_objectWithoutPropertiesLoose_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(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; +} + +/***/ }), + +/***/ "FfOG": +/*!*********************************************!*\ + !*** ./src/.umi-production/core/history.ts ***! + \*********************************************/ +/*! exports provided: createHistory, setCreateHistoryOptions, history */ +/*! exports used: createHistory, history */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createHistory; }); +/* unused harmony export setCreateHistoryOptions */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return history; }); +/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw"); +/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_preset_built_in_node_modules_umijs_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/preset-built-in/node_modules/@umijs/runtime */ "YS25"); + +// @ts-nocheck + +var options = { + "basename": "/" +}; +if (window.routerBase) { + options.basename = window.routerBase; +} + +// remove initial history because of ssr +var history = Object({"NODE_ENV":"production"}).__IS_SERVER ? null : Object(D_projects_competitions_forgeplus_react_node_modules_umijs_preset_built_in_node_modules_umijs_runtime__WEBPACK_IMPORTED_MODULE_1__[/* createBrowserHistory */ "a"])(options); +var createHistory = function createHistory() { + var hotReload = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + if (!hotReload) { + history = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_preset_built_in_node_modules_umijs_runtime__WEBPACK_IMPORTED_MODULE_1__[/* createBrowserHistory */ "a"])(options); + } + return history; +}; + +// 通常仅微前端场景需要调用这个 API +var setCreateHistoryOptions = function setCreateHistoryOptions() { + var newOpts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + options = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, options), newOpts); +}; + + +/***/ }), + +/***/ "Fghh": +/*!*************************************************************************!*\ + !*** ./src/.umi-production/plugin-locale/localeExports.ts + 20 modules ***! + \*************************************************************************/ +/*! exports provided: createIntl, FormattedDate, FormattedDateParts, FormattedDisplayName, FormattedHTMLMessage, FormattedList, FormattedMessage, FormattedNumber, FormattedNumberParts, FormattedPlural, FormattedRelativeTime, FormattedTime, FormattedTimeParts, IntlContext, IntlProvider, RawIntlProvider, createIntlCache, defineMessages, injectIntl, useIntl, localeInfo, addLocale, getIntl, setIntl, getLocale, getDirection, setLocale, formatMessage, getAllLocales */ +/*! exports used: RawIntlProvider, getDirection, getIntl, getLocale, localeInfo, setIntl, setLocale */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass.js because of ./src/components/modal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js because of ./src/components/modal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits.js because of ./src/components/modal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js because of ./src/components/modal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js because of ./src/components/modal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/plugin-locale/locale.tsx because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/intl-locales-supported/dist/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallow-equal/objects/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/umi/node_modules/@umijs/runtime/dist/index.esm.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/warning/warning.js (<- Module is not an ECMAScript module) */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ Provider; }); +__webpack_require__.d(__webpack_exports__, "e", function() { return /* binding */ localeInfo; }); +__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ localeExports_getIntl; }); +__webpack_require__.d(__webpack_exports__, "f", function() { return /* binding */ setIntl; }); +__webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ localeExports_getLocale; }); +__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ getDirection; }); +__webpack_require__.d(__webpack_exports__, "g", function() { return /* binding */ localeExports_setLocale; }); + +// UNUSED EXPORTS: createIntl, FormattedDate, FormattedDateParts, FormattedDisplayName, FormattedHTMLMessage, FormattedList, FormattedMessage, FormattedNumber, FormattedNumberParts, FormattedPlural, FormattedRelativeTime, FormattedTime, FormattedTimeParts, IntlContext, IntlProvider, createIntlCache, defineMessages, injectIntl, useIntl, addLocale, formatMessage, getAllLocales + +// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +var classCallCheck = __webpack_require__("fWQN"); + +// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass.js +var createClass = __webpack_require__("mtLc"); + +// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js + 2 modules +var possibleConstructorReturn = __webpack_require__("Nsem"); + +// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +var isNativeReflectConstruct = __webpack_require__("cHpt"); + +// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +var getPrototypeOf = __webpack_require__("oZsa"); + +// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules +var inherits = __webpack_require__("yKVA"); + +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__("q1tI"); + +// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js +var defineProperty = __webpack_require__("jrin"); + +// EXTERNAL MODULE: ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +var hoist_non_react_statics_cjs = __webpack_require__("2mql"); +var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs); + +// CONCATENATED MODULE: ./node_modules/intl-messageformat-parser/lib/types.js +var TYPE; +(function (TYPE) { + /** + * Raw text + */ + TYPE[TYPE["literal"] = 0] = "literal"; + /** + * Variable w/o any format, e.g `var` in `this is a {var}` + */ + TYPE[TYPE["argument"] = 1] = "argument"; + /** + * Variable w/ number format + */ + TYPE[TYPE["number"] = 2] = "number"; + /** + * Variable w/ date format + */ + TYPE[TYPE["date"] = 3] = "date"; + /** + * Variable w/ time format + */ + TYPE[TYPE["time"] = 4] = "time"; + /** + * Variable w/ select format + */ + TYPE[TYPE["select"] = 5] = "select"; + /** + * Variable w/ plural format + */ + TYPE[TYPE["plural"] = 6] = "plural"; + /** + * Only possible within plural argument. + * This is the `#` symbol that will be substituted with the count. + */ + TYPE[TYPE["pound"] = 7] = "pound"; +})(TYPE || (TYPE = {})); +/** + * Type Guards + */ +function isLiteralElement(el) { + return el.type === TYPE.literal; +} +function isArgumentElement(el) { + return el.type === TYPE.argument; +} +function isNumberElement(el) { + return el.type === TYPE.number; +} +function isDateElement(el) { + return el.type === TYPE.date; +} +function isTimeElement(el) { + return el.type === TYPE.time; +} +function isSelectElement(el) { + return el.type === TYPE.select; +} +function isPluralElement(el) { + return el.type === TYPE.plural; +} +function isPoundElement(el) { + return el.type === TYPE.pound; +} +function isNumberSkeleton(el) { + return !!(el && typeof el === 'object' && el.type === 0 /* number */); +} +function isDateTimeSkeleton(el) { + return !!(el && typeof el === 'object' && el.type === 1 /* dateTime */); +} +function createLiteralElement(value) { + return { + type: TYPE.literal, + value: value, + }; +} +function createNumberElement(value, style) { + return { + type: TYPE.number, + value: value, + style: style, + }; +} + +// CONCATENATED MODULE: ./node_modules/intl-messageformat-parser/lib/parser.js +// tslint:disable:only-arrow-functions +// tslint:disable:object-literal-shorthand +// tslint:disable:trailing-comma +// tslint:disable:object-literal-sort-keys +// tslint:disable:one-variable-per-declaration +// tslint:disable:max-line-length +// tslint:disable:no-consecutive-blank-lines +// tslint:disable:align +var __extends = (undefined && undefined.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __assign = (undefined && undefined.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +// Generated by PEG.js v. 0.10.0 (ts-pegjs plugin v. 0.2.6 ) +// +// https://pegjs.org/ https://github.com/metadevpro/ts-pegjs + +var SyntaxError = /** @class */ (function (_super) { + __extends(SyntaxError, _super); + function SyntaxError(message, expected, found, location) { + var _this = _super.call(this) || this; + _this.message = message; + _this.expected = expected; + _this.found = found; + _this.location = location; + _this.name = "SyntaxError"; + if (typeof Error.captureStackTrace === "function") { + Error.captureStackTrace(_this, SyntaxError); + } + return _this; + } + SyntaxError.buildMessage = function (expected, found) { + function hex(ch) { + return ch.charCodeAt(0).toString(16).toUpperCase(); + } + function literalEscape(s) { + return s + .replace(/\\/g, "\\\\") + .replace(/"/g, "\\\"") + .replace(/\0/g, "\\0") + .replace(/\t/g, "\\t") + .replace(/\n/g, "\\n") + .replace(/\r/g, "\\r") + .replace(/[\x00-\x0F]/g, function (ch) { return "\\x0" + hex(ch); }) + .replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) { return "\\x" + hex(ch); }); + } + function classEscape(s) { + return s + .replace(/\\/g, "\\\\") + .replace(/\]/g, "\\]") + .replace(/\^/g, "\\^") + .replace(/-/g, "\\-") + .replace(/\0/g, "\\0") + .replace(/\t/g, "\\t") + .replace(/\n/g, "\\n") + .replace(/\r/g, "\\r") + .replace(/[\x00-\x0F]/g, function (ch) { return "\\x0" + hex(ch); }) + .replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) { return "\\x" + hex(ch); }); + } + function describeExpectation(expectation) { + switch (expectation.type) { + case "literal": + return "\"" + literalEscape(expectation.text) + "\""; + case "class": + var escapedParts = expectation.parts.map(function (part) { + return Array.isArray(part) + ? classEscape(part[0]) + "-" + classEscape(part[1]) + : classEscape(part); + }); + return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]"; + case "any": + return "any character"; + case "end": + return "end of input"; + case "other": + return expectation.description; + } + } + function describeExpected(expected1) { + var descriptions = expected1.map(describeExpectation); + var i; + var j; + descriptions.sort(); + if (descriptions.length > 0) { + for (i = 1, j = 1; i < descriptions.length; i++) { + if (descriptions[i - 1] !== descriptions[i]) { + descriptions[j] = descriptions[i]; + j++; + } + } + descriptions.length = j; + } + switch (descriptions.length) { + case 1: + return descriptions[0]; + case 2: + return descriptions[0] + " or " + descriptions[1]; + default: + return descriptions.slice(0, -1).join(", ") + + ", or " + + descriptions[descriptions.length - 1]; + } + } + function describeFound(found1) { + return found1 ? "\"" + literalEscape(found1) + "\"" : "end of input"; + } + return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; + }; + return SyntaxError; +}(Error)); + +function peg$parse(input, options) { + options = options !== undefined ? options : {}; + var peg$FAILED = {}; + var peg$startRuleFunctions = { start: peg$parsestart }; + var peg$startRuleFunction = peg$parsestart; + var peg$c0 = function (parts) { + return parts.join(''); + }; + var peg$c1 = function (messageText) { + return __assign({ type: TYPE.literal, value: messageText }, insertLocation()); + }; + var peg$c2 = "#"; + var peg$c3 = peg$literalExpectation("#", false); + var peg$c4 = function () { + return __assign({ type: TYPE.pound }, insertLocation()); + }; + var peg$c5 = peg$otherExpectation("argumentElement"); + var peg$c6 = "{"; + var peg$c7 = peg$literalExpectation("{", false); + var peg$c8 = "}"; + var peg$c9 = peg$literalExpectation("}", false); + var peg$c10 = function (value) { + return __assign({ type: TYPE.argument, value: value }, insertLocation()); + }; + var peg$c11 = peg$otherExpectation("numberSkeletonId"); + var peg$c12 = /^['\/{}]/; + var peg$c13 = peg$classExpectation(["'", "/", "{", "}"], false, false); + var peg$c14 = peg$anyExpectation(); + var peg$c15 = peg$otherExpectation("numberSkeletonTokenOption"); + var peg$c16 = "/"; + var peg$c17 = peg$literalExpectation("/", false); + var peg$c18 = function (option) { return option; }; + var peg$c19 = peg$otherExpectation("numberSkeletonToken"); + var peg$c20 = function (stem, options) { + return { stem: stem, options: options }; + }; + var peg$c21 = function (tokens) { + return __assign({ type: 0 /* number */, tokens: tokens }, insertLocation()); + }; + var peg$c22 = "::"; + var peg$c23 = peg$literalExpectation("::", false); + var peg$c24 = function (skeleton) { return skeleton; }; + var peg$c25 = function () { messageCtx.push('numberArgStyle'); return true; }; + var peg$c26 = function (style) { + messageCtx.pop(); + return style.replace(/\s*$/, ''); + }; + var peg$c27 = ","; + var peg$c28 = peg$literalExpectation(",", false); + var peg$c29 = "number"; + var peg$c30 = peg$literalExpectation("number", false); + var peg$c31 = function (value, type, style) { + return __assign({ type: type === 'number' ? TYPE.number : type === 'date' ? TYPE.date : TYPE.time, style: style && style[2], value: value }, insertLocation()); + }; + var peg$c32 = "'"; + var peg$c33 = peg$literalExpectation("'", false); + var peg$c34 = /^[^']/; + var peg$c35 = peg$classExpectation(["'"], true, false); + var peg$c36 = /^[^a-zA-Z'{}]/; + var peg$c37 = peg$classExpectation([["a", "z"], ["A", "Z"], "'", "{", "}"], true, false); + var peg$c38 = /^[a-zA-Z]/; + var peg$c39 = peg$classExpectation([["a", "z"], ["A", "Z"]], false, false); + var peg$c40 = function (pattern) { + return __assign({ type: 1 /* dateTime */, pattern: pattern }, insertLocation()); + }; + var peg$c41 = function () { messageCtx.push('dateOrTimeArgStyle'); return true; }; + var peg$c42 = "date"; + var peg$c43 = peg$literalExpectation("date", false); + var peg$c44 = "time"; + var peg$c45 = peg$literalExpectation("time", false); + var peg$c46 = "plural"; + var peg$c47 = peg$literalExpectation("plural", false); + var peg$c48 = "selectordinal"; + var peg$c49 = peg$literalExpectation("selectordinal", false); + var peg$c50 = "offset:"; + var peg$c51 = peg$literalExpectation("offset:", false); + var peg$c52 = function (value, pluralType, offset, options) { + return __assign({ type: TYPE.plural, pluralType: pluralType === 'plural' ? 'cardinal' : 'ordinal', value: value, offset: offset ? offset[2] : 0, options: options.reduce(function (all, _a) { + var id = _a.id, value = _a.value, optionLocation = _a.location; + if (id in all) { + error("Duplicate option \"" + id + "\" in plural element: \"" + text() + "\"", location()); + } + all[id] = { + value: value, + location: optionLocation + }; + return all; + }, {}) }, insertLocation()); + }; + var peg$c53 = "select"; + var peg$c54 = peg$literalExpectation("select", false); + var peg$c55 = function (value, options) { + return __assign({ type: TYPE.select, value: value, options: options.reduce(function (all, _a) { + var id = _a.id, value = _a.value, optionLocation = _a.location; + if (id in all) { + error("Duplicate option \"" + id + "\" in select element: \"" + text() + "\"", location()); + } + all[id] = { + value: value, + location: optionLocation + }; + return all; + }, {}) }, insertLocation()); + }; + var peg$c56 = "="; + var peg$c57 = peg$literalExpectation("=", false); + var peg$c58 = function (id) { messageCtx.push('select'); return true; }; + var peg$c59 = function (id, value) { + messageCtx.pop(); + return __assign({ id: id, + value: value }, insertLocation()); + }; + var peg$c60 = function (id) { messageCtx.push('plural'); return true; }; + var peg$c61 = function (id, value) { + messageCtx.pop(); + return __assign({ id: id, + value: value }, insertLocation()); + }; + var peg$c62 = peg$otherExpectation("whitespace"); + var peg$c63 = /^[\t-\r \x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/; + var peg$c64 = peg$classExpectation([["\t", "\r"], " ", "\x85", "\xA0", "\u1680", ["\u2000", "\u200A"], "\u2028", "\u2029", "\u202F", "\u205F", "\u3000"], false, false); + var peg$c65 = peg$otherExpectation("syntax pattern"); + var peg$c66 = /^[!-\/:-@[-\^`{-~\xA1-\xA7\xA9\xAB\xAC\xAE\xB0\xB1\xB6\xBB\xBF\xD7\xF7\u2010-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u245F\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3020\u3030\uFD3E\uFD3F\uFE45\uFE46]/; + var peg$c67 = peg$classExpectation([["!", "/"], [":", "@"], ["[", "^"], "`", ["{", "~"], ["\xA1", "\xA7"], "\xA9", "\xAB", "\xAC", "\xAE", "\xB0", "\xB1", "\xB6", "\xBB", "\xBF", "\xD7", "\xF7", ["\u2010", "\u2027"], ["\u2030", "\u203E"], ["\u2041", "\u2053"], ["\u2055", "\u205E"], ["\u2190", "\u245F"], ["\u2500", "\u2775"], ["\u2794", "\u2BFF"], ["\u2E00", "\u2E7F"], ["\u3001", "\u3003"], ["\u3008", "\u3020"], "\u3030", "\uFD3E", "\uFD3F", "\uFE45", "\uFE46"], false, false); + var peg$c68 = peg$otherExpectation("optional whitespace"); + var peg$c69 = peg$otherExpectation("number"); + var peg$c70 = "-"; + var peg$c71 = peg$literalExpectation("-", false); + var peg$c72 = function (negative, num) { + return num + ? negative + ? -num + : num + : 0; + }; + var peg$c73 = peg$otherExpectation("apostrophe"); + var peg$c74 = peg$otherExpectation("double apostrophes"); + var peg$c75 = "''"; + var peg$c76 = peg$literalExpectation("''", false); + var peg$c77 = function () { return "'"; }; + var peg$c78 = function (escapedChar, quotedChars) { + return escapedChar + quotedChars.replace("''", "'"); + }; + var peg$c79 = function (x) { + return (x !== '{' && + !(isInPluralOption() && x === '#') && + !(isNestedMessageText() && x === '}')); + }; + var peg$c80 = "\n"; + var peg$c81 = peg$literalExpectation("\n", false); + var peg$c82 = function (x) { + return x === '{' || x === '}' || (isInPluralOption() && x === '#'); + }; + var peg$c83 = peg$otherExpectation("argNameOrNumber"); + var peg$c84 = peg$otherExpectation("argNumber"); + var peg$c85 = "0"; + var peg$c86 = peg$literalExpectation("0", false); + var peg$c87 = function () { return 0; }; + var peg$c88 = /^[1-9]/; + var peg$c89 = peg$classExpectation([["1", "9"]], false, false); + var peg$c90 = /^[0-9]/; + var peg$c91 = peg$classExpectation([["0", "9"]], false, false); + var peg$c92 = function (digits) { + return parseInt(digits.join(''), 10); + }; + var peg$c93 = peg$otherExpectation("argName"); + var peg$currPos = 0; + var peg$savedPos = 0; + var peg$posDetailsCache = [{ line: 1, column: 1 }]; + var peg$maxFailPos = 0; + var peg$maxFailExpected = []; + var peg$silentFails = 0; + var peg$result; + if (options.startRule !== undefined) { + if (!(options.startRule in peg$startRuleFunctions)) { + throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); + } + peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; + } + function text() { + return input.substring(peg$savedPos, peg$currPos); + } + function location() { + return peg$computeLocation(peg$savedPos, peg$currPos); + } + function expected(description, location1) { + location1 = location1 !== undefined + ? location1 + : peg$computeLocation(peg$savedPos, peg$currPos); + throw peg$buildStructuredError([peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location1); + } + function error(message, location1) { + location1 = location1 !== undefined + ? location1 + : peg$computeLocation(peg$savedPos, peg$currPos); + throw peg$buildSimpleError(message, location1); + } + function peg$literalExpectation(text1, ignoreCase) { + return { type: "literal", text: text1, ignoreCase: ignoreCase }; + } + function peg$classExpectation(parts, inverted, ignoreCase) { + return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase }; + } + function peg$anyExpectation() { + return { type: "any" }; + } + function peg$endExpectation() { + return { type: "end" }; + } + function peg$otherExpectation(description) { + return { type: "other", description: description }; + } + function peg$computePosDetails(pos) { + var details = peg$posDetailsCache[pos]; + var p; + if (details) { + return details; + } + else { + p = pos - 1; + while (!peg$posDetailsCache[p]) { + p--; + } + details = peg$posDetailsCache[p]; + details = { + line: details.line, + column: details.column + }; + while (p < pos) { + if (input.charCodeAt(p) === 10) { + details.line++; + details.column = 1; + } + else { + details.column++; + } + p++; + } + peg$posDetailsCache[pos] = details; + return details; + } + } + function peg$computeLocation(startPos, endPos) { + var startPosDetails = peg$computePosDetails(startPos); + var endPosDetails = peg$computePosDetails(endPos); + return { + start: { + offset: startPos, + line: startPosDetails.line, + column: startPosDetails.column + }, + end: { + offset: endPos, + line: endPosDetails.line, + column: endPosDetails.column + } + }; + } + function peg$fail(expected1) { + if (peg$currPos < peg$maxFailPos) { + return; + } + if (peg$currPos > peg$maxFailPos) { + peg$maxFailPos = peg$currPos; + peg$maxFailExpected = []; + } + peg$maxFailExpected.push(expected1); + } + function peg$buildSimpleError(message, location1) { + return new SyntaxError(message, [], "", location1); + } + function peg$buildStructuredError(expected1, found, location1) { + return new SyntaxError(SyntaxError.buildMessage(expected1, found), expected1, found, location1); + } + function peg$parsestart() { + var s0; + s0 = peg$parsemessage(); + return s0; + } + function peg$parsemessage() { + var s0, s1; + s0 = []; + s1 = peg$parsemessageElement(); + while (s1 !== peg$FAILED) { + s0.push(s1); + s1 = peg$parsemessageElement(); + } + return s0; + } + function peg$parsemessageElement() { + var s0; + s0 = peg$parseliteralElement(); + if (s0 === peg$FAILED) { + s0 = peg$parseargumentElement(); + if (s0 === peg$FAILED) { + s0 = peg$parsesimpleFormatElement(); + if (s0 === peg$FAILED) { + s0 = peg$parsepluralElement(); + if (s0 === peg$FAILED) { + s0 = peg$parseselectElement(); + if (s0 === peg$FAILED) { + s0 = peg$parsepoundElement(); + } + } + } + } + } + return s0; + } + function peg$parsemessageText() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + s2 = peg$parsedoubleApostrophes(); + if (s2 === peg$FAILED) { + s2 = peg$parsequotedString(); + if (s2 === peg$FAILED) { + s2 = peg$parseunquotedString(); + } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parsedoubleApostrophes(); + if (s2 === peg$FAILED) { + s2 = peg$parsequotedString(); + if (s2 === peg$FAILED) { + s2 = peg$parseunquotedString(); + } + } + } + } + else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c0(s1); + } + s0 = s1; + return s0; + } + function peg$parseliteralElement() { + var s0, s1; + s0 = peg$currPos; + s1 = peg$parsemessageText(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c1(s1); + } + s0 = s1; + return s0; + } + function peg$parsepoundElement() { + var s0, s1; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 35) { + s1 = peg$c2; + peg$currPos++; + } + else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c3); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c4(); + } + s0 = s1; + return s0; + } + function peg$parseargumentElement() { + var s0, s1, s2, s3, s4, s5; + peg$silentFails++; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 123) { + s1 = peg$c6; + peg$currPos++; + } + else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c7); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseargNameOrNumber(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s5 = peg$c8; + peg$currPos++; + } + else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c9); + } + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c10(s3); + s0 = s1; + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c5); + } + } + return s0; + } + function peg$parsenumberSkeletonId() { + var s0, s1, s2, s3, s4; + peg$silentFails++; + s0 = peg$currPos; + s1 = []; + s2 = peg$currPos; + s3 = peg$currPos; + peg$silentFails++; + s4 = peg$parsewhiteSpace(); + if (s4 === peg$FAILED) { + if (peg$c12.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } + else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c13); + } + } + } + peg$silentFails--; + if (s4 === peg$FAILED) { + s3 = undefined; + } + else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } + else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c14); + } + } + if (s4 !== peg$FAILED) { + s3 = [s3, s4]; + s2 = s3; + } + else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } + else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$currPos; + s3 = peg$currPos; + peg$silentFails++; + s4 = peg$parsewhiteSpace(); + if (s4 === peg$FAILED) { + if (peg$c12.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } + else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c13); + } + } + } + peg$silentFails--; + if (s4 === peg$FAILED) { + s3 = undefined; + } + else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } + else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c14); + } + } + if (s4 !== peg$FAILED) { + s3 = [s3, s4]; + s2 = s3; + } + else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } + else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } + } + else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s0 = input.substring(s0, peg$currPos); + } + else { + s0 = s1; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c11); + } + } + return s0; + } + function peg$parsenumberSkeletonTokenOption() { + var s0, s1, s2; + peg$silentFails++; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 47) { + s1 = peg$c16; + peg$currPos++; + } + else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c17); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parsenumberSkeletonId(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c18(s2); + s0 = s1; + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c15); + } + } + return s0; + } + function peg$parsenumberSkeletonToken() { + var s0, s1, s2, s3, s4; + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== peg$FAILED) { + s2 = peg$parsenumberSkeletonId(); + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parsenumberSkeletonTokenOption(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parsenumberSkeletonTokenOption(); + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c20(s2, s3); + s0 = s1; + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c19); + } + } + return s0; + } + function peg$parsenumberSkeleton() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + s2 = peg$parsenumberSkeletonToken(); + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parsenumberSkeletonToken(); + } + } + else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c21(s1); + } + s0 = s1; + return s0; + } + function peg$parsenumberArgStyle() { + var s0, s1, s2; + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c22) { + s1 = peg$c22; + peg$currPos += 2; + } + else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c23); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parsenumberSkeleton(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c24(s2); + s0 = s1; + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + peg$savedPos = peg$currPos; + s1 = peg$c25(); + if (s1) { + s1 = undefined; + } + else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s2 = peg$parsemessageText(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c26(s2); + s0 = s1; + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + return s0; + } + function peg$parsenumberFormatElement() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 123) { + s1 = peg$c6; + peg$currPos++; + } + else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c7); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseargNameOrNumber(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s5 = peg$c27; + peg$currPos++; + } + else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c28); + } + } + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + if (s6 !== peg$FAILED) { + if (input.substr(peg$currPos, 6) === peg$c29) { + s7 = peg$c29; + peg$currPos += 6; + } + else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c30); + } + } + if (s7 !== peg$FAILED) { + s8 = peg$parse_(); + if (s8 !== peg$FAILED) { + s9 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 44) { + s10 = peg$c27; + peg$currPos++; + } + else { + s10 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c28); + } + } + if (s10 !== peg$FAILED) { + s11 = peg$parse_(); + if (s11 !== peg$FAILED) { + s12 = peg$parsenumberArgStyle(); + if (s12 !== peg$FAILED) { + s10 = [s10, s11, s12]; + s9 = s10; + } + else { + peg$currPos = s9; + s9 = peg$FAILED; + } + } + else { + peg$currPos = s9; + s9 = peg$FAILED; + } + } + else { + peg$currPos = s9; + s9 = peg$FAILED; + } + if (s9 === peg$FAILED) { + s9 = null; + } + if (s9 !== peg$FAILED) { + s10 = peg$parse_(); + if (s10 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s11 = peg$c8; + peg$currPos++; + } + else { + s11 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c9); + } + } + if (s11 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c31(s3, s7, s9); + s0 = s1; + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parsedateTimeSkeletonLiteral() { + var s0, s1, s2, s3; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 39) { + s1 = peg$c32; + peg$currPos++; + } + else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c33); + } + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parsedoubleApostrophes(); + if (s3 === peg$FAILED) { + if (peg$c34.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } + else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c35); + } + } + } + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parsedoubleApostrophes(); + if (s3 === peg$FAILED) { + if (peg$c34.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } + else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c35); + } + } + } + } + } + else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 39) { + s3 = peg$c32; + peg$currPos++; + } + else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c33); + } + } + if (s3 !== peg$FAILED) { + s1 = [s1, s2, s3]; + s0 = s1; + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = []; + s1 = peg$parsedoubleApostrophes(); + if (s1 === peg$FAILED) { + if (peg$c36.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } + else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c37); + } + } + } + if (s1 !== peg$FAILED) { + while (s1 !== peg$FAILED) { + s0.push(s1); + s1 = peg$parsedoubleApostrophes(); + if (s1 === peg$FAILED) { + if (peg$c36.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } + else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c37); + } + } + } + } + } + else { + s0 = peg$FAILED; + } + } + return s0; + } + function peg$parsedateTimeSkeletonPattern() { + var s0, s1; + s0 = []; + if (peg$c38.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } + else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c39); + } + } + if (s1 !== peg$FAILED) { + while (s1 !== peg$FAILED) { + s0.push(s1); + if (peg$c38.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } + else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c39); + } + } + } + } + else { + s0 = peg$FAILED; + } + return s0; + } + function peg$parsedateTimeSkeleton() { + var s0, s1, s2, s3; + s0 = peg$currPos; + s1 = peg$currPos; + s2 = []; + s3 = peg$parsedateTimeSkeletonLiteral(); + if (s3 === peg$FAILED) { + s3 = peg$parsedateTimeSkeletonPattern(); + } + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parsedateTimeSkeletonLiteral(); + if (s3 === peg$FAILED) { + s3 = peg$parsedateTimeSkeletonPattern(); + } + } + } + else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = input.substring(s1, peg$currPos); + } + else { + s1 = s2; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c40(s1); + } + s0 = s1; + return s0; + } + function peg$parsedateOrTimeArgStyle() { + var s0, s1, s2; + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c22) { + s1 = peg$c22; + peg$currPos += 2; + } + else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c23); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parsedateTimeSkeleton(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c24(s2); + s0 = s1; + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + peg$savedPos = peg$currPos; + s1 = peg$c41(); + if (s1) { + s1 = undefined; + } + else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s2 = peg$parsemessageText(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c26(s2); + s0 = s1; + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + return s0; + } + function peg$parsedateOrTimeFormatElement() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 123) { + s1 = peg$c6; + peg$currPos++; + } + else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c7); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseargNameOrNumber(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s5 = peg$c27; + peg$currPos++; + } + else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c28); + } + } + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + if (s6 !== peg$FAILED) { + if (input.substr(peg$currPos, 4) === peg$c42) { + s7 = peg$c42; + peg$currPos += 4; + } + else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c43); + } + } + if (s7 === peg$FAILED) { + if (input.substr(peg$currPos, 4) === peg$c44) { + s7 = peg$c44; + peg$currPos += 4; + } + else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c45); + } + } + } + if (s7 !== peg$FAILED) { + s8 = peg$parse_(); + if (s8 !== peg$FAILED) { + s9 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 44) { + s10 = peg$c27; + peg$currPos++; + } + else { + s10 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c28); + } + } + if (s10 !== peg$FAILED) { + s11 = peg$parse_(); + if (s11 !== peg$FAILED) { + s12 = peg$parsedateOrTimeArgStyle(); + if (s12 !== peg$FAILED) { + s10 = [s10, s11, s12]; + s9 = s10; + } + else { + peg$currPos = s9; + s9 = peg$FAILED; + } + } + else { + peg$currPos = s9; + s9 = peg$FAILED; + } + } + else { + peg$currPos = s9; + s9 = peg$FAILED; + } + if (s9 === peg$FAILED) { + s9 = null; + } + if (s9 !== peg$FAILED) { + s10 = peg$parse_(); + if (s10 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s11 = peg$c8; + peg$currPos++; + } + else { + s11 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c9); + } + } + if (s11 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c31(s3, s7, s9); + s0 = s1; + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parsesimpleFormatElement() { + var s0; + s0 = peg$parsenumberFormatElement(); + if (s0 === peg$FAILED) { + s0 = peg$parsedateOrTimeFormatElement(); + } + return s0; + } + function peg$parsepluralElement() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 123) { + s1 = peg$c6; + peg$currPos++; + } + else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c7); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseargNameOrNumber(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s5 = peg$c27; + peg$currPos++; + } + else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c28); + } + } + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + if (s6 !== peg$FAILED) { + if (input.substr(peg$currPos, 6) === peg$c46) { + s7 = peg$c46; + peg$currPos += 6; + } + else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c47); + } + } + if (s7 === peg$FAILED) { + if (input.substr(peg$currPos, 13) === peg$c48) { + s7 = peg$c48; + peg$currPos += 13; + } + else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c49); + } + } + } + if (s7 !== peg$FAILED) { + s8 = peg$parse_(); + if (s8 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s9 = peg$c27; + peg$currPos++; + } + else { + s9 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c28); + } + } + if (s9 !== peg$FAILED) { + s10 = peg$parse_(); + if (s10 !== peg$FAILED) { + s11 = peg$currPos; + if (input.substr(peg$currPos, 7) === peg$c50) { + s12 = peg$c50; + peg$currPos += 7; + } + else { + s12 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c51); + } + } + if (s12 !== peg$FAILED) { + s13 = peg$parse_(); + if (s13 !== peg$FAILED) { + s14 = peg$parsenumber(); + if (s14 !== peg$FAILED) { + s12 = [s12, s13, s14]; + s11 = s12; + } + else { + peg$currPos = s11; + s11 = peg$FAILED; + } + } + else { + peg$currPos = s11; + s11 = peg$FAILED; + } + } + else { + peg$currPos = s11; + s11 = peg$FAILED; + } + if (s11 === peg$FAILED) { + s11 = null; + } + if (s11 !== peg$FAILED) { + s12 = peg$parse_(); + if (s12 !== peg$FAILED) { + s13 = []; + s14 = peg$parsepluralOption(); + if (s14 !== peg$FAILED) { + while (s14 !== peg$FAILED) { + s13.push(s14); + s14 = peg$parsepluralOption(); + } + } + else { + s13 = peg$FAILED; + } + if (s13 !== peg$FAILED) { + s14 = peg$parse_(); + if (s14 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s15 = peg$c8; + peg$currPos++; + } + else { + s15 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c9); + } + } + if (s15 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c52(s3, s7, s11, s13); + s0 = s1; + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseselectElement() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 123) { + s1 = peg$c6; + peg$currPos++; + } + else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c7); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseargNameOrNumber(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s5 = peg$c27; + peg$currPos++; + } + else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c28); + } + } + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + if (s6 !== peg$FAILED) { + if (input.substr(peg$currPos, 6) === peg$c53) { + s7 = peg$c53; + peg$currPos += 6; + } + else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c54); + } + } + if (s7 !== peg$FAILED) { + s8 = peg$parse_(); + if (s8 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s9 = peg$c27; + peg$currPos++; + } + else { + s9 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c28); + } + } + if (s9 !== peg$FAILED) { + s10 = peg$parse_(); + if (s10 !== peg$FAILED) { + s11 = []; + s12 = peg$parseselectOption(); + if (s12 !== peg$FAILED) { + while (s12 !== peg$FAILED) { + s11.push(s12); + s12 = peg$parseselectOption(); + } + } + else { + s11 = peg$FAILED; + } + if (s11 !== peg$FAILED) { + s12 = peg$parse_(); + if (s12 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s13 = peg$c8; + peg$currPos++; + } + else { + s13 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c9); + } + } + if (s13 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c55(s3, s11); + s0 = s1; + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parsepluralRuleSelectValue() { + var s0, s1, s2, s3; + s0 = peg$currPos; + s1 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 61) { + s2 = peg$c56; + peg$currPos++; + } + else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c57); + } + } + if (s2 !== peg$FAILED) { + s3 = peg$parsenumber(); + if (s3 !== peg$FAILED) { + s2 = [s2, s3]; + s1 = s2; + } + else { + peg$currPos = s1; + s1 = peg$FAILED; + } + } + else { + peg$currPos = s1; + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s0 = input.substring(s0, peg$currPos); + } + else { + s0 = s1; + } + if (s0 === peg$FAILED) { + s0 = peg$parseargName(); + } + return s0; + } + function peg$parseselectOption() { + var s0, s1, s2, s3, s4, s5, s6, s7; + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== peg$FAILED) { + s2 = peg$parseargName(); + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 123) { + s4 = peg$c6; + peg$currPos++; + } + else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c7); + } + } + if (s4 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s5 = peg$c58(s2); + if (s5) { + s5 = undefined; + } + else { + s5 = peg$FAILED; + } + if (s5 !== peg$FAILED) { + s6 = peg$parsemessage(); + if (s6 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s7 = peg$c8; + peg$currPos++; + } + else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c9); + } + } + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c59(s2, s6); + s0 = s1; + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parsepluralOption() { + var s0, s1, s2, s3, s4, s5, s6, s7; + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== peg$FAILED) { + s2 = peg$parsepluralRuleSelectValue(); + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 123) { + s4 = peg$c6; + peg$currPos++; + } + else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c7); + } + } + if (s4 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s5 = peg$c60(s2); + if (s5) { + s5 = undefined; + } + else { + s5 = peg$FAILED; + } + if (s5 !== peg$FAILED) { + s6 = peg$parsemessage(); + if (s6 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s7 = peg$c8; + peg$currPos++; + } + else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c9); + } + } + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c61(s2, s6); + s0 = s1; + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parsewhiteSpace() { + var s0, s1; + peg$silentFails++; + if (peg$c63.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } + else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c64); + } + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c62); + } + } + return s0; + } + function peg$parsepatternSyntax() { + var s0, s1; + peg$silentFails++; + if (peg$c66.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } + else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c67); + } + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c65); + } + } + return s0; + } + function peg$parse_() { + var s0, s1, s2; + peg$silentFails++; + s0 = peg$currPos; + s1 = []; + s2 = peg$parsewhiteSpace(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parsewhiteSpace(); + } + if (s1 !== peg$FAILED) { + s0 = input.substring(s0, peg$currPos); + } + else { + s0 = s1; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c68); + } + } + return s0; + } + function peg$parsenumber() { + var s0, s1, s2; + peg$silentFails++; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 45) { + s1 = peg$c70; + peg$currPos++; + } + else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c71); + } + } + if (s1 === peg$FAILED) { + s1 = null; + } + if (s1 !== peg$FAILED) { + s2 = peg$parseargNumber(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c72(s1, s2); + s0 = s1; + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c69); + } + } + return s0; + } + function peg$parseapostrophe() { + var s0, s1; + peg$silentFails++; + if (input.charCodeAt(peg$currPos) === 39) { + s0 = peg$c32; + peg$currPos++; + } + else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c33); + } + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c73); + } + } + return s0; + } + function peg$parsedoubleApostrophes() { + var s0, s1; + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c75) { + s1 = peg$c75; + peg$currPos += 2; + } + else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c76); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c77(); + } + s0 = s1; + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c74); + } + } + return s0; + } + function peg$parsequotedString() { + var s0, s1, s2, s3, s4, s5; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 39) { + s1 = peg$c32; + peg$currPos++; + } + else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c33); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseescapedChar(); + if (s2 !== peg$FAILED) { + s3 = peg$currPos; + s4 = []; + if (input.substr(peg$currPos, 2) === peg$c75) { + s5 = peg$c75; + peg$currPos += 2; + } + else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c76); + } + } + if (s5 === peg$FAILED) { + if (peg$c34.test(input.charAt(peg$currPos))) { + s5 = input.charAt(peg$currPos); + peg$currPos++; + } + else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c35); + } + } + } + while (s5 !== peg$FAILED) { + s4.push(s5); + if (input.substr(peg$currPos, 2) === peg$c75) { + s5 = peg$c75; + peg$currPos += 2; + } + else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c76); + } + } + if (s5 === peg$FAILED) { + if (peg$c34.test(input.charAt(peg$currPos))) { + s5 = input.charAt(peg$currPos); + peg$currPos++; + } + else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c35); + } + } + } + } + if (s4 !== peg$FAILED) { + s3 = input.substring(s3, peg$currPos); + } + else { + s3 = s4; + } + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 39) { + s4 = peg$c32; + peg$currPos++; + } + else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c33); + } + } + if (s4 === peg$FAILED) { + s4 = null; + } + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c78(s2, s3); + s0 = s1; + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseunquotedString() { + var s0, s1, s2, s3; + s0 = peg$currPos; + s1 = peg$currPos; + if (input.length > peg$currPos) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } + else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c14); + } + } + if (s2 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s3 = peg$c79(s2); + if (s3) { + s3 = undefined; + } + else { + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + s2 = [s2, s3]; + s1 = s2; + } + else { + peg$currPos = s1; + s1 = peg$FAILED; + } + } + else { + peg$currPos = s1; + s1 = peg$FAILED; + } + if (s1 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 10) { + s1 = peg$c80; + peg$currPos++; + } + else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c81); + } + } + } + if (s1 !== peg$FAILED) { + s0 = input.substring(s0, peg$currPos); + } + else { + s0 = s1; + } + return s0; + } + function peg$parseescapedChar() { + var s0, s1, s2, s3; + s0 = peg$currPos; + s1 = peg$currPos; + if (input.length > peg$currPos) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } + else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c14); + } + } + if (s2 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s3 = peg$c82(s2); + if (s3) { + s3 = undefined; + } + else { + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + s2 = [s2, s3]; + s1 = s2; + } + else { + peg$currPos = s1; + s1 = peg$FAILED; + } + } + else { + peg$currPos = s1; + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s0 = input.substring(s0, peg$currPos); + } + else { + s0 = s1; + } + return s0; + } + function peg$parseargNameOrNumber() { + var s0, s1; + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseargNumber(); + if (s1 === peg$FAILED) { + s1 = peg$parseargName(); + } + if (s1 !== peg$FAILED) { + s0 = input.substring(s0, peg$currPos); + } + else { + s0 = s1; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c83); + } + } + return s0; + } + function peg$parseargNumber() { + var s0, s1, s2, s3, s4; + peg$silentFails++; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 48) { + s1 = peg$c85; + peg$currPos++; + } + else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c86); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c87(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$currPos; + if (peg$c88.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } + else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c89); + } + } + if (s2 !== peg$FAILED) { + s3 = []; + if (peg$c90.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } + else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c91); + } + } + while (s4 !== peg$FAILED) { + s3.push(s4); + if (peg$c90.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } + else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c91); + } + } + } + if (s3 !== peg$FAILED) { + s2 = [s2, s3]; + s1 = s2; + } + else { + peg$currPos = s1; + s1 = peg$FAILED; + } + } + else { + peg$currPos = s1; + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c92(s1); + } + s0 = s1; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c84); + } + } + return s0; + } + function peg$parseargName() { + var s0, s1, s2, s3, s4; + peg$silentFails++; + s0 = peg$currPos; + s1 = []; + s2 = peg$currPos; + s3 = peg$currPos; + peg$silentFails++; + s4 = peg$parsewhiteSpace(); + if (s4 === peg$FAILED) { + s4 = peg$parsepatternSyntax(); + } + peg$silentFails--; + if (s4 === peg$FAILED) { + s3 = undefined; + } + else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } + else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c14); + } + } + if (s4 !== peg$FAILED) { + s3 = [s3, s4]; + s2 = s3; + } + else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } + else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$currPos; + s3 = peg$currPos; + peg$silentFails++; + s4 = peg$parsewhiteSpace(); + if (s4 === peg$FAILED) { + s4 = peg$parsepatternSyntax(); + } + peg$silentFails--; + if (s4 === peg$FAILED) { + s3 = undefined; + } + else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } + else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c14); + } + } + if (s4 !== peg$FAILED) { + s3 = [s3, s4]; + s2 = s3; + } + else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } + else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } + } + else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s0 = input.substring(s0, peg$currPos); + } + else { + s0 = s1; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c93); + } + } + return s0; + } + var messageCtx = ['root']; + function isNestedMessageText() { + return messageCtx.length > 1; + } + function isInPluralOption() { + return messageCtx[messageCtx.length - 1] === 'plural'; + } + function insertLocation() { + return options && options.captureLocation ? { + location: location() + } : {}; + } + peg$result = peg$startRuleFunction(); + if (peg$result !== peg$FAILED && peg$currPos === input.length) { + return peg$result; + } + else { + if (peg$result !== peg$FAILED && peg$currPos < input.length) { + peg$fail(peg$endExpectation()); + } + throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length + ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) + : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)); + } +} +var pegParse = peg$parse; + +// CONCATENATED MODULE: ./node_modules/intl-messageformat-parser/lib/normalize.js +var __spreadArrays = (undefined && undefined.__spreadArrays) || function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +}; + + +var PLURAL_HASHTAG_REGEX = /(^|[^\\])#/g; +/** + * Whether to convert `#` in plural rule options + * to `{var, number}` + * @param el AST Element + * @param pluralStack current plural stack + */ +function normalizeHashtagInPlural(els) { + els.forEach(function (el) { + // If we're encountering a plural el + if (!isPluralElement(el) && !isSelectElement(el)) { + return; + } + // Go down the options and search for # in any literal element + Object.keys(el.options).forEach(function (id) { + var _a; + var opt = el.options[id]; + // If we got a match, we have to split this + // and inject a NumberElement in the middle + var matchingLiteralElIndex = -1; + var literalEl = undefined; + for (var i = 0; i < opt.value.length; i++) { + var el_1 = opt.value[i]; + if (isLiteralElement(el_1) && PLURAL_HASHTAG_REGEX.test(el_1.value)) { + matchingLiteralElIndex = i; + literalEl = el_1; + break; + } + } + if (literalEl) { + var newValue = literalEl.value.replace(PLURAL_HASHTAG_REGEX, "$1{" + el.value + ", number}"); + var newEls = pegParse(newValue); + (_a = opt.value).splice.apply(_a, __spreadArrays([matchingLiteralElIndex, 1], newEls)); + } + normalizeHashtagInPlural(opt.value); + }); + }); +} + +// CONCATENATED MODULE: ./node_modules/intl-messageformat-parser/lib/index.js + + + + + +function parse(input, opts) { + var els = pegParse(input, opts); + if (!opts || opts.normalizeHashtagInPlural !== false) { + normalizeHashtagInPlural(els); + } + return els; +} + +// CONCATENATED MODULE: ./node_modules/intl-format-cache/lib/index.js +/* +Copyright (c) 2014, Yahoo! Inc. All rights reserved. +Copyrights licensed under the New BSD License. +See the accompanying LICENSE file for terms. +*/ +var lib_spreadArrays = (undefined && undefined.__spreadArrays) || function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +}; +// -- Utilities ---------------------------------------------------------------- +function getCacheId(inputs) { + return JSON.stringify(inputs.map(function (input) { + return input && typeof input === 'object' ? orderedProps(input) : input; + })); +} +function orderedProps(obj) { + return Object.keys(obj) + .sort() + .map(function (k) { + var _a; + return (_a = {}, _a[k] = obj[k], _a); + }); +} +var memoizeFormatConstructor = function (FormatConstructor, cache) { + if (cache === void 0) { cache = {}; } + return function () { + var _a; + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var cacheId = getCacheId(args); + var format = cacheId && cache[cacheId]; + if (!format) { + format = new ((_a = FormatConstructor).bind.apply(_a, lib_spreadArrays([void 0], args)))(); + if (cacheId) { + cache[cacheId] = format; + } + } + return format; + }; +}; +/* harmony default export */ var lib = (memoizeFormatConstructor); + +// CONCATENATED MODULE: ./node_modules/intl-messageformat-parser/lib/skeleton.js +var skeleton_assign = (undefined && undefined.__assign) || function () { + skeleton_assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return skeleton_assign.apply(this, arguments); +}; +/** + * https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table + * Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js + * with some tweaks + */ +var DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g; +/** + * Parse Date time skeleton into Intl.DateTimeFormatOptions + * Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table + * @public + * @param skeleton skeleton string + */ +function parseDateTimeSkeleton(skeleton) { + var result = {}; + skeleton.replace(DATE_TIME_REGEX, function (match) { + var len = match.length; + switch (match[0]) { + // Era + case 'G': + result.era = len === 4 ? 'long' : len === 5 ? 'narrow' : 'short'; + break; + // Year + case 'y': + result.year = len === 2 ? '2-digit' : 'numeric'; + break; + case 'Y': + case 'u': + case 'U': + case 'r': + throw new RangeError('`Y/u/U/r` (year) patterns are not supported, use `y` instead'); + // Quarter + case 'q': + case 'Q': + throw new RangeError('`q/Q` (quarter) patterns are not supported'); + // Month + case 'M': + case 'L': + result.month = ['numeric', '2-digit', 'short', 'long', 'narrow'][len - 1]; + break; + // Week + case 'w': + case 'W': + throw new RangeError('`w/W` (week) patterns are not supported'); + case 'd': + result.day = ['numeric', '2-digit'][len - 1]; + break; + case 'D': + case 'F': + case 'g': + throw new RangeError('`D/F/g` (day) patterns are not supported, use `d` instead'); + // Weekday + case 'E': + result.weekday = len === 4 ? 'short' : len === 5 ? 'narrow' : 'short'; + break; + case 'e': + if (len < 4) { + throw new RangeError('`e..eee` (weekday) patterns are not supported'); + } + result.weekday = ['short', 'long', 'narrow', 'short'][len - 4]; + break; + case 'c': + if (len < 4) { + throw new RangeError('`c..ccc` (weekday) patterns are not supported'); + } + result.weekday = ['short', 'long', 'narrow', 'short'][len - 4]; + break; + // Period + case 'a': // AM, PM + result.hour12 = true; + break; + case 'b': // am, pm, noon, midnight + case 'B': // flexible day periods + throw new RangeError('`b/B` (period) patterns are not supported, use `a` instead'); + // Hour + case 'h': + result.hourCycle = 'h12'; + result.hour = ['numeric', '2-digit'][len - 1]; + break; + case 'H': + result.hourCycle = 'h23'; + result.hour = ['numeric', '2-digit'][len - 1]; + break; + case 'K': + result.hourCycle = 'h11'; + result.hour = ['numeric', '2-digit'][len - 1]; + break; + case 'k': + result.hourCycle = 'h24'; + result.hour = ['numeric', '2-digit'][len - 1]; + break; + case 'j': + case 'J': + case 'C': + throw new RangeError('`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead'); + // Minute + case 'm': + result.minute = ['numeric', '2-digit'][len - 1]; + break; + // Second + case 's': + result.second = ['numeric', '2-digit'][len - 1]; + break; + case 'S': + case 'A': + throw new RangeError('`S/A` (second) pattenrs are not supported, use `s` instead'); + // Zone + case 'z': // 1..3, 4: specific non-location format + result.timeZoneName = len < 4 ? 'short' : 'long'; + break; + case 'Z': // 1..3, 4, 5: The ISO8601 varios formats + case 'O': // 1, 4: miliseconds in day short, long + case 'v': // 1, 4: generic non-location format + case 'V': // 1, 2, 3, 4: time zone ID or city + case 'X': // 1, 2, 3, 4: The ISO8601 varios formats + case 'x': // 1, 2, 3, 4: The ISO8601 varios formats + throw new RangeError('`Z/O/v/V/X/x` (timeZone) pattenrs are not supported, use `z` instead'); + } + return ''; + }); + return result; +} +function icuUnitToEcma(unit) { + return unit.replace(/^(.*?)-/, ''); +} +var FRACTION_PRECISION_REGEX = /^\.(?:(0+)(\+|#+)?)?$/g; +var SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?$/g; +function parseSignificantPrecision(str) { + var result = {}; + str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) { + // @@@ case + if (typeof g2 !== 'string') { + result.minimumSignificantDigits = g1.length; + result.maximumSignificantDigits = g1.length; + } + // @@@+ case + else if (g2 === '+') { + result.minimumSignificantDigits = g1.length; + } + // .### case + else if (g1[0] === '#') { + result.maximumSignificantDigits = g1.length; + } + // .@@## or .@@@ case + else { + result.minimumSignificantDigits = g1.length; + result.maximumSignificantDigits = + g1.length + (typeof g2 === 'string' ? g2.length : 0); + } + return ''; + }); + return result; +} +function parseSign(str) { + switch (str) { + case 'sign-auto': + return { + signDisplay: 'auto', + }; + case 'sign-accounting': + return { + currencySign: 'accounting', + }; + case 'sign-always': + return { + signDisplay: 'always', + }; + case 'sign-accounting-always': + return { + signDisplay: 'always', + currencySign: 'accounting', + }; + case 'sign-except-zero': + return { + signDisplay: 'exceptZero', + }; + case 'sign-accounting-except-zero': + return { + signDisplay: 'exceptZero', + currencySign: 'accounting', + }; + case 'sign-never': + return { + signDisplay: 'never', + }; + } +} +function parseNotationOptions(opt) { + var result = {}; + var signOpts = parseSign(opt); + if (signOpts) { + return signOpts; + } + return result; +} +/** + * https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options + */ +function convertNumberSkeletonToNumberFormatOptions(tokens) { + var result = {}; + for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) { + var token = tokens_1[_i]; + switch (token.stem) { + case 'percent': + result.style = 'percent'; + continue; + case 'currency': + result.style = 'currency'; + result.currency = token.options[0]; + continue; + case 'group-off': + result.useGrouping = false; + continue; + case 'precision-integer': + result.maximumFractionDigits = 0; + continue; + case 'measure-unit': + result.style = 'unit'; + result.unit = icuUnitToEcma(token.options[0]); + continue; + case 'compact-short': + result.notation = 'compact'; + result.compactDisplay = 'short'; + continue; + case 'compact-long': + result.notation = 'compact'; + result.compactDisplay = 'long'; + continue; + case 'scientific': + result = skeleton_assign(skeleton_assign(skeleton_assign({}, result), { notation: 'scientific' }), token.options.reduce(function (all, opt) { return (skeleton_assign(skeleton_assign({}, all), parseNotationOptions(opt))); }, {})); + continue; + case 'engineering': + result = skeleton_assign(skeleton_assign(skeleton_assign({}, result), { notation: 'engineering' }), token.options.reduce(function (all, opt) { return (skeleton_assign(skeleton_assign({}, all), parseNotationOptions(opt))); }, {})); + continue; + case 'notation-simple': + result.notation = 'standard'; + continue; + // https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h + case 'unit-width-narrow': + result.currencyDisplay = 'narrowSymbol'; + result.unitDisplay = 'narrow'; + continue; + case 'unit-width-short': + result.currencyDisplay = 'code'; + result.unitDisplay = 'short'; + continue; + case 'unit-width-full-name': + result.currencyDisplay = 'name'; + result.unitDisplay = 'long'; + continue; + case 'unit-width-iso-code': + result.currencyDisplay = 'symbol'; + continue; + } + // Precision + // https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#fraction-precision + if (FRACTION_PRECISION_REGEX.test(token.stem)) { + if (token.options.length > 1) { + throw new RangeError('Fraction-precision stems only accept a single optional option'); + } + token.stem.replace(FRACTION_PRECISION_REGEX, function (match, g1, g2) { + // precision-integer case + if (match === '.') { + result.maximumFractionDigits = 0; + } + // .000+ case + else if (g2 === '+') { + result.minimumFractionDigits = g2.length; + } + // .### case + else if (g1[0] === '#') { + result.maximumFractionDigits = g1.length; + } + // .00## or .000 case + else { + result.minimumFractionDigits = g1.length; + result.maximumFractionDigits = + g1.length + (typeof g2 === 'string' ? g2.length : 0); + } + return ''; + }); + if (token.options.length) { + result = skeleton_assign(skeleton_assign({}, result), parseSignificantPrecision(token.options[0])); + } + continue; + } + if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) { + result = skeleton_assign(skeleton_assign({}, result), parseSignificantPrecision(token.stem)); + continue; + } + var signOpts = parseSign(token.stem); + if (signOpts) { + result = skeleton_assign(skeleton_assign({}, result), signOpts); + } + } + return result; +} + +// CONCATENATED MODULE: ./node_modules/intl-messageformat/lib/formatters.js +var formatters_extends = (undefined && undefined.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var formatters_spreadArrays = (undefined && undefined.__spreadArrays) || function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +}; + +var FormatError = /** @class */ (function (_super) { + formatters_extends(FormatError, _super); + function FormatError(msg, variableId) { + var _this = _super.call(this, msg) || this; + _this.variableId = variableId; + return _this; + } + return FormatError; +}(Error)); +function mergeLiteral(parts) { + if (parts.length < 2) { + return parts; + } + return parts.reduce(function (all, part) { + var lastPart = all[all.length - 1]; + if (!lastPart || + lastPart.type !== 0 /* literal */ || + part.type !== 0 /* literal */) { + all.push(part); + } + else { + lastPart.value += part.value; + } + return all; + }, []); +} +// TODO(skeleton): add skeleton support +function formatToParts(els, locales, formatters, formats, values, currentPluralValue, +// For debugging +originalMessage) { + // Hot path for straight simple msg translations + if (els.length === 1 && isLiteralElement(els[0])) { + return [ + { + type: 0 /* literal */, + value: els[0].value, + }, + ]; + } + var result = []; + for (var _i = 0, els_1 = els; _i < els_1.length; _i++) { + var el = els_1[_i]; + // Exit early for string parts. + if (isLiteralElement(el)) { + result.push({ + type: 0 /* literal */, + value: el.value, + }); + continue; + } + // TODO: should this part be literal type? + // Replace `#` in plural rules with the actual numeric value. + if (isPoundElement(el)) { + if (typeof currentPluralValue === 'number') { + result.push({ + type: 0 /* literal */, + value: formatters.getNumberFormat(locales).format(currentPluralValue), + }); + } + continue; + } + var varName = el.value; + // Enforce that all required values are provided by the caller. + if (!(values && varName in values)) { + throw new FormatError("The intl string context variable \"" + varName + "\" was not provided to the string \"" + originalMessage + "\""); + } + var value = values[varName]; + if (isArgumentElement(el)) { + if (!value || typeof value === 'string' || typeof value === 'number') { + value = + typeof value === 'string' || typeof value === 'number' + ? String(value) + : ''; + } + result.push({ + type: 1 /* argument */, + value: value, + }); + continue; + } + // Recursively format plural and select parts' option — which can be a + // nested pattern structure. The choosing of the option to use is + // abstracted-by and delegated-to the part helper object. + if (isDateElement(el)) { + var style = typeof el.style === 'string' ? formats.date[el.style] : undefined; + result.push({ + type: 0 /* literal */, + value: formatters + .getDateTimeFormat(locales, style) + .format(value), + }); + continue; + } + if (isTimeElement(el)) { + var style = typeof el.style === 'string' + ? formats.time[el.style] + : isDateTimeSkeleton(el.style) + ? parseDateTimeSkeleton(el.style.pattern) + : undefined; + result.push({ + type: 0 /* literal */, + value: formatters + .getDateTimeFormat(locales, style) + .format(value), + }); + continue; + } + if (isNumberElement(el)) { + var style = typeof el.style === 'string' + ? formats.number[el.style] + : isNumberSkeleton(el.style) + ? convertNumberSkeletonToNumberFormatOptions(el.style.tokens) + : undefined; + result.push({ + type: 0 /* literal */, + value: formatters + .getNumberFormat(locales, style) + .format(value), + }); + continue; + } + if (isSelectElement(el)) { + var opt = el.options[value] || el.options.other; + if (!opt) { + throw new RangeError("Invalid values for \"" + el.value + "\": \"" + value + "\". Options are \"" + Object.keys(el.options).join('", "') + "\""); + } + result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values)); + continue; + } + if (isPluralElement(el)) { + var opt = el.options["=" + value]; + if (!opt) { + if (!Intl.PluralRules) { + throw new FormatError("Intl.PluralRules is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-pluralrules\"\n"); + } + var rule = formatters + .getPluralRules(locales, { type: el.pluralType }) + .select(value - (el.offset || 0)); + opt = el.options[rule] || el.options.other; + } + if (!opt) { + throw new RangeError("Invalid values for \"" + el.value + "\": \"" + value + "\". Options are \"" + Object.keys(el.options).join('", "') + "\""); + } + result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values, value - (el.offset || 0))); + continue; + } + } + return mergeLiteral(result); +} +function formatToString(els, locales, formatters, formats, values, +// For debugging +originalMessage) { + var parts = formatToParts(els, locales, formatters, formats, values, undefined, originalMessage); + // Hot path for straight simple msg translations + if (parts.length === 1) { + return parts[0].value; + } + return parts.reduce(function (all, part) { return (all += part.value); }, ''); +} +// Singleton +var domParser; +var TOKEN_DELIMITER = '@@'; +var TOKEN_REGEX = /@@(\d+_\d+)@@/g; +var counter = 0; +function generateId() { + return Date.now() + "_" + ++counter; +} +function restoreRichPlaceholderMessage(text, objectParts) { + return text + .split(TOKEN_REGEX) + .filter(Boolean) + .map(function (c) { return (objectParts[c] != null ? objectParts[c] : c); }) + .reduce(function (all, c) { + if (!all.length) { + all.push(c); + } + else if (typeof c === 'string' && + typeof all[all.length - 1] === 'string') { + all[all.length - 1] += c; + } + else { + all.push(c); + } + return all; + }, []); +} +/** + * Not exhaustive, just for sanity check + */ +var SIMPLE_XML_REGEX = /(<([0-9a-zA-Z-_]*?)>(.*?)<\/([0-9a-zA-Z-_]*?)>)|(<[0-9a-zA-Z-_]*?\/>)/; +var TEMPLATE_ID = Date.now() + '@@'; +var VOID_ELEMENTS = [ + 'area', + 'base', + 'br', + 'col', + 'embed', + 'hr', + 'img', + 'input', + 'link', + 'meta', + 'param', + 'source', + 'track', + 'wbr', +]; +function formatHTMLElement(el, objectParts, values) { + var tagName = el.tagName; + var outerHTML = el.outerHTML, textContent = el.textContent, childNodes = el.childNodes; + // Regular text + if (!tagName) { + return restoreRichPlaceholderMessage(textContent || '', objectParts); + } + tagName = tagName.toLowerCase(); + var isVoidElement = ~VOID_ELEMENTS.indexOf(tagName); + var formatFnOrValue = values[tagName]; + if (formatFnOrValue && isVoidElement) { + throw new FormatError(tagName + " is a self-closing tag and can not be used, please use another tag name."); + } + if (!childNodes.length) { + return [outerHTML]; + } + var chunks = Array.prototype.slice.call(childNodes).reduce(function (all, child) { + return all.concat(formatHTMLElement(child, objectParts, values)); + }, []); + // Legacy HTML + if (!formatFnOrValue) { + return formatters_spreadArrays(["<" + tagName + ">"], chunks, [""]); + } + // HTML Tag replacement + if (typeof formatFnOrValue === 'function') { + return [formatFnOrValue.apply(void 0, chunks)]; + } + return [formatFnOrValue]; +} +function formatHTMLMessage(els, locales, formatters, formats, values, +// For debugging +originalMessage) { + var parts = formatToParts(els, locales, formatters, formats, values, undefined, originalMessage); + var objectParts = {}; + var formattedMessage = parts.reduce(function (all, part) { + if (part.type === 0 /* literal */) { + return (all += part.value); + } + var id = generateId(); + objectParts[id] = part.value; + return (all += "" + TOKEN_DELIMITER + id + TOKEN_DELIMITER); + }, ''); + // Not designed to filter out aggressively + if (!SIMPLE_XML_REGEX.test(formattedMessage)) { + return restoreRichPlaceholderMessage(formattedMessage, objectParts); + } + if (!values) { + throw new FormatError('Message has placeholders but no values was given'); + } + if (typeof DOMParser === 'undefined') { + throw new FormatError('Cannot format XML message without DOMParser'); + } + if (!domParser) { + domParser = new DOMParser(); + } + var content = domParser + .parseFromString("" + formattedMessage + "", 'text/html') + .getElementById(TEMPLATE_ID); + if (!content) { + throw new FormatError("Malformed HTML message " + formattedMessage); + } + var tagsToFormat = Object.keys(values).filter(function (varName) { return !!content.getElementsByTagName(varName).length; }); + // No tags to format + if (!tagsToFormat.length) { + return restoreRichPlaceholderMessage(formattedMessage, objectParts); + } + var caseSensitiveTags = tagsToFormat.filter(function (tagName) { return tagName !== tagName.toLowerCase(); }); + if (caseSensitiveTags.length) { + throw new FormatError("HTML tag must be lowercased but the following tags are not: " + caseSensitiveTags.join(', ')); + } + // We're doing this since top node is `` which does not have a formatter + return Array.prototype.slice + .call(content.childNodes) + .reduce(function (all, child) { return all.concat(formatHTMLElement(child, objectParts, values)); }, []); +} + +// CONCATENATED MODULE: ./node_modules/intl-messageformat/lib/core.js +/* +Copyright (c) 2014, Yahoo! Inc. All rights reserved. +Copyrights licensed under the New BSD License. +See the accompanying LICENSE file for terms. +*/ +var core_assign = (undefined && undefined.__assign) || function () { + core_assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return core_assign.apply(this, arguments); +}; + + + +// -- MessageFormat -------------------------------------------------------- +function mergeConfig(c1, c2) { + if (!c2) { + return c1; + } + return core_assign(core_assign(core_assign({}, (c1 || {})), (c2 || {})), Object.keys(c1).reduce(function (all, k) { + all[k] = core_assign(core_assign({}, c1[k]), (c2[k] || {})); + return all; + }, {})); +} +function mergeConfigs(defaultConfig, configs) { + if (!configs) { + return defaultConfig; + } + return Object.keys(defaultConfig).reduce(function (all, k) { + all[k] = mergeConfig(defaultConfig[k], configs[k]); + return all; + }, core_assign({}, defaultConfig)); +} +function createDefaultFormatters(cache) { + if (cache === void 0) { cache = { + number: {}, + dateTime: {}, + pluralRules: {}, + }; } + return { + getNumberFormat: lib(Intl.NumberFormat, cache.number), + getDateTimeFormat: lib(Intl.DateTimeFormat, cache.dateTime), + getPluralRules: lib(Intl.PluralRules, cache.pluralRules), + }; +} +var core_IntlMessageFormat = /** @class */ (function () { + function IntlMessageFormat(message, locales, overrideFormats, opts) { + var _this = this; + if (locales === void 0) { locales = IntlMessageFormat.defaultLocale; } + this.formatterCache = { + number: {}, + dateTime: {}, + pluralRules: {}, + }; + this.format = function (values) { + return formatToString(_this.ast, _this.locales, _this.formatters, _this.formats, values, _this.message); + }; + this.formatToParts = function (values) { + return formatToParts(_this.ast, _this.locales, _this.formatters, _this.formats, values, undefined, _this.message); + }; + this.formatHTMLMessage = function (values) { + return formatHTMLMessage(_this.ast, _this.locales, _this.formatters, _this.formats, values, _this.message); + }; + this.resolvedOptions = function () { return ({ + locale: Intl.NumberFormat.supportedLocalesOf(_this.locales)[0], + }); }; + this.getAst = function () { return _this.ast; }; + if (typeof message === 'string') { + this.message = message; + if (!IntlMessageFormat.__parse) { + throw new TypeError('IntlMessageFormat.__parse must be set to process `message` of type `string`'); + } + // Parse string messages into an AST. + this.ast = IntlMessageFormat.__parse(message, { + normalizeHashtagInPlural: false, + }); + } + else { + this.ast = message; + } + if (!Array.isArray(this.ast)) { + throw new TypeError('A message must be provided as a String or AST.'); + } + // Creates a new object with the specified `formats` merged with the default + // formats. + this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats); + // Defined first because it's used to build the format pattern. + this.locales = locales; + this.formatters = + (opts && opts.formatters) || createDefaultFormatters(this.formatterCache); + } + IntlMessageFormat.defaultLocale = new Intl.NumberFormat().resolvedOptions().locale; + IntlMessageFormat.__parse = parse; + // Default format options used as the prototype of the `formats` provided to the + // constructor. These are used when constructing the internal Intl.NumberFormat + // and Intl.DateTimeFormat instances. + IntlMessageFormat.formats = { + number: { + currency: { + style: 'currency', + }, + percent: { + style: 'percent', + }, + }, + date: { + short: { + month: 'numeric', + day: 'numeric', + year: '2-digit', + }, + medium: { + month: 'short', + day: 'numeric', + year: 'numeric', + }, + long: { + month: 'long', + day: 'numeric', + year: 'numeric', + }, + full: { + weekday: 'long', + month: 'long', + day: 'numeric', + year: 'numeric', + }, + }, + time: { + short: { + hour: 'numeric', + minute: 'numeric', + }, + medium: { + hour: 'numeric', + minute: 'numeric', + second: 'numeric', + }, + long: { + hour: 'numeric', + minute: 'numeric', + second: 'numeric', + timeZoneName: 'short', + }, + full: { + hour: 'numeric', + minute: 'numeric', + second: 'numeric', + timeZoneName: 'short', + }, + }, + }; + return IntlMessageFormat; +}()); + +/* harmony default export */ var core = (core_IntlMessageFormat); + +// CONCATENATED MODULE: ./node_modules/intl-messageformat/lib/index.js +/* +Copyright (c) 2014, Yahoo! Inc. All rights reserved. +Copyrights licensed under the New BSD License. +See the accompanying LICENSE file for terms. +*/ + + + +/* harmony default export */ var intl_messageformat_lib = (core); + +// CONCATENATED MODULE: ./node_modules/@formatjs/intl-utils/lib/invariant.js +function invariant(condition, message, Err) { + if (Err === void 0) { Err = Error; } + if (!condition) { + throw new Err(message); + } +} +//# sourceMappingURL=invariant.js.map +// CONCATENATED MODULE: ./node_modules/react-intl/lib/utils.js +/* +HTML escaping is the same as React's +(on purpose.) Therefore, it has the following Copyright and Licensing: + +Copyright 2013-2014, Facebook, Inc. +All rights reserved. + +This source code is licensed under the BSD-style license found in the LICENSE +file in the root directory of React's source tree. +*/ + + + + +var ESCAPED_CHARS = { + 38: '&', + 62: '>', + 60: '<', + 34: '"', + 39: ''' +}; +var UNSAFE_CHARS_REGEX = /[&><"']/g; +function utils_escape(str) { + return ('' + str).replace(UNSAFE_CHARS_REGEX, function (match) { + return ESCAPED_CHARS[match.charCodeAt(0)]; + }); +} +function filterProps(props, whitelist) { + var defaults = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + return whitelist.reduce(function (filtered, name) { + if (name in props) { + filtered[name] = props[name]; + } else if (name in defaults) { + filtered[name] = defaults[name]; + } + return filtered; + }, {}); +} +function invariantIntlContext(intl) { + invariant(intl, '[React Intl] Could not find required `intl` object. ' + ' needs to exist in the component ancestry.'); +} +function createError(message, exception) { + var eMsg = exception ? "\n".concat(exception.stack) : ''; + return "[React Intl] ".concat(message).concat(eMsg); +} +function defaultErrorHandler(error) { + if (false) {} +} +var DEFAULT_INTL_CONFIG = { + formats: {}, + messages: {}, + timeZone: undefined, + textComponent: react["Fragment"], + defaultLocale: 'en', + defaultFormats: {}, + onError: defaultErrorHandler +}; +function createIntlCache() { + return { + dateTime: {}, + number: {}, + message: {}, + relativeTime: {}, + pluralRules: {}, + list: {}, + displayNames: {} + }; +} +/** + * Create intl formatters and populate cache + * @param cache explicit cache to prevent leaking memory + */ +function createFormatters() { + var cache = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : createIntlCache(); + var RelativeTimeFormat = Intl.RelativeTimeFormat; + var ListFormat = Intl.ListFormat; + var DisplayNames = Intl.DisplayNames; + return { + getDateTimeFormat: lib(Intl.DateTimeFormat, cache.dateTime), + getNumberFormat: lib(Intl.NumberFormat, cache.number), + getMessageFormat: lib(intl_messageformat_lib, cache.message), + getRelativeTimeFormat: lib(RelativeTimeFormat, cache.relativeTime), + getPluralRules: lib(Intl.PluralRules, cache.pluralRules), + getListFormat: lib(ListFormat, cache.list), + getDisplayNames: lib(DisplayNames, cache.displayNames) + }; +} +function getNamedFormat(formats, type, name, onError) { + var formatType = formats && formats[type]; + var format; + if (formatType) { + format = formatType[name]; + } + if (format) { + return format; + } + onError(createError("No ".concat(type, " format named: ").concat(name))); +} +// CONCATENATED MODULE: ./node_modules/react-intl/lib/components/injectIntl.js + + + +// Since rollup cannot deal with namespace being a function, +// this is to interop with TypeScript since `invariant` +// does not export a default +// https://github.com/rollup/rollup/issues/1267 +var hoistNonReactStatics = hoist_non_react_statics_cjs_default.a || hoist_non_react_statics_cjs; + +function getDisplayName(Component) { + return Component.displayName || Component.name || 'Component'; +} +// TODO: We should provide initial value here +var IntlContext = react["createContext"](null); +var IntlConsumer = IntlContext.Consumer, + injectIntl_IntlProvider = IntlContext.Provider; +var Provider = injectIntl_IntlProvider; +var Context = IntlContext; +function injectIntl(WrappedComponent, options) { + var _ref = options || {}, + _ref$intlPropName = _ref.intlPropName, + intlPropName = _ref$intlPropName === void 0 ? 'intl' : _ref$intlPropName, + _ref$forwardRef = _ref.forwardRef, + forwardRef = _ref$forwardRef === void 0 ? false : _ref$forwardRef, + _ref$enforceContext = _ref.enforceContext, + enforceContext = _ref$enforceContext === void 0 ? true : _ref$enforceContext; + var WithIntl = function WithIntl(props) { + return react["createElement"](IntlConsumer, null, function (intl) { + if (enforceContext) { + invariantIntlContext(intl); + } + return react["createElement"](WrappedComponent, Object.assign({}, props, Object(defineProperty["a" /* default */])({}, intlPropName, intl), { + ref: forwardRef ? props.forwardedRef : null + })); + }); + }; + WithIntl.displayName = "injectIntl(".concat(getDisplayName(WrappedComponent), ")"); + WithIntl.WrappedComponent = WrappedComponent; + if (forwardRef) { + return hoistNonReactStatics(react["forwardRef"](function (props, ref) { + return react["createElement"](WithIntl, Object.assign({}, props, { + forwardedRef: ref + })); + }), WrappedComponent); + } + return hoistNonReactStatics(WithIntl, WrappedComponent); +} +// EXTERNAL MODULE: ./node_modules/intl-locales-supported/dist/index.js +var dist = __webpack_require__("kyWZ"); +var dist_default = /*#__PURE__*/__webpack_require__.n(dist); + +// CONCATENATED MODULE: ./node_modules/react-intl/lib/formatters/number.js + +var NUMBER_FORMAT_OPTIONS = ['localeMatcher', 'style', 'currency', 'currencyDisplay', 'unit', 'unitDisplay', 'useGrouping', 'minimumIntegerDigits', 'minimumFractionDigits', 'maximumFractionDigits', 'minimumSignificantDigits', 'maximumSignificantDigits', +// Unified NumberFormat (Stage 3 as of 10/22/19) +'compactDisplay', 'currencyDisplay', 'currencySign', 'notation', 'signDisplay', 'unit', 'unitDisplay']; +function getFormatter(_ref, getNumberFormat) { + var locale = _ref.locale, + formats = _ref.formats, + onError = _ref.onError; + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var format = options.format; + var defaults = format && getNamedFormat(formats, 'number', format, onError) || {}; + var filteredOptions = filterProps(options, NUMBER_FORMAT_OPTIONS, defaults); + return getNumberFormat(locale, filteredOptions); +} +function formatNumber(config, getNumberFormat, value) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + try { + return getFormatter(config, getNumberFormat, options).format(value); + } catch (e) { + config.onError(createError('Error formatting number.', e)); + } + return String(value); +} +function formatNumberToParts(config, getNumberFormat, value) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + try { + return getFormatter(config, getNumberFormat, options).formatToParts(value); + } catch (e) { + config.onError(createError('Error formatting number.', e)); + } + return []; +} +// CONCATENATED MODULE: ./node_modules/react-intl/lib/formatters/relativeTime.js + +var RELATIVE_TIME_FORMAT_OPTIONS = ['numeric', 'style']; +function relativeTime_getFormatter(_ref, getRelativeTimeFormat) { + var locale = _ref.locale, + formats = _ref.formats, + onError = _ref.onError; + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var format = options.format; + var defaults = !!format && getNamedFormat(formats, 'relative', format, onError) || {}; + var filteredOptions = filterProps(options, RELATIVE_TIME_FORMAT_OPTIONS, defaults); + return getRelativeTimeFormat(locale, filteredOptions); +} +function formatRelativeTime(config, getRelativeTimeFormat, value, unit) { + var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; + if (!unit) { + unit = 'second'; + } + var RelativeTimeFormat = Intl.RelativeTimeFormat; + if (!RelativeTimeFormat) { + config.onError(createError("Intl.RelativeTimeFormat is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-relativetimeformat\"\n")); + } + try { + return relativeTime_getFormatter(config, getRelativeTimeFormat, options).format(value, unit); + } catch (e) { + config.onError(createError('Error formatting relative time.', e)); + } + return String(value); +} +// CONCATENATED MODULE: ./node_modules/react-intl/lib/formatters/dateTime.js +/* + * Copyright 2015, Yahoo Inc. + * Copyrights licensed under the New BSD License. + * See the accompanying LICENSE file for terms. + */ + +var DATE_TIME_FORMAT_OPTIONS = ['localeMatcher', 'formatMatcher', 'timeZone', 'hour12', 'weekday', 'era', 'year', 'month', 'day', 'hour', 'minute', 'second', 'timeZoneName']; +function dateTime_getFormatter(_ref, type, getDateTimeFormat) { + var locale = _ref.locale, + formats = _ref.formats, + onError = _ref.onError, + timeZone = _ref.timeZone; + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var format = options.format; + var defaults = Object.assign(Object.assign({}, timeZone && { + timeZone: timeZone + }), format && getNamedFormat(formats, type, format, onError)); + var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults); + if (type === 'time' && !filteredOptions.hour && !filteredOptions.minute && !filteredOptions.second) { + // Add default formatting options if hour, minute, or second isn't defined. + filteredOptions = Object.assign(Object.assign({}, filteredOptions), { + hour: 'numeric', + minute: 'numeric' + }); + } + return getDateTimeFormat(locale, filteredOptions); +} +function formatDate(config, getDateTimeFormat, value) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var date = typeof value === 'string' ? new Date(value || 0) : value; + try { + return dateTime_getFormatter(config, 'date', getDateTimeFormat, options).format(date); + } catch (e) { + config.onError(createError('Error formatting date.', e)); + } + return String(date); +} +function formatTime(config, getDateTimeFormat, value) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var date = typeof value === 'string' ? new Date(value || 0) : value; + try { + return dateTime_getFormatter(config, 'time', getDateTimeFormat, options).format(date); + } catch (e) { + config.onError(createError('Error formatting time.', e)); + } + return String(date); +} +function formatDateToParts(config, getDateTimeFormat, value) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var date = typeof value === 'string' ? new Date(value || 0) : value; + try { + return dateTime_getFormatter(config, 'date', getDateTimeFormat, options).formatToParts(date); + } catch (e) { + config.onError(createError('Error formatting date.', e)); + } + return []; +} +function formatTimeToParts(config, getDateTimeFormat, value) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var date = typeof value === 'string' ? new Date(value || 0) : value; + try { + return dateTime_getFormatter(config, 'time', getDateTimeFormat, options).formatToParts(date); + } catch (e) { + config.onError(createError('Error formatting time.', e)); + } + return []; +} +// CONCATENATED MODULE: ./node_modules/react-intl/lib/formatters/plural.js + +var PLURAL_FORMAT_OPTIONS = ['localeMatcher', 'type']; +function formatPlural(_ref, getPluralRules, value) { + var locale = _ref.locale, + onError = _ref.onError; + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + if (!Intl.PluralRules) { + onError(createError("Intl.PluralRules is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-pluralrules\"\n")); + } + var filteredOptions = filterProps(options, PLURAL_FORMAT_OPTIONS); + try { + return getPluralRules(locale, filteredOptions).select(value); + } catch (e) { + onError(createError('Error formatting plural.', e)); + } + return 'other'; +} +// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules +var toConsumableArray = __webpack_require__("oBTY"); + +// CONCATENATED MODULE: ./node_modules/react-intl/lib/formatters/message.js + +/* + * Copyright 2015, Yahoo Inc. + * Copyrights licensed under the New BSD License. + * See the accompanying LICENSE file for terms. + */ + + + + +function setTimeZoneInOptions(opts, timeZone) { + return Object.keys(opts).reduce(function (all, k) { + all[k] = Object.assign({ + timeZone: timeZone + }, opts[k]); + return all; + }, {}); +} +function deepMergeOptions(opts1, opts2) { + var keys = Object.keys(Object.assign(Object.assign({}, opts1), opts2)); + return keys.reduce(function (all, k) { + all[k] = Object.assign(Object.assign({}, opts1[k] || {}), opts2[k] || {}); + return all; + }, {}); +} +function deepMergeFormatsAndSetTimeZone(f1, timeZone) { + if (!timeZone) { + return f1; + } + var mfFormats = intl_messageformat_lib.formats; + return Object.assign(Object.assign(Object.assign({}, mfFormats), f1), { + date: deepMergeOptions(setTimeZoneInOptions(mfFormats.date, timeZone), setTimeZoneInOptions(f1.date || {}, timeZone)), + time: deepMergeOptions(setTimeZoneInOptions(mfFormats.time, timeZone), setTimeZoneInOptions(f1.time || {}, timeZone)) + }); +} +var message_prepareIntlMessageFormatHtmlOutput = function prepareIntlMessageFormatHtmlOutput(chunks) { + return react["createElement"].apply(react, [react["Fragment"], null].concat(Object(toConsumableArray["a" /* default */])(chunks))); +}; +function message_formatMessage(_ref, state) { + var locale = _ref.locale, + formats = _ref.formats, + messages = _ref.messages, + defaultLocale = _ref.defaultLocale, + defaultFormats = _ref.defaultFormats, + onError = _ref.onError, + timeZone = _ref.timeZone; + var messageDescriptor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : { + id: '' + }; + var values = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var id = messageDescriptor.id, + defaultMessage = messageDescriptor.defaultMessage; // `id` is a required field of a Message Descriptor. + invariant(!!id, '[React Intl] An `id` must be provided to format a message.'); + var message = messages && messages[String(id)]; + formats = deepMergeFormatsAndSetTimeZone(formats, timeZone); + defaultFormats = deepMergeFormatsAndSetTimeZone(defaultFormats, timeZone); + var formattedMessageParts = []; + if (message) { + try { + var formatter = state.getMessageFormat(message, locale, formats, { + formatters: state + }); + formattedMessageParts = formatter.formatHTMLMessage(values); + } catch (e) { + onError(createError("Error formatting message: \"".concat(id, "\" for locale: \"").concat(locale, "\"") + (defaultMessage ? ', using default message as fallback.' : ''), e)); + } + } else { + // This prevents warnings from littering the console in development + // when no `messages` are passed into the for the + // default locale, and a default message is in the source. + if (!defaultMessage || locale && locale.toLowerCase() !== defaultLocale.toLowerCase()) { + onError(createError("Missing message: \"".concat(id, "\" for locale: \"").concat(locale, "\"") + (defaultMessage ? ', using default message as fallback.' : ''))); + } + } + if (!formattedMessageParts.length && defaultMessage) { + try { + var _formatter = state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats); + formattedMessageParts = _formatter.formatHTMLMessage(values); + } catch (e) { + onError(createError("Error formatting the default message for: \"".concat(id, "\""), e)); + } + } + if (!formattedMessageParts.length) { + onError(createError("Cannot format message: \"".concat(id, "\", ") + "using message ".concat(message || defaultMessage ? 'source' : 'id', " as fallback."))); + if (typeof message === 'string') { + return message || defaultMessage || String(id); + } + return defaultMessage || String(id); + } + if (formattedMessageParts.length === 1 && typeof formattedMessageParts[0] === 'string') { + return formattedMessageParts[0] || defaultMessage || String(id); + } + return message_prepareIntlMessageFormatHtmlOutput(formattedMessageParts); +} +function message_formatHTMLMessage(config, state) { + var messageDescriptor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : { + id: '' + }; + var rawValues = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + // Process all the values before they are used when formatting the ICU + // Message string. Since the formatted message might be injected via + // `innerHTML`, all String-based values need to be HTML-escaped. + var escapedValues = Object.keys(rawValues).reduce(function (escaped, name) { + var value = rawValues[name]; + escaped[name] = typeof value === 'string' ? utils_escape(value) : value; + return escaped; + }, {}); + return message_formatMessage(config, state, messageDescriptor, escapedValues); +} +// EXTERNAL MODULE: ./node_modules/shallow-equal/objects/index.js +var objects = __webpack_require__("6koa"); +var objects_default = /*#__PURE__*/__webpack_require__.n(objects); + +// CONCATENATED MODULE: ./node_modules/react-intl/lib/formatters/list.js + +var LIST_FORMAT_OPTIONS = ['localeMatcher', 'type', 'style']; +var now = Date.now(); +function generateToken(i) { + return "".concat(now, "_").concat(i, "_").concat(now); +} +function formatList(_ref, getListFormat, values) { + var locale = _ref.locale, + onError = _ref.onError; + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var ListFormat = Intl.ListFormat; + if (!ListFormat) { + onError(createError("Intl.ListFormat is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-listformat\"\n")); + } + var filteredOptions = filterProps(options, LIST_FORMAT_OPTIONS); + try { + var richValues = {}; + var serializedValues = values.map(function (v, i) { + if (typeof v === 'object') { + var id = generateToken(i); + richValues[id] = v; + return id; + } + return String(v); + }); + if (!Object.keys(richValues).length) { + return getListFormat(locale, filteredOptions).format(serializedValues); + } + var parts = getListFormat(locale, filteredOptions).formatToParts(serializedValues); + return parts.reduce(function (all, el) { + var val = el.value; + if (richValues[val]) { + all.push(richValues[val]); + } else if (typeof all[all.length - 1] === 'string') { + all[all.length - 1] += val; + } else { + all.push(val); + } + return all; + }, []); + } catch (e) { + onError(createError('Error formatting list.', e)); + } + return values; +} +// CONCATENATED MODULE: ./node_modules/react-intl/lib/formatters/displayName.js + +var DISPLAY_NAMES_OPTONS = ['localeMatcher', 'style', 'type', 'fallback']; +function formatDisplayName(_ref, getDisplayNames, value) { + var locale = _ref.locale, + onError = _ref.onError; + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var DisplayNames = Intl.DisplayNames; + if (!DisplayNames) { + onError(createError("Intl.DisplayNames is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-displaynames\"\n")); + } + var filteredOptions = filterProps(options, DISPLAY_NAMES_OPTONS); + try { + return getDisplayNames(locale, filteredOptions).of(value); + } catch (e) { + onError(createError('Error formatting display name.', e)); + } +} +// CONCATENATED MODULE: ./node_modules/react-intl/lib/components/provider.js + + + + + + +function _callSuper(t, o, e) { return o = Object(getPrototypeOf["a" /* default */])(o), Object(possibleConstructorReturn["a" /* default */])(t, Object(isNativeReflectConstruct["a" /* default */])() ? Reflect.construct(o, e || [], Object(getPrototypeOf["a" /* default */])(t).constructor) : o.apply(t, e)); } +/* + * Copyright 2015, Yahoo Inc. + * Copyrights licensed under the New BSD License. + * See the accompanying LICENSE file for terms. + */ + + + + + + + + + + + + +var shallowEquals = objects_default.a || objects; +function processIntlConfig(config) { + return { + locale: config.locale, + timeZone: config.timeZone, + formats: config.formats, + textComponent: config.textComponent, + messages: config.messages, + defaultLocale: config.defaultLocale, + defaultFormats: config.defaultFormats, + onError: config.onError + }; +} +/** + * Create intl object + * @param config intl config + * @param cache cache for formatter instances to prevent memory leak + */ +function createIntl(config, cache) { + var formatters = createFormatters(cache); + var resolvedConfig = Object.assign(Object.assign({}, DEFAULT_INTL_CONFIG), config); + if (!resolvedConfig.locale || !dist_default()(resolvedConfig.locale)) { + var locale = resolvedConfig.locale, + defaultLocale = resolvedConfig.defaultLocale, + onError = resolvedConfig.onError; + if (typeof onError === 'function') { + onError(createError("Missing locale data for locale: \"".concat(locale, "\". ") + "Using default locale: \"".concat(defaultLocale, "\" as fallback."))); + } + // Since there's no registered locale data for `locale`, this will + // fallback to the `defaultLocale` to make sure things can render. + // The `messages` are overridden to the `defaultProps` empty object + // to maintain referential equality across re-renders. It's assumed + // each contains a `defaultMessage` prop. + resolvedConfig.locale = resolvedConfig.defaultLocale || 'en'; + } + return Object.assign(Object.assign({}, resolvedConfig), { + formatters: formatters, + formatNumber: formatNumber.bind(null, resolvedConfig, formatters.getNumberFormat), + formatNumberToParts: formatNumberToParts.bind(null, resolvedConfig, formatters.getNumberFormat), + formatRelativeTime: formatRelativeTime.bind(null, resolvedConfig, formatters.getRelativeTimeFormat), + formatDate: formatDate.bind(null, resolvedConfig, formatters.getDateTimeFormat), + formatDateToParts: formatDateToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), + formatTime: formatTime.bind(null, resolvedConfig, formatters.getDateTimeFormat), + formatTimeToParts: formatTimeToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), + formatPlural: formatPlural.bind(null, resolvedConfig, formatters.getPluralRules), + formatMessage: message_formatMessage.bind(null, resolvedConfig, formatters), + formatHTMLMessage: message_formatHTMLMessage.bind(null, resolvedConfig, formatters), + formatList: formatList.bind(null, resolvedConfig, formatters.getListFormat), + formatDisplayName: formatDisplayName.bind(null, resolvedConfig, formatters.getDisplayNames) + }); +} +var provider_IntlProvider = /*#__PURE__*/function (_React$PureComponent) { + function IntlProvider() { + var _this; + Object(classCallCheck["a" /* default */])(this, IntlProvider); + _this = _callSuper(this, IntlProvider, arguments); + _this.cache = createIntlCache(); + _this.state = { + cache: _this.cache, + intl: createIntl(processIntlConfig(_this.props), _this.cache), + prevConfig: processIntlConfig(_this.props) + }; + return _this; + } + Object(inherits["a" /* default */])(IntlProvider, _React$PureComponent); + return Object(createClass["a" /* default */])(IntlProvider, [{ + key: "render", + value: function render() { + invariantIntlContext(this.state.intl); + return react["createElement"](Provider, { + value: this.state.intl + }, this.props.children); + } + }], [{ + key: "getDerivedStateFromProps", + value: function getDerivedStateFromProps(props, _ref) { + var prevConfig = _ref.prevConfig, + cache = _ref.cache; + var config = processIntlConfig(props); + if (!shallowEquals(prevConfig, config)) { + return { + intl: createIntl(config, cache), + prevConfig: config + }; + } + return null; + } + }]); +}(react["PureComponent"]); + +provider_IntlProvider.displayName = 'IntlProvider'; +provider_IntlProvider.defaultProps = DEFAULT_INTL_CONFIG; +// EXTERNAL MODULE: ./node_modules/umi/node_modules/@umijs/runtime/dist/index.esm.js +var index_esm = __webpack_require__("rlch"); + +// EXTERNAL MODULE: ./src/.umi-production/plugin-locale/locale.tsx +var plugin_locale_locale = __webpack_require__("ZW6p"); + +// EXTERNAL MODULE: ./node_modules/warning/warning.js +var warning = __webpack_require__("2W6z"); +var warning_default = /*#__PURE__*/__webpack_require__.n(warning); + +// EXTERNAL MODULE: ./src/.umi-production/core/umiExports.ts + 19 modules +var umiExports = __webpack_require__("9kvl"); + +// CONCATENATED MODULE: ./src/.umi-production/plugin-locale/localeExports.ts +// @ts-nocheck + + + +// @ts-ignore + + + + +var g_intl; +var useLocalStorage = true; +var localeInfo = {}; + +/** + * 增加一个新的国际化语言 + * @param name 语言的 key + * @param messages 对应的枚举对象 + * @param extraLocale momentLocale, antd 国际化 + */ +var addLocale = function addLocale(name, messages, extraLocales) { + var _localeInfo$name, _name$split; + if (!name) { + return; + } + // 可以合并 + var mergeMessages = ((_localeInfo$name = localeInfo[name]) === null || _localeInfo$name === void 0 ? void 0 : _localeInfo$name.messages) ? Object.assign({}, localeInfo[name].messages, messages) : messages; + var _ref = extraLocales || {}, + momentLocale = _ref.momentLocale, + antd = _ref.antd; + localeInfo[name] = { + messages: mergeMessages, + locale: (_name$split = name.split('-')) === null || _name$split === void 0 ? void 0 : _name$split.join('-'), + momentLocale: momentLocale, + antd: antd + }; +}; + +/** + * 获取当前的 intl 对象,可以在 node 中使用 + * @param locale 需要切换的语言类型 + * @param changeIntl 是否不使用 g_intl + * @returns IntlShape + */ +var localeExports_getIntl = function getIntl(locale, changeIntl) { + // 如果全局的 g_intl 存在,且不是 setIntl 调用 + if (g_intl && !changeIntl && !locale) { + return g_intl; + } + // 如果存在于 localeInfo 中 + if (locale && localeInfo[locale]) { + return createIntl(localeInfo[locale]); + } + // 不存在需要一个报错提醒 + warning_default()(!locale || !!localeInfo[locale], "The current popular language does not exist, please check the locales folder!"); + // 使用 zh-CN + if (localeInfo["zh-CN"]) return createIntl(localeInfo["zh-CN"]); + + // 如果还没有,返回一个空的 + return createIntl({ + locale: "zh-CN", + messages: {} + }); +}; + +/** + * 切换全局的 intl 的设置 + * @param locale 语言的key + */ +var setIntl = function setIntl(locale) { + g_intl = localeExports_getIntl(locale, true); +}; + +/** + * 获取当前选择的语言 + * @returns string + */ +var localeExports_getLocale = function getLocale() { + var runtimeLocale = umiExports["d" /* plugin */].applyPlugins({ + key: 'locale', + type: index_esm["a" /* ApplyPluginsType */].modify, + initialValue: {} + }); + // runtime getLocale for user define + if (typeof (runtimeLocale === null || runtimeLocale === void 0 ? void 0 : runtimeLocale.getLocale) === 'function') { + return runtimeLocale.getLocale(); + } + // please clear localStorage if you change the baseSeparator config + // because changing will break the app + var lang = typeof localStorage !== 'undefined' && useLocalStorage ? window.localStorage.getItem('umi_locale') : ''; + // support baseNavigator, default true + var browserLang; + var isNavigatorLanguageValid = typeof navigator !== 'undefined' && typeof navigator.language === 'string'; + browserLang = isNavigatorLanguageValid ? navigator.language.split('-').join('-') : ''; + return lang || browserLang || "zh-CN"; +}; + +/** + * 获取当前选择的方向 + * @returns string + */ +var getDirection = function getDirection() { + var lang = localeExports_getLocale(); + // array with all prefixs for rtl langueges ex: ar-EG , he-IL + var rtlLangs = ['he', 'ar', 'fa', 'ku']; + var direction = rtlLangs.filter(function (lng) { + return lang.startsWith(lng); + }).length ? 'rtl' : 'ltr'; + return direction; +}; + +/** + * 切换语言 + * @param lang 语言的 key + * @param realReload 是否刷新页面,默认刷新 + * @returns string + */ +var localeExports_setLocale = function setLocale(lang) { + var realReload = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + var localeExp = new RegExp("^([a-z]{2})-?([A-Z]{2})?$"); + var runtimeLocale = umiExports["d" /* plugin */].applyPlugins({ + key: 'locale', + type: index_esm["a" /* ApplyPluginsType */].modify, + initialValue: {} + }); + if (typeof (runtimeLocale === null || runtimeLocale === void 0 ? void 0 : runtimeLocale.setLocale) === 'function') { + runtimeLocale.setLocale({ + lang: lang, + realReload: realReload, + updater: function updater() { + var updateLang = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : lang; + return plugin_locale_locale["d" /* event */].emit(plugin_locale_locale["a" /* LANG_CHANGE_EVENT */], updateLang); + } + }); + return; + } + if (lang !== undefined && !localeExp.test(lang)) { + // for reset when lang === undefined + throw new Error('setLocale lang format error'); + } + if (localeExports_getLocale() !== lang) { + if (typeof window.localStorage !== 'undefined' && useLocalStorage) { + window.localStorage.setItem('umi_locale', lang || ''); + } + setIntl(lang); + if (realReload) { + window.location.reload(); + } else { + plugin_locale_locale["d" /* event */].emit(plugin_locale_locale["a" /* LANG_CHANGE_EVENT */], lang); + // chrome 不支持这个事件。所以人肉触发一下 + if (window.dispatchEvent) { + var _event = new Event('languagechange'); + window.dispatchEvent(_event); + } + } + } +}; +var firstWaring = true; + +/** + * intl.formatMessage 的语法糖 + * @deprecated 使用此 api 会造成切换语言的时候无法自动刷新,请使用 useIntl 或 injectIntl + * @param descriptor { id : string, defaultMessage : string } + * @param values { [key:string] : string } + * @returns string + */ +var localeExports_formatMessage = function formatMessage(descriptor, values) { + if (firstWaring) { + warning_default()(false, "Using this API will cause automatic refresh when switching languages, please use useIntl or injectIntl.\n\n\u4F7F\u7528\u6B64 api \u4F1A\u9020\u6210\u5207\u6362\u8BED\u8A00\u7684\u65F6\u5019\u65E0\u6CD5\u81EA\u52A8\u5237\u65B0\uFF0C\u8BF7\u4F7F\u7528 useIntl \u6216 injectIntl\u3002\n\nhttp://j.mp/37Fkd5Q\n "); + firstWaring = false; + } + return g_intl.formatMessage(descriptor, values); +}; + +/** + * 获取语言列表 + * @returns string[] + */ +var getAllLocales = function getAllLocales() { + return Object.keys(localeInfo); +}; + +/***/ }), + +/***/ "FhTr": +/*!*********************************************************************!*\ + !*** ./node_modules/@ant-design/icons-svg/lib/asn/RightOutlined.js ***! + \*********************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// This icon file is generated automatically. +Object.defineProperty(exports, "__esModule", { value: true }); +var RightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" } }] }, "name": "right", "theme": "outlined" }; +exports.default = RightOutlined; + + +/***/ }), + +/***/ "FoZm": +/*!************************************!*\ + !*** ./node_modules/intl/index.js ***! + \************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {// Expose `IntlPolyfill` as global to add locale data into runtime later on. +global.IntlPolyfill = __webpack_require__(/*! ./lib/core.js */ "fL0r"); + +// Require all locale data for `Intl`. This module will be +// ignored when bundling for the browser with Browserify/Webpack. +__webpack_require__(/*! ./locale-data/complete.js */ 1); + +// hack to export the polyfill as global Intl if needed +if (!global.Intl) { + global.Intl = global.IntlPolyfill; + global.IntlPolyfill.__applyLocaleSensitivePrototypes(); +} + +// providing an idiomatic api for the nodejs version of this module +module.exports = global.IntlPolyfill; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "yLpj"))) + +/***/ }), + +/***/ "FpZJ": +/*!*******************************************!*\ + !*** ./node_modules/has-symbols/shams.js ***! + \*******************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ "Fwt+": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/modules/es.typed-array.subarray.js ***! + \*****************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC"); +var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ"); +var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "I8vh"); +var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh"); + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; + +// `%TypedArray%.prototype.subarray` method +// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.subarray +exportTypedArrayMethod('subarray', function subarray(begin, end) { + var O = aTypedArray(this); + var length = O.length; + var beginIndex = toAbsoluteIndex(begin, length); + return new (speciesConstructor(O, O.constructor))( + O.buffer, + O.byteOffset + beginIndex * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - beginIndex) + ); +}); + + +/***/ }), + +/***/ "FzKp": +/*!*****************************************************!*\ + !*** ./src/models/classrooms/boards.ts + 1 modules ***! + \*****************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/pages/metting/home/index.jsx */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// 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/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +var asyncToGenerator = __webpack_require__("9og8"); + +// EXTERNAL MODULE: ./src/utils/fetch.ts +var fetch = __webpack_require__("ErOA"); + +// CONCATENATED MODULE: ./src/service/boards.ts + + +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + +function boards_getBoardsCategoryList(_x) { + return _getBoardsCategoryList.apply(this, arguments); +} +function _getBoardsCategoryList() { + _getBoardsCategoryList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) { + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", Object(fetch["a" /* default */])("/api/courses/board_list.json", { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context.stop(); + } + }, _callee); + })); + return _getBoardsCategoryList.apply(this, arguments); +} +function boards_getBoardsDetail(_x2) { + return _getBoardsDetail.apply(this, arguments); +} +function _getBoardsDetail() { + _getBoardsDetail = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", Object(fetch["a" /* default */])("/api/messages/".concat(params.boardId, ".json"), { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return _getBoardsDetail.apply(this, arguments); +} +function boards_setTopping(_x3) { + return _setTopping.apply(this, arguments); +} +function _setTopping() { + _setTopping = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) { + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + return _context3.abrupt("return", Object(fetch["a" /* default */])("/api/messages/".concat(params.id, "/sticky_top.json"), { + method: 'put', + body: { + course_id: params.coursesId + } + })); + case 1: + case "end": + return _context3.stop(); + } + }, _callee3); + })); + return _setTopping.apply(this, arguments); +} +function boards_escTopping(_x4) { + return _escTopping.apply(this, arguments); +} +function _escTopping() { + _escTopping = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) { + return _regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + return _context4.abrupt("return", Object(fetch["a" /* default */])("/api/messages/".concat(params.id, "/sticky_top.json"), { + method: 'put', + body: { + course_id: params.coursesId + } + })); + case 1: + case "end": + return _context4.stop(); + } + }, _callee4); + })); + return _escTopping.apply(this, arguments); +} +function boards_getReplyList(_x5) { + return _getReplyList.apply(this, arguments); +} +function _getReplyList() { + _getReplyList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) { + return _regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + return _context5.abrupt("return", Object(fetch["a" /* default */])("/api/messages/".concat(params.boardId, "/reply_list.json"), { + method: 'get', + params: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context5.stop(); + } + }, _callee5); + })); + return _getReplyList.apply(this, arguments); +} +function boards_createReply(_x6) { + return _createReply.apply(this, arguments); +} +function _createReply() { + _createReply = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) { + return _regeneratorRuntime().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + return _context6.abrupt("return", Object(fetch["a" /* default */])("/api/messages/".concat(params.boardId, "/reply.json"), { + method: 'post', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context6.stop(); + } + }, _callee6); + })); + return _createReply.apply(this, arguments); +} +function boards_replyLike(_x7) { + return _replyLike.apply(this, arguments); +} +function _replyLike() { + _replyLike = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) { + return _regeneratorRuntime().wrap(function _callee7$(_context7) { + while (1) switch (_context7.prev = _context7.next) { + case 0: + return _context7.abrupt("return", Object(fetch["a" /* default */])("/api/praise_tread/like.json", { + method: 'post', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context7.stop(); + } + }, _callee7); + })); + return _replyLike.apply(this, arguments); +} +function boards_replyUnLike(_x8) { + return _replyUnLike.apply(this, arguments); +} +function _replyUnLike() { + _replyUnLike = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) { + return _regeneratorRuntime().wrap(function _callee8$(_context8) { + while (1) switch (_context8.prev = _context8.next) { + case 0: + return _context8.abrupt("return", Object(fetch["a" /* default */])("/api/praise_tread/unlike.json", { + method: 'delete', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context8.stop(); + } + }, _callee8); + })); + return _replyUnLike.apply(this, arguments); +} +function boards_deleteReply(_x9) { + return _deleteReply.apply(this, arguments); +} +function _deleteReply() { + _deleteReply = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params) { + return _regeneratorRuntime().wrap(function _callee9$(_context9) { + while (1) switch (_context9.prev = _context9.next) { + case 0: + return _context9.abrupt("return", Object(fetch["a" /* default */])("/api/commons/delete.json", { + method: 'delete', + body: Object(objectSpread2["a" /* default */])({}, params) + })); + case 1: + case "end": + return _context9.stop(); + } + }, _callee9); + })); + return _deleteReply.apply(this, arguments); +} +// CONCATENATED MODULE: ./src/models/classrooms/boards.ts + +function boards_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ boards_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + +var BoardsModel = { + namespace: 'boards', + state: { + name: '讨论', + loading: true, + // 题库 + actionTabs: {}, + boardsDetail: {}, + boardsCategoryList: {} + }, + effects: { + getBoardsCategoryList: function getBoardsCategoryList(_ref, _ref2) { + var payload = _ref.payload, + callback = _ref.callback; + var call = _ref2.call, + put = _ref2.put; + return /*#__PURE__*/boards_regeneratorRuntime().mark(function _callee() { + var response; + return boards_regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return call(boards_getBoardsCategoryList, payload); + case 2: + response = _context.sent; + _context.next = 5; + return put({ + type: 'save', + payload: { + boardsCategoryList: Object(objectSpread2["a" /* default */])({}, response.data) + } + }); + case 5: + return _context.abrupt("return", response.data); + case 6: + case "end": + return _context.stop(); + } + }, _callee); + })(); + }, + // 讨论详情 + getBoardsDetail: function getBoardsDetail(_ref3, _ref4) { + var payload = _ref3.payload, + callback = _ref3.callback; + var call = _ref4.call, + put = _ref4.put; + return /*#__PURE__*/boards_regeneratorRuntime().mark(function _callee2() { + var response; + return boards_regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return call(boards_getBoardsDetail, payload); + case 2: + response = _context2.sent; + _context2.next = 5; + return put({ + type: 'save', + payload: { + boardsDetail: Object(objectSpread2["a" /* default */])({}, response.data) + } + }); + case 5: + return _context2.abrupt("return", response.data); + case 6: + case "end": + return _context2.stop(); + } + }, _callee2); + })(); + }, + // 讨论置顶 + setTopping: function setTopping(_ref5, _ref6) { + var payload = _ref5.payload, + callback = _ref5.callback; + var call = _ref6.call, + put = _ref6.put; + return /*#__PURE__*/boards_regeneratorRuntime().mark(function _callee3() { + return boards_regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + _context3.next = 2; + return call(boards_setTopping, payload); + case 2: + return _context3.abrupt("return", _context3.sent); + case 3: + case "end": + return _context3.stop(); + } + }, _callee3); + })(); + }, + // 讨论取消置顶 + escTopping: function escTopping(_ref7, _ref8) { + var payload = _ref7.payload, + callback = _ref7.callback; + var call = _ref8.call, + put = _ref8.put; + return /*#__PURE__*/boards_regeneratorRuntime().mark(function _callee4() { + return boards_regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + _context4.next = 2; + return call(boards_escTopping, payload); + case 2: + return _context4.abrupt("return", _context4.sent); + case 3: + case "end": + return _context4.stop(); + } + }, _callee4); + })(); + }, + // 讨论回复列表 + getReplyList: function getReplyList(_ref9, _ref10) { + var payload = _ref9.payload, + callback = _ref9.callback; + var call = _ref10.call, + put = _ref10.put; + return /*#__PURE__*/boards_regeneratorRuntime().mark(function _callee5() { + var response; + return boards_regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + _context5.next = 2; + return call(boards_getReplyList, payload); + case 2: + response = _context5.sent; + _context5.next = 5; + return put({ + type: 'save', + payload: { + replyList: Object(objectSpread2["a" /* default */])({}, response.data) + } + }); + case 5: + case "end": + return _context5.stop(); + } + }, _callee5); + })(); + }, + // 讨论创建回复 + createReply: function createReply(_ref11, _ref12) { + var payload = _ref11.payload, + callback = _ref11.callback; + var call = _ref12.call, + put = _ref12.put; + return /*#__PURE__*/boards_regeneratorRuntime().mark(function _callee6() { + return boards_regeneratorRuntime().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + _context6.next = 2; + return call(boards_createReply, payload); + case 2: + return _context6.abrupt("return", _context6.sent); + case 3: + case "end": + return _context6.stop(); + } + }, _callee6); + })(); + }, + // 讨论回复点赞 + replyLike: function replyLike(_ref13, _ref14) { + var payload = _ref13.payload, + callback = _ref13.callback; + var call = _ref14.call, + put = _ref14.put; + return /*#__PURE__*/boards_regeneratorRuntime().mark(function _callee7() { + return boards_regeneratorRuntime().wrap(function _callee7$(_context7) { + while (1) switch (_context7.prev = _context7.next) { + case 0: + _context7.next = 2; + return call(boards_replyLike, payload); + case 2: + return _context7.abrupt("return", _context7.sent); + case 3: + case "end": + return _context7.stop(); + } + }, _callee7); + })(); + }, + // 讨论回复取消点赞 + replyUnLike: function replyUnLike(_ref15, _ref16) { + var payload = _ref15.payload, + callback = _ref15.callback; + var call = _ref16.call, + put = _ref16.put; + return /*#__PURE__*/boards_regeneratorRuntime().mark(function _callee8() { + return boards_regeneratorRuntime().wrap(function _callee8$(_context8) { + while (1) switch (_context8.prev = _context8.next) { + case 0: + _context8.next = 2; + return call(boards_replyUnLike, payload); + case 2: + return _context8.abrupt("return", _context8.sent); + case 3: + case "end": + return _context8.stop(); + } + }, _callee8); + })(); + }, + // 讨论回复删除 + deleteReply: function deleteReply(_ref17, _ref18) { + var payload = _ref17.payload, + callback = _ref17.callback; + var call = _ref18.call, + put = _ref18.put; + return /*#__PURE__*/boards_regeneratorRuntime().mark(function _callee9() { + return boards_regeneratorRuntime().wrap(function _callee9$(_context9) { + while (1) switch (_context9.prev = _context9.next) { + case 0: + _context9.next = 2; + return call(boards_deleteReply, payload); + case 2: + return _context9.abrupt("return", _context9.sent); + case 3: + case "end": + return _context9.stop(); + } + }, _callee9); + })(); + }, + // 设置操做action + setActionTabs: function setActionTabs(_ref19, _ref20) { + var payload = _ref19.payload; + var call = _ref20.call, + put = _ref20.put; + return /*#__PURE__*/boards_regeneratorRuntime().mark(function _callee10() { + return boards_regeneratorRuntime().wrap(function _callee10$(_context10) { + while (1) switch (_context10.prev = _context10.next) { + case 0: + _context10.next = 2; + return put({ + type: 'save', + payload: { + actionTabs: Object(objectSpread2["a" /* default */])({}, payload) + } + }); + case 2: + case "end": + return _context10.stop(); + } + }, _callee10); + })(); + } + }, + reducers: { + save: function save(state, action) { + return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload); + } + }, + subscriptions: { + setup: function setup(_ref21) { + var dispatch = _ref21.dispatch, + history = _ref21.history; + } + } +}; +/* harmony default export */ var boards = __webpack_exports__["a"] = (BoardsModel); + +/***/ }), + +/***/ "G+G9": +/*!**********************************!*\ + !*** ./src/models/user/index.ts ***! + \**********************************/ +/*! exports provided: default */ +/*! exports used: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw"); +/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties */ "PpiC"); +/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! umi */ "9kvl"); +/* harmony import */ var _service_user__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/service/user */ "jb+D"); + + +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + + +var UserModel = { + namespace: 'user', + state: { + name: '用户登录模块', + //是否显示登录弹窗,false不显示true显示 + showPopLogin: false, + // 是否显示被关闭按钮 + showClosable: false, + // 用户信息 + userInfo: {}, + eduUserInfo: {}, + navigationInfo: {}, + loading: true, + actionTabs: { + key: '', + params: {}, + phone: '' + } + }, + effects: { + login: function login(_ref, _ref2) { + var payload = _ref.payload; + var call = _ref2.call, + put = _ref2.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { + var to, params, response; + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + to = payload.to, params = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(payload, ["to"]); + _context.next = 3; + return call(_service_user__WEBPACK_IMPORTED_MODULE_3__[/* LoginIn */ "g"], params); + case 3: + response = _context.sent; + if (!response.status) { + try { + if (to) { + umi__WEBPACK_IMPORTED_MODULE_2__[/* history */ "c"].replace(to); + } else { + location.reload(); + } + } catch (e) {} + } + case 5: + case "end": + return _context.stop(); + } + }, _callee); + })(); + }, + showPopLogin: function showPopLogin(_ref3, _ref4) { + var payload = _ref3.payload; + var put = _ref4.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return put({ + type: 'save', + payload: { + showPopLogin: payload.showPopLogin, + showClosable: payload.showClosable + } + }); + case 2: + case "end": + return _context2.stop(); + } + }, _callee2); + })(); + }, + GetCount: function GetCount(_ref5, _ref6) { + var payload = _ref5.payload; + var call = _ref6.call, + put = _ref6.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() { + var response; + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + _context3.next = 2; + return call(_service_user__WEBPACK_IMPORTED_MODULE_3__[/* getCount */ "k"], Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)); + case 2: + response = _context3.sent; + return _context3.abrupt("return", response); + case 4: + case "end": + return _context3.stop(); + } + }, _callee3); + })(); + }, + ForgeLogin: function ForgeLogin(_ref7, _ref8) { + var payload = _ref7.payload; + var call = _ref8.call, + put = _ref8.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() { + var to, response; + return _regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + to = payload.to; + _context4.next = 3; + return call(_service_user__WEBPACK_IMPORTED_MODULE_3__[/* ForgeLogin */ "c"], Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)); + case 3: + response = _context4.sent; + if (!response.status) { + try { + if (to) { + umi__WEBPACK_IMPORTED_MODULE_2__[/* history */ "c"].replace(to); + } else { + location.reload(); + } + } catch (e) {} + } + return _context4.abrupt("return", response); + case 6: + case "end": + return _context4.stop(); + } + }, _callee4); + })(); + }, + getUserInfo: function getUserInfo(_ref9, _ref10) { + var payload = _ref9.payload; + var call = _ref10.call, + put = _ref10.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() { + var response; + return _regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + _context5.next = 2; + return call(_service_user__WEBPACK_IMPORTED_MODULE_3__[/* getUserInfo */ "x"], Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)); + case 2: + response = _context5.sent; + localStorage.userInfo = JSON.stringify(response); + _context5.next = 6; + return put({ + type: 'save', + payload: { + userInfo: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response) + } + }); + case 6: + return _context5.abrupt("return", response); + case 7: + case "end": + return _context5.stop(); + } + }, _callee5); + })(); + }, + getEducoderUserInfo: function getEducoderUserInfo(_ref11, _ref12) { + var payload = _ref11.payload; + var call = _ref12.call, + put = _ref12.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() { + var response; + return _regeneratorRuntime().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + _context6.next = 2; + return call(_service_user__WEBPACK_IMPORTED_MODULE_3__[/* getEducoderUserInfo */ "m"], Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)); + case 2: + response = _context6.sent; + _context6.next = 5; + return put({ + type: 'save', + payload: { + eduUserInfo: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response) + } + }); + case 5: + return _context6.abrupt("return", response); + case 6: + case "end": + return _context6.stop(); + } + }, _callee6); + })(); + }, + ForgeGetZoneList: function ForgeGetZoneList(_ref13, _ref14) { + var payload = _ref13.payload; + var call = _ref14.call, + put = _ref14.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() { + var response; + return _regeneratorRuntime().wrap(function _callee7$(_context7) { + while (1) switch (_context7.prev = _context7.next) { + case 0: + _context7.next = 2; + return call(_service_user__WEBPACK_IMPORTED_MODULE_3__[/* getZoneList */ "A"], Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)); + case 2: + response = _context7.sent; + return _context7.abrupt("return", response); + case 4: + case "end": + return _context7.stop(); + } + }, _callee7); + })(); + }, + getNavigationInfo: function getNavigationInfo(_ref15, _ref16) { + var payload = _ref15.payload; + var call = _ref16.call, + put = _ref16.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() { + var response; + return _regeneratorRuntime().wrap(function _callee8$(_context8) { + while (1) switch (_context8.prev = _context8.next) { + case 0: + _context8.next = 2; + return call(_service_user__WEBPACK_IMPORTED_MODULE_3__[/* getNavigationInfo */ "q"], Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)); + case 2: + response = _context8.sent; + _context8.next = 5; + return put({ + type: 'save', + payload: { + navigationInfo: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response) + } + }); + case 5: + case "end": + return _context8.stop(); + } + }, _callee8); + })(); + }, + setActionTabs: function setActionTabs(_ref17, _ref18) { + var payload = _ref17.payload; + var call = _ref18.call, + put = _ref18.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() { + return _regeneratorRuntime().wrap(function _callee9$(_context9) { + while (1) switch (_context9.prev = _context9.next) { + case 0: + _context9.next = 2; + return put({ + type: 'save', + payload: { + actionTabs: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload) + } + }); + case 2: + case "end": + return _context9.stop(); + } + }, _callee9); + })(); + }, + ForgeCheckName: function ForgeCheckName(_ref19, _ref20) { + var payload = _ref19.payload; + var call = _ref20.call, + put = _ref20.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() { + var response; + return _regeneratorRuntime().wrap(function _callee10$(_context10) { + while (1) switch (_context10.prev = _context10.next) { + case 0: + _context10.next = 2; + return call(_service_user__WEBPACK_IMPORTED_MODULE_3__[/* ForgeCheckName */ "b"], Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)); + case 2: + response = _context10.sent; + return _context10.abrupt("return", response); + case 4: + case "end": + return _context10.stop(); + } + }, _callee10); + })(); + }, + ForgeCheckEmail: function ForgeCheckEmail(_ref21, _ref22) { + var payload = _ref21.payload; + var call = _ref22.call, + put = _ref22.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() { + var response; + return _regeneratorRuntime().wrap(function _callee11$(_context11) { + while (1) switch (_context11.prev = _context11.next) { + case 0: + _context11.next = 2; + return call(_service_user__WEBPACK_IMPORTED_MODULE_3__[/* ForgeCheckEmail */ "a"], Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)); + case 2: + response = _context11.sent; + return _context11.abrupt("return", response); + case 4: + case "end": + return _context11.stop(); + } + }, _callee11); + })(); + }, + ForgeSaveUserInfo: function ForgeSaveUserInfo(_ref23, _ref24) { + var payload = _ref23.payload; + var call = _ref24.call, + put = _ref24.put; + return /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() { + var response; + return _regeneratorRuntime().wrap(function _callee12$(_context12) { + while (1) switch (_context12.prev = _context12.next) { + case 0: + _context12.next = 2; + return call(_service_user__WEBPACK_IMPORTED_MODULE_3__[/* ForgeSaveUserInfo */ "e"], Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)); + case 2: + response = _context12.sent; + return _context12.abrupt("return", response); + case 4: + case "end": + return _context12.stop(); + } + }, _callee12); + })(); + } + }, + reducers: { + save: function save(state, action) { + return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, state), action.payload); + } // 启用 immer 之后 + // save(state, action) { + // state.name = action.payload; + // }, + } +}; +/* harmony default export */ __webpack_exports__["a"] = (UserModel); + +/***/ }), + +/***/ "G+Rx": +/*!************************************************!*\ + !*** ./node_modules/core-js/internals/html.js ***! + \************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY"); + +module.exports = getBuiltIn('document', 'documentElement'); + + +/***/ }), + +/***/ "G/JM": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/es.reflect.own-keys.js ***! + \*************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var ownKeys = __webpack_require__(/*! ../internals/own-keys */ "Vu81"); + +// `Reflect.ownKeys` method +// https://tc39.github.io/ecma262/#sec-reflect.ownkeys +$({ target: 'Reflect', stat: true }, { + ownKeys: ownKeys +}); + + +/***/ }), + +/***/ "GC2F": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/to-offset.js ***! + \*****************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var toPositiveInteger = __webpack_require__(/*! ../internals/to-positive-integer */ "+M1K"); + +module.exports = function (it, BYTES) { + var offset = toPositiveInteger(it); + if (offset % BYTES) throw RangeError('Wrong offset'); + return offset; +}; + + +/***/ }), + +/***/ "GKVU": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.anchor.js ***! + \**********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var createHTML = __webpack_require__(/*! ../internals/create-html */ "hXpO"); +var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "rwPt"); + +// `String.prototype.anchor` method +// https://tc39.github.io/ecma262/#sec-string.prototype.anchor +$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('anchor') }, { + anchor: function anchor(name) { + return createHTML(this, 'a', 'name', name); + } +}); + + +/***/ }), + +/***/ "GNNt": +/*!*************************************************************!*\ + !*** ./node_modules/antd/es/config-provider/style/index.js ***! + \*************************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.less */ "k/Y0"); +/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_0__); + + +/***/ }), + +/***/ "GRPF": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.fontsize.js ***! + \************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var createHTML = __webpack_require__(/*! ../internals/create-html */ "hXpO"); +var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "rwPt"); + +// `String.prototype.fontsize` method +// https://tc39.github.io/ecma262/#sec-string.prototype.fontsize +$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fontsize') }, { + fontsize: function fontsize(size) { + return createHTML(this, 'font', 'size', size); + } +}); + + +/***/ }), + +/***/ "GSrb": +/*!***************************************************************************!*\ + !*** ./node_modules/@ant-design/icons-svg/lib/asn/CheckCircleOutlined.js ***! + \***************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// This icon file is generated automatically. +Object.defineProperty(exports, "__esModule", { value: true }); +var CheckCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z" } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "check-circle", "theme": "outlined" }; +exports.default = CheckCircleOutlined; + + +/***/ }), + +/***/ "GXvd": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es.symbol.species.js ***! + \***********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n"); + +// `Symbol.species` well-known symbol +// https://tc39.github.io/ecma262/#sec-symbol.species +defineWellKnownSymbol('species'); + + +/***/ }), + +/***/ "GarU": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/an-instance.js ***! + \*******************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +module.exports = function (it, Constructor, name) { + if (!(it instanceof Constructor)) { + throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation'); + } return it; +}; + + +/***/ }), + +/***/ "GoyQ": +/*!*****************************************!*\ + !*** ./node_modules/lodash/isObject.js ***! + \*****************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); +} + +module.exports = isObject; + + +/***/ }), + +/***/ "H+LF": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/es.weak-set.js ***! + \*****************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var collection = __webpack_require__(/*! ../internals/collection */ "bWFh"); +var collectionWeak = __webpack_require__(/*! ../internals/collection-weak */ "rKzb"); + +// `WeakSet` constructor +// https://tc39.github.io/ecma262/#sec-weakset-constructor +collection('WeakSet', function (init) { + return function WeakSet() { return init(this, arguments.length ? arguments[0] : undefined); }; +}, collectionWeak); + + +/***/ }), + +/***/ "H4Hi": +/*!****************************************!*\ + !*** ./src/layouts/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 = {"loading":"loading___Pj8IT","layoutMainClass":"layoutMainClass___Z79Lq"}; + +/***/ }), + +/***/ "H4fg": +/*!*******************************************************!*\ + !*** ./node_modules/rc-pagination/es/locale/en_US.js ***! + \*******************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony default export */ __webpack_exports__["a"] = ({ + // Options.jsx + items_per_page: '/ page', + jump_to: 'Go to', + jump_to_confirm: 'confirm', + page: '', + // Pagination.jsx + prev_page: 'Previous Page', + next_page: 'Next Page', + prev_5: 'Previous 5 Pages', + next_5: 'Next 5 Pages', + prev_3: 'Previous 3 Pages', + next_3: 'Next 3 Pages' +}); + +/***/ }), + +/***/ "H7XF": +/*!*****************************************!*\ + !*** ./node_modules/base64-js/index.js ***! + \*****************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.byteLength = byteLength +exports.toByteArray = toByteArray +exports.fromByteArray = fromByteArray + +var lookup = [] +var revLookup = [] +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + +var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i +} + +// Support decoding URL-safe base64 strings, as Node.js does. +// See: https://en.wikipedia.org/wiki/Base64#URL_applications +revLookup['-'.charCodeAt(0)] = 62 +revLookup['_'.charCodeAt(0)] = 63 + +function getLens (b64) { + var len = b64.length + + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) + + return [validLen, placeHoldersLen] +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + + var curByte = 0 + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen + + var i + for (i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) + } + + return parts.join('') +} + + +/***/ }), + +/***/ "H84U": +/*!*********************************************************************!*\ + !*** ./node_modules/antd/es/config-provider/context.js + 1 modules ***! + \*********************************************************************/ +/*! exports provided: ConfigContext, ConfigConsumer, withConfigConsumer */ +/*! exports used: ConfigConsumer, ConfigContext */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/empty/index.js because of ./src/pages/Competitions/Entered/Enteredmodel/DownStudents.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ ConfigContext; }); +__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ ConfigConsumer; }); + +// UNUSED EXPORTS: withConfigConsumer + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js +var helpers_extends = __webpack_require__("pVnL"); +var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends); + +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__("q1tI"); + +// EXTERNAL MODULE: ./node_modules/antd/es/empty/index.js + 2 modules +var empty = __webpack_require__("ECub"); + +// CONCATENATED MODULE: ./node_modules/antd/es/config-provider/renderEmpty.js + + + + +var renderEmpty_renderEmpty = function renderEmpty(componentName) { + return /*#__PURE__*/react["createElement"](ConfigConsumer, null, function (_ref) { + var getPrefixCls = _ref.getPrefixCls; + var prefix = getPrefixCls('empty'); + + switch (componentName) { + case 'Table': + case 'List': + return /*#__PURE__*/react["createElement"](empty["a" /* default */], { + image: empty["a" /* default */].PRESENTED_IMAGE_SIMPLE + }); + + case 'Select': + case 'TreeSelect': + case 'Cascader': + case 'Transfer': + case 'Mentions': + return /*#__PURE__*/react["createElement"](empty["a" /* default */], { + image: empty["a" /* default */].PRESENTED_IMAGE_SIMPLE, + className: "".concat(prefix, "-small") + }); + + default: + return /*#__PURE__*/react["createElement"](empty["a" /* default */], null); + } + }); +}; + +/* harmony default export */ var config_provider_renderEmpty = (renderEmpty_renderEmpty); +// CONCATENATED MODULE: ./node_modules/antd/es/config-provider/context.js + + + +var ConfigContext = /*#__PURE__*/react["createContext"]({ + // We provide a default function for Context without provider + getPrefixCls: function getPrefixCls(suffixCls, customizePrefixCls) { + if (customizePrefixCls) return customizePrefixCls; + return suffixCls ? "ant-".concat(suffixCls) : 'ant'; + }, + renderEmpty: config_provider_renderEmpty +}); +var ConfigConsumer = ConfigContext.Consumer; +function withConfigConsumer(config) { + return function withConfigConsumerFunc(Component) { + // Wrap with ConfigConsumer. Since we need compatible with react 15, be care when using ref methods + var SFC = function SFC(props) { + return /*#__PURE__*/react["createElement"](ConfigConsumer, null, function (configProps) { + var basicPrefixCls = config.prefixCls; + var getPrefixCls = configProps.getPrefixCls; + var customizePrefixCls = props.prefixCls; + var prefixCls = getPrefixCls(basicPrefixCls, customizePrefixCls); + return /*#__PURE__*/react["createElement"](Component, extends_default()({}, configProps, props, { + prefixCls: prefixCls + })); + }); + }; + + var cons = Component.constructor; + var name = cons && cons.displayName || Component.name || 'Component'; + SFC.displayName = "withConfigConsumer(".concat(name, ")"); + return SFC; + }; +} + +/***/ }), + +/***/ "HAuM": +/*!******************************************************!*\ + !*** ./node_modules/core-js/internals/a-function.js ***! + \******************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +module.exports = function (it) { + if (typeof it != 'function') { + throw TypeError(String(it) + ' is not a function'); + } return it; +}; + + +/***/ }), + +/***/ "HBuW": +/*!********************************!*\ + !*** ./src/service/shixuns.ts ***! + \********************************/ +/*! exports provided: getShixunsList, getShixunsMenus, getShixunsDetail, getRightData, getChallengesData, execJupyter, execShixun, openChallenge, challengeMoveUp, challengeMoveDown, cancelCollect, collect, searchUserCourses, sendToCourse, cancelRelease, cancelPublic, applyPublic, release, getNewShixunsData, deleteAttachment, applyShixunMirror, submitShixuns, getShixunsJupyterLab, getAuditSituationData, updateAuditSituation, getCollaboratorsData, addCollaborator, addTeachGroupMember, getChangeManager, changeManager, deleteCollaborators, getRankingList, getSettingsData, getMirrorScript, getScriptContent, getCustomScript, updateSettingBasicInfo, getShixunQuote, deleteShixun, permanentClose, getDepartments, updatePermissionSetting, updateLearnSetting, updateSetting, getSetData, deleteDataSet, getChallengesNew, addChallengesNew, getChallengePractice, updateChallengesNew, getQuestionList, updateChallenges, deleteChallengesNew, getChallengesEdit, getChallengesAnswer, updateChallengesAnswer, addChallengesQuestion, updateChallengesQuestion, deleteChallengesQuestion, upChallengesQuestion, downChallengesQuestion, getEditChallengesQuestion, deleteGitFile, moveGitFile, getRepository, getSecretRepository, addRepositoryFile, getRepositoryCommit, getFileContent, updateRepositoryFile, uploadGitFolder, resetMyGame, getInfoWithTPM, getTimeInfoWithTPM, resetWithTPM, saveWithTPM, activeWithTPM, getForkList, updateCollaboratorEditable, setSecretDir, getEnvironmentData, getEnvironmentDetail, createRepository, createSecretRepository, existExercise, getMirrorApplies, mirrorAppliesPublish, mirrorAppliesOpenVnc, mirrorAppliesOpenWebssh, mirrorAppliesSaveImage, mirrorAppliesDeleteImage, mirrorAppliesExtendVnc, mirrorAppliesResetVncLink, getTaskPass, getInfoWithJupyterLab, updateJupyterLabSetting */ +/*! exports used: addCollaborator, addRepositoryFile, addTeachGroupMember, applyPublic, applyShixunMirror, cancelCollect, cancelPublic, cancelRelease, challengeMoveDown, challengeMoveUp, changeManager, collect, deleteAttachment, deleteCollaborators, deleteDataSet, deleteGitFile, deleteShixun, execJupyter, execShixun, getAuditSituationData, getChallengesData, getChallengesEdit, getChallengesNew, getChangeManager, getCollaboratorsData, getCustomScript, getDepartments, getEditChallengesQuestion, getEnvironmentData, getFileContent, getInfoWithJupyterLab, getMirrorApplies, getMirrorScript, getNewShixunsData, getRankingList, getRepository, getRepositoryCommit, getRightData, getScriptContent, getSecretRepository, getSetData, getSettingsData, getShixunQuote, getShixunsDetail, getShixunsJupyterLab, getShixunsList, getShixunsMenus, moveGitFile, openChallenge, permanentClose, release, searchUserCourses, sendToCourse, submitShixuns, updateAuditSituation, updateCollaboratorEditable, updateLearnSetting, updatePermissionSetting, updateRepositoryFile, updateSetting, updateSettingBasicInfo, uploadGitFolder */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return getShixunsList; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return getShixunsMenus; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return getShixunsDetail; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return getRightData; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return getChallengesData; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return execJupyter; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return execShixun; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "W", function() { return openChallenge; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return challengeMoveUp; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return challengeMoveDown; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return cancelCollect; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return collect; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Z", function() { return searchUserCourses; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ab", function() { return sendToCourse; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return cancelRelease; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return cancelPublic; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return applyPublic; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Y", function() { return release; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return getNewShixunsData; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return deleteAttachment; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return applyShixunMirror; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bb", function() { return submitShixuns; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return getShixunsJupyterLab; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return getAuditSituationData; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cb", function() { return updateAuditSituation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return getCollaboratorsData; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addCollaborator; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return addTeachGroupMember; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return getChangeManager; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return changeManager; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return deleteCollaborators; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return getRankingList; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return getSettingsData; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return getMirrorScript; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return getScriptContent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return getCustomScript; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ib", function() { return updateSettingBasicInfo; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return getShixunQuote; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return deleteShixun; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "X", function() { return permanentClose; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return getDepartments; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fb", function() { return updatePermissionSetting; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "eb", function() { return updateLearnSetting; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hb", function() { return updateSetting; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "O", function() { return getSetData; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return deleteDataSet; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return getChallengesNew; }); +/* unused harmony export addChallengesNew */ +/* unused harmony export getChallengePractice */ +/* unused harmony export updateChallengesNew */ +/* unused harmony export getQuestionList */ +/* unused harmony export updateChallenges */ +/* unused harmony export deleteChallengesNew */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return getChallengesEdit; }); +/* unused harmony export getChallengesAnswer */ +/* unused harmony export updateChallengesAnswer */ +/* unused harmony export addChallengesQuestion */ +/* unused harmony export updateChallengesQuestion */ +/* unused harmony export deleteChallengesQuestion */ +/* unused harmony export upChallengesQuestion */ +/* unused harmony export downChallengesQuestion */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return getEditChallengesQuestion; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return deleteGitFile; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "V", function() { return moveGitFile; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return getRepository; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return getSecretRepository; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return addRepositoryFile; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return getRepositoryCommit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return getFileContent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gb", function() { return updateRepositoryFile; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jb", function() { return uploadGitFolder; }); +/* unused harmony export resetMyGame */ +/* unused harmony export getInfoWithTPM */ +/* unused harmony export getTimeInfoWithTPM */ +/* unused harmony export resetWithTPM */ +/* unused harmony export saveWithTPM */ +/* unused harmony export activeWithTPM */ +/* unused harmony export getForkList */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "db", function() { return updateCollaboratorEditable; }); +/* unused harmony export setSecretDir */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return getEnvironmentData; }); +/* unused harmony export getEnvironmentDetail */ +/* unused harmony export createRepository */ +/* unused harmony export createSecretRepository */ +/* unused harmony export existExercise */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return getMirrorApplies; }); +/* unused harmony export mirrorAppliesPublish */ +/* unused harmony export mirrorAppliesOpenVnc */ +/* unused harmony export mirrorAppliesOpenWebssh */ +/* unused harmony export mirrorAppliesSaveImage */ +/* unused harmony export mirrorAppliesDeleteImage */ +/* unused harmony export mirrorAppliesExtendVnc */ +/* unused harmony export mirrorAppliesResetVncLink */ +/* unused harmony export getTaskPass */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return getInfoWithJupyterLab; }); +/* unused harmony export updateJupyterLabSetting */ +/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw"); +/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */ "9og8"); +/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/fetch */ "ErOA"); + + +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } + +//实训首页列表 +function getShixunsList(_x) { + return _getShixunsList.apply(this, arguments); +} +// 获取实训首页菜单 +function _getShixunsList() { + _getShixunsList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) { + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/shixuns.json', { + method: 'Get', + params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context.stop(); + } + }, _callee); + })); + return _getShixunsList.apply(this, arguments); +} +function getShixunsMenus(_x2) { + return _getShixunsMenus.apply(this, arguments); +} +//获取实训详情 +function _getShixunsMenus() { + _getShixunsMenus = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) { + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/disciplines.json', { + method: 'Get', + params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ + source: "shixun" + }, params || {}) + })); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return _getShixunsMenus.apply(this, arguments); +} +function getShixunsDetail(_x3) { + return _getShixunsDetail.apply(this, arguments); +} +// 获取右侧数据 +function _getShixunsDetail() { + _getShixunsDetail = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) { + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + return _context3.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, ".json"), { + method: 'Get' + })); + case 1: + case "end": + return _context3.stop(); + } + }, _callee3); + })); + return _getShixunsDetail.apply(this, arguments); +} +function getRightData(_x4) { + return _getRightData.apply(this, arguments); +} +// 获取挑战数据 +function _getRightData() { + _getRightData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) { + return _regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + return _context4.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/show_right.json"), { + method: 'Get' + })); + case 1: + case "end": + return _context4.stop(); + } + }, _callee4); + })); + return _getRightData.apply(this, arguments); +} +function getChallengesData(_x5) { + return _getChallengesData.apply(this, arguments); +} +function _getChallengesData() { + _getChallengesData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) { + return _regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + return _context5.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges.json"), { + method: 'Get' + })); + case 1: + case "end": + return _context5.stop(); + } + }, _callee5); + })); + return _getChallengesData.apply(this, arguments); +} +function execJupyter(_x6) { + return _execJupyter.apply(this, arguments); +} +function _execJupyter() { + _execJupyter = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) { + return _regeneratorRuntime().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + return _context6.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/jupyter_exec.json").concat(params.reset ? "?reset=".concat(params.reset) : ''), { + method: 'Get', + params: params + })); + case 1: + case "end": + return _context6.stop(); + } + }, _callee6); + })); + return _execJupyter.apply(this, arguments); +} +function execShixun(_x7) { + return _execShixun.apply(this, arguments); +} +function _execShixun() { + _execShixun = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) { + return _regeneratorRuntime().wrap(function _callee7$(_context7) { + while (1) switch (_context7.prev = _context7.next) { + case 0: + return _context7.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/shixun_exec.json").concat(params.reset ? "?reset=".concat(params.reset) : ''), { + method: 'Get', + params: params + })); + case 1: + case "end": + return _context7.stop(); + } + }, _callee7); + })); + return _execShixun.apply(this, arguments); +} +function openChallenge(_x8) { + return _openChallenge.apply(this, arguments); +} +function _openChallenge() { + _openChallenge = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) { + return _regeneratorRuntime().wrap(function _callee8$(_context8) { + while (1) switch (_context8.prev = _context8.next) { + case 0: + return _context8.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(params.url, { + method: 'Get' + })); + case 1: + case "end": + return _context8.stop(); + } + }, _callee8); + })); + return _openChallenge.apply(this, arguments); +} +function challengeMoveUp(_x9) { + return _challengeMoveUp.apply(this, arguments); +} +function _challengeMoveUp() { + _challengeMoveUp = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params) { + return _regeneratorRuntime().wrap(function _callee9$(_context9) { + while (1) switch (_context9.prev = _context9.next) { + case 0: + return _context9.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.shixun_identifier, "/challenges/").concat(params.challenge_id, "/index_up.json"), { + method: 'Get' + })); + case 1: + case "end": + return _context9.stop(); + } + }, _callee9); + })); + return _challengeMoveUp.apply(this, arguments); +} +function challengeMoveDown(_x10) { + return _challengeMoveDown.apply(this, arguments); +} +function _challengeMoveDown() { + _challengeMoveDown = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) { + return _regeneratorRuntime().wrap(function _callee10$(_context10) { + while (1) switch (_context10.prev = _context10.next) { + case 0: + return _context10.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.shixun_identifier, "/challenges/").concat(params.challenge_id, "/index_down.json"), { + method: 'Get' + })); + case 1: + case "end": + return _context10.stop(); + } + }, _callee10); + })); + return _challengeMoveDown.apply(this, arguments); +} +function cancelCollect(_x11) { + return _cancelCollect.apply(this, arguments); +} +function _cancelCollect() { + _cancelCollect = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(params) { + return _regeneratorRuntime().wrap(function _callee11$(_context11) { + while (1) switch (_context11.prev = _context11.next) { + case 0: + return _context11.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/collections/cancel.json", { + method: 'Delete', + body: { + container_id: params.container_id, + container_type: params.container_type + } + })); + case 1: + case "end": + return _context11.stop(); + } + }, _callee11); + })); + return _cancelCollect.apply(this, arguments); +} +function collect(_x12) { + return _collect.apply(this, arguments); +} +function _collect() { + _collect = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(params) { + return _regeneratorRuntime().wrap(function _callee12$(_context12) { + while (1) switch (_context12.prev = _context12.next) { + case 0: + return _context12.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/collections.json", { + method: 'Post', + body: { + container_id: params.container_id, + container_type: params.container_type + } + })); + case 1: + case "end": + return _context12.stop(); + } + }, _callee12); + })); + return _collect.apply(this, arguments); +} +function searchUserCourses(_x13) { + return _searchUserCourses.apply(this, arguments); +} +function _searchUserCourses() { + _searchUserCourses = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(params) { + var _ref, id; + return _regeneratorRuntime().wrap(function _callee13$(_context13) { + while (1) switch (_context13.prev = _context13.next) { + case 0: + _ref = params || {}, id = _ref.id; + return _context13.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(id, "/search_user_courses.json"), { + method: 'Get', + params: params + })); + case 2: + case "end": + return _context13.stop(); + } + }, _callee13); + })); + return _searchUserCourses.apply(this, arguments); +} +function sendToCourse(_x14) { + return _sendToCourse.apply(this, arguments); +} +function _sendToCourse() { + _sendToCourse = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(params) { + var _ref2, id, course_id; + return _regeneratorRuntime().wrap(function _callee14$(_context14) { + while (1) switch (_context14.prev = _context14.next) { + case 0: + _ref2 = params || {}, id = _ref2.id, course_id = _ref2.course_id; + return _context14.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(id, "/send_to_course.json"), { + method: 'Post', + body: { + course_id: course_id + } + })); + case 2: + case "end": + return _context14.stop(); + } + }, _callee14); + })); + return _sendToCourse.apply(this, arguments); +} +function cancelRelease(_x15) { + return _cancelRelease.apply(this, arguments); +} +function _cancelRelease() { + _cancelRelease = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(params) { + return _regeneratorRuntime().wrap(function _callee15$(_context15) { + while (1) switch (_context15.prev = _context15.next) { + case 0: + return _context15.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/cancel_publish.json"), { + method: 'Get' + })); + case 1: + case "end": + return _context15.stop(); + } + }, _callee15); + })); + return _cancelRelease.apply(this, arguments); +} +function cancelPublic(_x16) { + return _cancelPublic.apply(this, arguments); +} +function _cancelPublic() { + _cancelPublic = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(params) { + return _regeneratorRuntime().wrap(function _callee16$(_context16) { + while (1) switch (_context16.prev = _context16.next) { + case 0: + return _context16.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/cancel_apply_public.json"), { + method: 'Get' + })); + case 1: + case "end": + return _context16.stop(); + } + }, _callee16); + })); + return _cancelPublic.apply(this, arguments); +} +function applyPublic(_x17) { + return _applyPublic.apply(this, arguments); +} +function _applyPublic() { + _applyPublic = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(params) { + return _regeneratorRuntime().wrap(function _callee17$(_context17) { + while (1) switch (_context17.prev = _context17.next) { + case 0: + return _context17.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/apply_public.json"), { + method: 'post', + body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context17.stop(); + } + }, _callee17); + })); + return _applyPublic.apply(this, arguments); +} +function release(_x18) { + return _release.apply(this, arguments); +} +function _release() { + _release = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(params) { + return _regeneratorRuntime().wrap(function _callee18$(_context18) { + while (1) switch (_context18.prev = _context18.next) { + case 0: + return _context18.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/publish.json"), { + method: 'Get' + })); + case 1: + case "end": + return _context18.stop(); + } + }, _callee18); + })); + return _release.apply(this, arguments); +} +function getNewShixunsData(_x19) { + return _getNewShixunsData.apply(this, arguments); +} +function _getNewShixunsData() { + _getNewShixunsData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(params) { + return _regeneratorRuntime().wrap(function _callee19$(_context19) { + while (1) switch (_context19.prev = _context19.next) { + case 0: + return _context19.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/jupyter_new.json", { + method: 'Get' + })); + case 1: + case "end": + return _context19.stop(); + } + }, _callee19); + })); + return _getNewShixunsData.apply(this, arguments); +} +function deleteAttachment(_x20) { + return _deleteAttachment.apply(this, arguments); +} +function _deleteAttachment() { + _deleteAttachment = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(params) { + return _regeneratorRuntime().wrap(function _callee20$(_context20) { + while (1) switch (_context20.prev = _context20.next) { + case 0: + return _context20.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/attachments/".concat(params.id, ".json"), { + method: 'delete' + })); + case 1: + case "end": + return _context20.stop(); + } + }, _callee20); + })); + return _deleteAttachment.apply(this, arguments); +} +function applyShixunMirror(_x21) { + return _applyShixunMirror.apply(this, arguments); +} +function _applyShixunMirror() { + _applyShixunMirror = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(params) { + return _regeneratorRuntime().wrap(function _callee21$(_context21) { + while (1) switch (_context21.prev = _context21.next) { + case 0: + return _context21.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/apply_shixun_mirror.json", { + method: 'post', + body: params + })); + case 1: + case "end": + return _context21.stop(); + } + }, _callee21); + })); + return _applyShixunMirror.apply(this, arguments); +} +function submitShixuns(_x22) { + return _submitShixuns.apply(this, arguments); +} +function _submitShixuns() { + _submitShixuns = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(params) { + return _regeneratorRuntime().wrap(function _callee22$(_context22) { + while (1) switch (_context22.prev = _context22.next) { + case 0: + return _context22.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns.json", { + method: 'post', + body: params + })); + case 1: + case "end": + return _context22.stop(); + } + }, _callee22); + })); + return _submitShixuns.apply(this, arguments); +} +function getShixunsJupyterLab(_x23) { + return _getShixunsJupyterLab.apply(this, arguments); +} +function _getShixunsJupyterLab() { + _getShixunsJupyterLab = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23(params) { + return _regeneratorRuntime().wrap(function _callee23$(_context23) { + while (1) switch (_context23.prev = _context23.next) { + case 0: + return _context23.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/jupyter_lab_new.json", { + method: 'get', + params: params + })); + case 1: + case "end": + return _context23.stop(); + } + }, _callee23); + })); + return _getShixunsJupyterLab.apply(this, arguments); +} +function getAuditSituationData(_x24) { + return _getAuditSituationData.apply(this, arguments); +} +function _getAuditSituationData() { + _getAuditSituationData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(params) { + return _regeneratorRuntime().wrap(function _callee24$(_context24) { + while (1) switch (_context24.prev = _context24.next) { + case 0: + return _context24.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/review_newest_record.json"), { + method: 'Get' + })); + case 1: + case "end": + return _context24.stop(); + } + }, _callee24); + })); + return _getAuditSituationData.apply(this, arguments); +} +function updateAuditSituation(_x25) { + return _updateAuditSituation.apply(this, arguments); +} +function _updateAuditSituation() { + _updateAuditSituation = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25(params) { + return _regeneratorRuntime().wrap(function _callee25$(_context25) { + while (1) switch (_context25.prev = _context25.next) { + case 0: + return _context25.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/review_shixun.json"), { + method: 'post', + body: params + })); + case 1: + case "end": + return _context25.stop(); + } + }, _callee25); + })); + return _updateAuditSituation.apply(this, arguments); +} +function getCollaboratorsData(_x26) { + return _getCollaboratorsData.apply(this, arguments); +} +function _getCollaboratorsData() { + _getCollaboratorsData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26(params) { + return _regeneratorRuntime().wrap(function _callee26$(_context26) { + while (1) switch (_context26.prev = _context26.next) { + case 0: + return _context26.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/collaborators.json"), { + method: 'Get', + params: params + })); + case 1: + case "end": + return _context26.stop(); + } + }, _callee26); + })); + return _getCollaboratorsData.apply(this, arguments); +} +function addCollaborator(_x27) { + return _addCollaborator.apply(this, arguments); +} +function _addCollaborator() { + _addCollaborator = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(params) { + return _regeneratorRuntime().wrap(function _callee27$(_context27) { + while (1) switch (_context27.prev = _context27.next) { + case 0: + return _context27.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/shixun_members_added.json"), { + method: 'post', + body: params + })); + case 1: + case "end": + return _context27.stop(); + } + }, _callee27); + })); + return _addCollaborator.apply(this, arguments); +} +function addTeachGroupMember(_x28) { + return _addTeachGroupMember.apply(this, arguments); +} +function _addTeachGroupMember() { + _addTeachGroupMember = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28(params) { + return _regeneratorRuntime().wrap(function _callee28$(_context28) { + while (1) switch (_context28.prev = _context28.next) { + case 0: + return _context28.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.identifier, "/add_members_group.json"), { + method: 'post', + body: params + })); + case 1: + case "end": + return _context28.stop(); + } + }, _callee28); + })); + return _addTeachGroupMember.apply(this, arguments); +} +function getChangeManager(_x29) { + return _getChangeManager.apply(this, arguments); +} +function _getChangeManager() { + _getChangeManager = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29(params) { + return _regeneratorRuntime().wrap(function _callee29$(_context29) { + while (1) switch (_context29.prev = _context29.next) { + case 0: + return _context29.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/change_manager.json"), { + method: 'Get', + params: params + })); + case 1: + case "end": + return _context29.stop(); + } + }, _callee29); + })); + return _getChangeManager.apply(this, arguments); +} +function changeManager(_x30) { + return _changeManager.apply(this, arguments); +} +function _changeManager() { + _changeManager = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30(params) { + return _regeneratorRuntime().wrap(function _callee30$(_context30) { + while (1) switch (_context30.prev = _context30.next) { + case 0: + return _context30.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/change_manager.json"), { + method: 'post', + body: params + })); + case 1: + case "end": + return _context30.stop(); + } + }, _callee30); + })); + return _changeManager.apply(this, arguments); +} +function deleteCollaborators(_x31) { + return _deleteCollaborators.apply(this, arguments); +} +function _deleteCollaborators() { + _deleteCollaborators = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31(params) { + return _regeneratorRuntime().wrap(function _callee31$(_context31) { + while (1) switch (_context31.prev = _context31.next) { + case 0: + return _context31.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/collaborators_delete.json?user_id=").concat(params.userId), { + method: 'delete' + })); + case 1: + case "end": + return _context31.stop(); + } + }, _callee31); + })); + return _deleteCollaborators.apply(this, arguments); +} +function getRankingList(_x32) { + return _getRankingList.apply(this, arguments); +} +function _getRankingList() { + _getRankingList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32(params) { + return _regeneratorRuntime().wrap(function _callee32$(_context32) { + while (1) switch (_context32.prev = _context32.next) { + case 0: + return _context32.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/ranking_list.json"), { + method: 'Get' + })); + case 1: + case "end": + return _context32.stop(); + } + }, _callee32); + })); + return _getRankingList.apply(this, arguments); +} +function getSettingsData(_x33) { + return _getSettingsData.apply(this, arguments); +} +function _getSettingsData() { + _getSettingsData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33(params) { + return _regeneratorRuntime().wrap(function _callee33$(_context33) { + while (1) switch (_context33.prev = _context33.next) { + case 0: + return _context33.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/settings.json"), { + method: 'Get' + })); + case 1: + case "end": + return _context33.stop(); + } + }, _callee33); + })); + return _getSettingsData.apply(this, arguments); +} +function getMirrorScript(_x34) { + return _getMirrorScript.apply(this, arguments); +} +function _getMirrorScript() { + _getMirrorScript = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee34(params) { + return _regeneratorRuntime().wrap(function _callee34$(_context34) { + while (1) switch (_context34.prev = _context34.next) { + case 0: + return _context34.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/get_mirror_script.json?mirror_id=".concat(params.mirror_id), { + method: 'Get' + })); + case 1: + case "end": + return _context34.stop(); + } + }, _callee34); + })); + return _getMirrorScript.apply(this, arguments); +} +function getScriptContent(_x35) { + return _getScriptContent.apply(this, arguments); +} +function _getScriptContent() { + _getScriptContent = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee35(params) { + return _regeneratorRuntime().wrap(function _callee35$(_context35) { + while (1) switch (_context35.prev = _context35.next) { + case 0: + return _context35.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/get_script_contents.json"), { + method: 'Get', + params: params + })); + case 1: + case "end": + return _context35.stop(); + } + }, _callee35); + })); + return _getScriptContent.apply(this, arguments); +} +function getCustomScript(_x36) { + return _getCustomScript.apply(this, arguments); +} +function _getCustomScript() { + _getCustomScript = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee36(params) { + return _regeneratorRuntime().wrap(function _callee36$(_context36) { + while (1) switch (_context36.prev = _context36.next) { + case 0: + return _context36.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/get_custom_script.json"), { + method: 'Get', + params: params + })); + case 1: + case "end": + return _context36.stop(); + } + }, _callee36); + })); + return _getCustomScript.apply(this, arguments); +} +function updateSettingBasicInfo(_x37) { + return _updateSettingBasicInfo.apply(this, arguments); +} +function _updateSettingBasicInfo() { + _updateSettingBasicInfo = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee37(params) { + return _regeneratorRuntime().wrap(function _callee37$(_context37) { + while (1) switch (_context37.prev = _context37.next) { + case 0: + return _context37.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/update_for_jupyter.json"), { + method: 'put', + body: params + })); + case 1: + case "end": + return _context37.stop(); + } + }, _callee37); + })); + return _updateSettingBasicInfo.apply(this, arguments); +} +function getShixunQuote(_x38) { + return _getShixunQuote.apply(this, arguments); +} +function _getShixunQuote() { + _getShixunQuote = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee38(params) { + return _regeneratorRuntime().wrap(function _callee38$(_context38) { + while (1) switch (_context38.prev = _context38.next) { + case 0: + return _context38.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/shixun_quotes.json"), { + method: 'Get' + })); + case 1: + case "end": + return _context38.stop(); + } + }, _callee38); + })); + return _getShixunQuote.apply(this, arguments); +} +function deleteShixun(_x39) { + return _deleteShixun.apply(this, arguments); +} +function _deleteShixun() { + _deleteShixun = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee39(params) { + return _regeneratorRuntime().wrap(function _callee39$(_context39) { + while (1) switch (_context39.prev = _context39.next) { + case 0: + return _context39.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, ".json"), { + method: 'delete' + })); + case 1: + case "end": + return _context39.stop(); + } + }, _callee39); + })); + return _deleteShixun.apply(this, arguments); +} +function permanentClose(_x40) { + return _permanentClose.apply(this, arguments); +} +function _permanentClose() { + _permanentClose = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee40(params) { + return _regeneratorRuntime().wrap(function _callee40$(_context40) { + while (1) switch (_context40.prev = _context40.next) { + case 0: + return _context40.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/close.json"), { + method: 'post', + body: params + })); + case 1: + case "end": + return _context40.stop(); + } + }, _callee40); + })); + return _permanentClose.apply(this, arguments); +} +function getDepartments(_x41) { + return _getDepartments.apply(this, arguments); +} +function _getDepartments() { + _getDepartments = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee41(params) { + return _regeneratorRuntime().wrap(function _callee41$(_context41) { + while (1) switch (_context41.prev = _context41.next) { + case 0: + return _context41.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/departments.json", { + method: 'Get', + params: params + })); + case 1: + case "end": + return _context41.stop(); + } + }, _callee41); + })); + return _getDepartments.apply(this, arguments); +} +function updatePermissionSetting(_x42) { + return _updatePermissionSetting.apply(this, arguments); +} +function _updatePermissionSetting() { + _updatePermissionSetting = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee42(params) { + return _regeneratorRuntime().wrap(function _callee42$(_context42) { + while (1) switch (_context42.prev = _context42.next) { + case 0: + return _context42.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/update_permission_setting.json"), { + method: 'post', + body: params + })); + case 1: + case "end": + return _context42.stop(); + } + }, _callee42); + })); + return _updatePermissionSetting.apply(this, arguments); +} +function updateLearnSetting(_x43) { + return _updateLearnSetting.apply(this, arguments); +} +function _updateLearnSetting() { + _updateLearnSetting = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee43(params) { + return _regeneratorRuntime().wrap(function _callee43$(_context43) { + while (1) switch (_context43.prev = _context43.next) { + case 0: + return _context43.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/update_learn_setting.json"), { + method: 'post', + body: params + })); + case 1: + case "end": + return _context43.stop(); + } + }, _callee43); + })); + return _updateLearnSetting.apply(this, arguments); +} +function updateSetting(_x44) { + return _updateSetting.apply(this, arguments); +} +function _updateSetting() { + _updateSetting = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee44(params) { + return _regeneratorRuntime().wrap(function _callee44$(_context44) { + while (1) switch (_context44.prev = _context44.next) { + case 0: + return _context44.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/update_setting"), { + method: 'post', + body: params + })); + case 1: + case "end": + return _context44.stop(); + } + }, _callee44); + })); + return _updateSetting.apply(this, arguments); +} +function getSetData(_x45) { + return _getSetData.apply(this, arguments); +} +function _getSetData() { + _getSetData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee45(params) { + return _regeneratorRuntime().wrap(function _callee45$(_context45) { + while (1) switch (_context45.prev = _context45.next) { + case 0: + return _context45.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/get_data_sets.json"), { + method: 'Get', + params: params + })); + case 1: + case "end": + return _context45.stop(); + } + }, _callee45); + })); + return _getSetData.apply(this, arguments); +} +function deleteDataSet(_x46) { + return _deleteDataSet.apply(this, arguments); +} +function _deleteDataSet() { + _deleteDataSet = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee46(params) { + return _regeneratorRuntime().wrap(function _callee46$(_context46) { + while (1) switch (_context46.prev = _context46.next) { + case 0: + return _context46.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/destroy_data_sets.json"), { + method: 'Delete', + body: { + id: params.deleteId + } + })); + case 1: + case "end": + return _context46.stop(); + } + }, _callee46); + })); + return _deleteDataSet.apply(this, arguments); +} +function getChallengesNew(_x47) { + return _getChallengesNew.apply(this, arguments); +} +function _getChallengesNew() { + _getChallengesNew = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee47(params) { + return _regeneratorRuntime().wrap(function _callee47$(_context47) { + while (1) switch (_context47.prev = _context47.next) { + case 0: + return _context47.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/new.json"), { + method: 'get' + })); + case 1: + case "end": + return _context47.stop(); + } + }, _callee47); + })); + return _getChallengesNew.apply(this, arguments); +} +function addChallengesNew(_x48) { + return _addChallengesNew.apply(this, arguments); +} +function _addChallengesNew() { + _addChallengesNew = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee48(params) { + return _regeneratorRuntime().wrap(function _callee48$(_context48) { + while (1) switch (_context48.prev = _context48.next) { + case 0: + return _context48.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.identifier, "/challenges.json"), { + method: 'post', + body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context48.stop(); + } + }, _callee48); + })); + return _addChallengesNew.apply(this, arguments); +} +function getChallengePractice(_x49) { + return _getChallengePractice.apply(this, arguments); +} +function _getChallengePractice() { + _getChallengePractice = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee49(params) { + return _regeneratorRuntime().wrap(function _callee49$(_context49) { + while (1) switch (_context49.prev = _context49.next) { + case 0: + return _context49.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengeId, "/edit.json?tab=").concat(params.tab), { + method: 'get' + })); + case 1: + case "end": + return _context49.stop(); + } + }, _callee49); + })); + return _getChallengePractice.apply(this, arguments); +} +function updateChallengesNew(_x50) { + return _updateChallengesNew.apply(this, arguments); +} +function _updateChallengesNew() { + _updateChallengesNew = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee50(params) { + return _regeneratorRuntime().wrap(function _callee50$(_context50) { + while (1) switch (_context50.prev = _context50.next) { + case 0: + return _context50.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, ".json"), { + method: 'put', + body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context50.stop(); + } + }, _callee50); + })); + return _updateChallengesNew.apply(this, arguments); +} +function getQuestionList(_x51) { + return _getQuestionList.apply(this, arguments); +} +function _getQuestionList() { + _getQuestionList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee51(params) { + return _regeneratorRuntime().wrap(function _callee51$(_context51) { + while (1) switch (_context51.prev = _context51.next) { + case 0: + return _context51.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, "/choose_questions.json"), { + method: 'get' + })); + case 1: + case "end": + return _context51.stop(); + } + }, _callee51); + })); + return _getQuestionList.apply(this, arguments); +} +function updateChallenges(_x52) { + return _updateChallenges.apply(this, arguments); +} +function _updateChallenges() { + _updateChallenges = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee52(params) { + return _regeneratorRuntime().wrap(function _callee52$(_context52) { + while (1) switch (_context52.prev = _context52.next) { + case 0: + return _context52.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/move_position.json"), { + method: 'post', + body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context52.stop(); + } + }, _callee52); + })); + return _updateChallenges.apply(this, arguments); +} +function deleteChallengesNew(_x53) { + return _deleteChallengesNew.apply(this, arguments); +} +function _deleteChallengesNew() { + _deleteChallengesNew = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee53(params) { + return _regeneratorRuntime().wrap(function _callee53$(_context53) { + while (1) switch (_context53.prev = _context53.next) { + case 0: + return _context53.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, ".json"), { + method: 'delete', + body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context53.stop(); + } + }, _callee53); + })); + return _deleteChallengesNew.apply(this, arguments); +} +function getChallengesEdit(_x54) { + return _getChallengesEdit.apply(this, arguments); +} +function _getChallengesEdit() { + _getChallengesEdit = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee54(params) { + return _regeneratorRuntime().wrap(function _callee54$(_context54) { + while (1) switch (_context54.prev = _context54.next) { + case 0: + return _context54.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, "/edit.json"), { + method: 'get', + params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context54.stop(); + } + }, _callee54); + })); + return _getChallengesEdit.apply(this, arguments); +} +function getChallengesAnswer(_x55) { + return _getChallengesAnswer.apply(this, arguments); +} +function _getChallengesAnswer() { + _getChallengesAnswer = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee55(params) { + return _regeneratorRuntime().wrap(function _callee55$(_context55) { + while (1) switch (_context55.prev = _context55.next) { + case 0: + return _context55.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengeId, "/answer.json"), { + method: 'get', + params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context55.stop(); + } + }, _callee55); + })); + return _getChallengesAnswer.apply(this, arguments); +} +function updateChallengesAnswer(_x56) { + return _updateChallengesAnswer.apply(this, arguments); +} +function _updateChallengesAnswer() { + _updateChallengesAnswer = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee56(params) { + return _regeneratorRuntime().wrap(function _callee56$(_context56) { + while (1) switch (_context56.prev = _context56.next) { + case 0: + return _context56.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengeId, "/crud_answer.json"), { + method: 'post', + body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context56.stop(); + } + }, _callee56); + })); + return _updateChallengesAnswer.apply(this, arguments); +} +function addChallengesQuestion(_x57) { + return _addChallengesQuestion.apply(this, arguments); +} +function _addChallengesQuestion() { + _addChallengesQuestion = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee57(params) { + return _regeneratorRuntime().wrap(function _callee57$(_context57) { + while (1) switch (_context57.prev = _context57.next) { + case 0: + return _context57.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, "/create_choose_question.json"), { + method: 'post', + body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context57.stop(); + } + }, _callee57); + })); + return _addChallengesQuestion.apply(this, arguments); +} +function updateChallengesQuestion(_x58) { + return _updateChallengesQuestion.apply(this, arguments); +} +function _updateChallengesQuestion() { + _updateChallengesQuestion = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee58(params) { + return _regeneratorRuntime().wrap(function _callee58$(_context58) { + while (1) switch (_context58.prev = _context58.next) { + case 0: + return _context58.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, "/update_choose_question.json?choose_id=").concat(params.questionId), { + method: 'post', + body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context58.stop(); + } + }, _callee58); + })); + return _updateChallengesQuestion.apply(this, arguments); +} +function deleteChallengesQuestion(_x59) { + return _deleteChallengesQuestion.apply(this, arguments); +} +function _deleteChallengesQuestion() { + _deleteChallengesQuestion = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee59(params) { + return _regeneratorRuntime().wrap(function _callee59$(_context59) { + while (1) switch (_context59.prev = _context59.next) { + case 0: + return _context59.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, "/destroy_challenge_choose.json"), { + method: 'Delete', + body: { + choose_id: params.questionId + } + })); + case 1: + case "end": + return _context59.stop(); + } + }, _callee59); + })); + return _deleteChallengesQuestion.apply(this, arguments); +} +function upChallengesQuestion(_x60) { + return _upChallengesQuestion.apply(this, arguments); +} +function _upChallengesQuestion() { + _upChallengesQuestion = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee60(params) { + return _regeneratorRuntime().wrap(function _callee60$(_context60) { + while (1) switch (_context60.prev = _context60.next) { + case 0: + return _context60.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, "/choose_question_up_position.json"), { + method: 'post', + body: { + challenge_choose_id: params.questionId + } + })); + case 1: + case "end": + return _context60.stop(); + } + }, _callee60); + })); + return _upChallengesQuestion.apply(this, arguments); +} +function downChallengesQuestion(_x61) { + return _downChallengesQuestion.apply(this, arguments); +} +function _downChallengesQuestion() { + _downChallengesQuestion = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee61(params) { + return _regeneratorRuntime().wrap(function _callee61$(_context61) { + while (1) switch (_context61.prev = _context61.next) { + case 0: + return _context61.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, "/choose_question_down_position.json"), { + method: 'post', + body: { + challenge_choose_id: params.questionId + } + })); + case 1: + case "end": + return _context61.stop(); + } + }, _callee61); + })); + return _downChallengesQuestion.apply(this, arguments); +} +function getEditChallengesQuestion(_x62) { + return _getEditChallengesQuestion.apply(this, arguments); +} +function _getEditChallengesQuestion() { + _getEditChallengesQuestion = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee62(params) { + return _regeneratorRuntime().wrap(function _callee62$(_context62) { + while (1) switch (_context62.prev = _context62.next) { + case 0: + return _context62.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, "/edit_choose_question.json?choose_id=").concat(params.questionId), { + method: 'get', + params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context62.stop(); + } + }, _callee62); + })); + return _getEditChallengesQuestion.apply(this, arguments); +} +function deleteGitFile(_x63) { + return _deleteGitFile.apply(this, arguments); +} +function _deleteGitFile() { + _deleteGitFile = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee63(params) { + return _regeneratorRuntime().wrap(function _callee63$(_context63) { + while (1) switch (_context63.prev = _context63.next) { + case 0: + return _context63.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/delete_git_file.json"), { + method: 'Delete', + body: params + })); + case 1: + case "end": + return _context63.stop(); + } + }, _callee63); + })); + return _deleteGitFile.apply(this, arguments); +} +function moveGitFile(_x64) { + return _moveGitFile.apply(this, arguments); +} +function _moveGitFile() { + _moveGitFile = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee64(params) { + return _regeneratorRuntime().wrap(function _callee64$(_context64) { + while (1) switch (_context64.prev = _context64.next) { + case 0: + return _context64.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/mv_file.json"), { + method: 'post', + body: params + })); + case 1: + case "end": + return _context64.stop(); + } + }, _callee64); + })); + return _moveGitFile.apply(this, arguments); +} +function getRepository(_x65) { + return _getRepository.apply(this, arguments); +} +function _getRepository() { + _getRepository = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee65(params) { + return _regeneratorRuntime().wrap(function _callee65$(_context65) { + while (1) switch (_context65.prev = _context65.next) { + case 0: + return _context65.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/repository.json"), { + method: 'post', + body: params + })); + case 1: + case "end": + return _context65.stop(); + } + }, _callee65); + })); + return _getRepository.apply(this, arguments); +} +function getSecretRepository(_x66) { + return _getSecretRepository.apply(this, arguments); +} +function _getSecretRepository() { + _getSecretRepository = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee66(params) { + return _regeneratorRuntime().wrap(function _callee66$(_context66) { + while (1) switch (_context66.prev = _context66.next) { + case 0: + return _context66.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/secret_repository.json"), { + method: 'post', + body: params + })); + case 1: + case "end": + return _context66.stop(); + } + }, _callee66); + })); + return _getSecretRepository.apply(this, arguments); +} +function addRepositoryFile(_x67) { + return _addRepositoryFile.apply(this, arguments); +} +function _addRepositoryFile() { + _addRepositoryFile = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee67(params) { + return _regeneratorRuntime().wrap(function _callee67$(_context67) { + while (1) switch (_context67.prev = _context67.next) { + case 0: + return _context67.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/add_file.json"), { + method: 'post', + body: params + })); + case 1: + case "end": + return _context67.stop(); + } + }, _callee67); + })); + return _addRepositoryFile.apply(this, arguments); +} +function getRepositoryCommit(_x68) { + return _getRepositoryCommit.apply(this, arguments); +} +function _getRepositoryCommit() { + _getRepositoryCommit = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee68(params) { + return _regeneratorRuntime().wrap(function _callee68$(_context68) { + while (1) switch (_context68.prev = _context68.next) { + case 0: + return _context68.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/commits.json"), { + method: 'post', + body: params + })); + case 1: + case "end": + return _context68.stop(); + } + }, _callee68); + })); + return _getRepositoryCommit.apply(this, arguments); +} +function getFileContent(_x69) { + return _getFileContent.apply(this, arguments); +} +function _getFileContent() { + _getFileContent = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee69(params) { + return _regeneratorRuntime().wrap(function _callee69$(_context69) { + while (1) switch (_context69.prev = _context69.next) { + case 0: + return _context69.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/file_content.json"), { + method: 'post', + body: params + })); + case 1: + case "end": + return _context69.stop(); + } + }, _callee69); + })); + return _getFileContent.apply(this, arguments); +} +function updateRepositoryFile(_x70) { + return _updateRepositoryFile.apply(this, arguments); +} +function _updateRepositoryFile() { + _updateRepositoryFile = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee70(params) { + return _regeneratorRuntime().wrap(function _callee70$(_context70) { + while (1) switch (_context70.prev = _context70.next) { + case 0: + return _context70.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/update_file.json"), { + method: 'post', + body: params + })); + case 1: + case "end": + return _context70.stop(); + } + }, _callee70); + })); + return _updateRepositoryFile.apply(this, arguments); +} +function uploadGitFolder(_x71) { + return _uploadGitFolder.apply(this, arguments); +} +function _uploadGitFolder() { + _uploadGitFolder = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee71(params) { + return _regeneratorRuntime().wrap(function _callee71$(_context71) { + while (1) switch (_context71.prev = _context71.next) { + case 0: + return _context71.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/upload_git_folder.json"), { + method: 'post', + body: { + path: params.path, + secret_repository: params.secret_repository + } + })); + case 1: + case "end": + return _context71.stop(); + } + }, _callee71); + })); + return _uploadGitFolder.apply(this, arguments); +} +function resetMyGame(_x72) { + return _resetMyGame.apply(this, arguments); +} +function _resetMyGame() { + _resetMyGame = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee72(params) { + return _regeneratorRuntime().wrap(function _callee72$(_context72) { + while (1) switch (_context72.prev = _context72.next) { + case 0: + return _context72.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/".concat(params.url), { + method: 'Get' + })); + case 1: + case "end": + return _context72.stop(); + } + }, _callee72); + })); + return _resetMyGame.apply(this, arguments); +} +function getInfoWithTPM(_x73) { + return _getInfoWithTPM.apply(this, arguments); +} +function _getInfoWithTPM() { + _getInfoWithTPM = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee73(params) { + return _regeneratorRuntime().wrap(function _callee73$(_context73) { + while (1) switch (_context73.prev = _context73.next) { + case 0: + return _context73.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/jupyters/get_info_with_tpm.json", { + method: 'Get', + params: params + })); + case 1: + case "end": + return _context73.stop(); + } + }, _callee73); + })); + return _getInfoWithTPM.apply(this, arguments); +} +function getTimeInfoWithTPM(_x74) { + return _getTimeInfoWithTPM.apply(this, arguments); +} +function _getTimeInfoWithTPM() { + _getTimeInfoWithTPM = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee74(params) { + return _regeneratorRuntime().wrap(function _callee74$(_context74) { + while (1) switch (_context74.prev = _context74.next) { + case 0: + return _context74.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/jupyters/timeinfo_with_tpm.json", { + method: 'Get', + params: params + })); + case 1: + case "end": + return _context74.stop(); + } + }, _callee74); + })); + return _getTimeInfoWithTPM.apply(this, arguments); +} +function resetWithTPM(_x75) { + return _resetWithTPM.apply(this, arguments); +} +function _resetWithTPM() { + _resetWithTPM = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee75(params) { + return _regeneratorRuntime().wrap(function _callee75$(_context75) { + while (1) switch (_context75.prev = _context75.next) { + case 0: + return _context75.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/jupyters/reset_with_tpm.json", { + method: 'Get', + params: params + })); + case 1: + case "end": + return _context75.stop(); + } + }, _callee75); + })); + return _resetWithTPM.apply(this, arguments); +} +function saveWithTPM(_x76) { + return _saveWithTPM.apply(this, arguments); +} +function _saveWithTPM() { + _saveWithTPM = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee76(params) { + return _regeneratorRuntime().wrap(function _callee76$(_context76) { + while (1) switch (_context76.prev = _context76.next) { + case 0: + return _context76.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/jupyters/save_with_tpm.json", { + method: 'Get', + params: params + })); + case 1: + case "end": + return _context76.stop(); + } + }, _callee76); + })); + return _saveWithTPM.apply(this, arguments); +} +function activeWithTPM(_x77) { + return _activeWithTPM.apply(this, arguments); +} +function _activeWithTPM() { + _activeWithTPM = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee77(params) { + return _regeneratorRuntime().wrap(function _callee77$(_context77) { + while (1) switch (_context77.prev = _context77.next) { + case 0: + return _context77.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/jupyters/active_with_tpm.json", { + method: 'Get', + params: params + })); + case 1: + case "end": + return _context77.stop(); + } + }, _callee77); + })); + return _activeWithTPM.apply(this, arguments); +} +function getForkList(_x78) { + return _getForkList.apply(this, arguments); +} +function _getForkList() { + _getForkList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee78(params) { + return _regeneratorRuntime().wrap(function _callee78$(_context78) { + while (1) switch (_context78.prev = _context78.next) { + case 0: + return _context78.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/fork_list.json"), { + method: 'Get', + params: params + })); + case 1: + case "end": + return _context78.stop(); + } + }, _callee78); + })); + return _getForkList.apply(this, arguments); +} +function updateCollaboratorEditable(_x79) { + return _updateCollaboratorEditable.apply(this, arguments); +} +function _updateCollaboratorEditable() { + _updateCollaboratorEditable = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee79(params) { + return _regeneratorRuntime().wrap(function _callee79$(_context79) { + while (1) switch (_context79.prev = _context79.next) { + case 0: + return _context79.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.identifier, "/change_editable.json"), { + method: 'put', + body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context79.stop(); + } + }, _callee79); + })); + return _updateCollaboratorEditable.apply(this, arguments); +} +function setSecretDir(_x80) { + return _setSecretDir.apply(this, arguments); +} +//获取环境数据 +function _setSecretDir() { + _setSecretDir = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee80(params) { + return _regeneratorRuntime().wrap(function _callee80$(_context80) { + while (1) switch (_context80.prev = _context80.next) { + case 0: + return _context80.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/set_secret_dir.json"), { + method: 'post', + body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context80.stop(); + } + }, _callee80); + })); + return _setSecretDir.apply(this, arguments); +} +function getEnvironmentData(_x81) { + return _getEnvironmentData.apply(this, arguments); +} +//环境的具体信息 +function _getEnvironmentData() { + _getEnvironmentData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee81(params) { + return _regeneratorRuntime().wrap(function _callee81$(_context81) { + while (1) switch (_context81.prev = _context81.next) { + case 0: + return _context81.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/new.json", { + method: 'Get', + params: params + })); + case 1: + case "end": + return _context81.stop(); + } + }, _callee81); + })); + return _getEnvironmentData.apply(this, arguments); +} +function getEnvironmentDetail(_x82) { + return _getEnvironmentDetail.apply(this, arguments); +} +function _getEnvironmentDetail() { + _getEnvironmentDetail = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee82(params) { + return _regeneratorRuntime().wrap(function _callee82$(_context82) { + while (1) switch (_context82.prev = _context82.next) { + case 0: + return _context82.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/environment_info", { + method: 'Get', + params: params + })); + case 1: + case "end": + return _context82.stop(); + } + }, _callee82); + })); + return _getEnvironmentDetail.apply(this, arguments); +} +function createRepository(_x83) { + return _createRepository.apply(this, arguments); +} +function _createRepository() { + _createRepository = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee83(params) { + return _regeneratorRuntime().wrap(function _callee83$(_context83) { + while (1) switch (_context83.prev = _context83.next) { + case 0: + return _context83.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/init_repository.json"), { + method: 'post', + body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context83.stop(); + } + }, _callee83); + })); + return _createRepository.apply(this, arguments); +} +function createSecretRepository(_x84) { + return _createSecretRepository.apply(this, arguments); +} +// 检查实训是否在考试中 +function _createSecretRepository() { + _createSecretRepository = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee84(params) { + return _regeneratorRuntime().wrap(function _callee84$(_context84) { + while (1) switch (_context84.prev = _context84.next) { + case 0: + return _context84.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/update_secret_repository.json"), { + method: 'post', + body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context84.stop(); + } + }, _callee84); + })); + return _createSecretRepository.apply(this, arguments); +} +function existExercise(_x85) { + return _existExercise.apply(this, arguments); +} +function _existExercise() { + _existExercise = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee85(params) { + return _regeneratorRuntime().wrap(function _callee85$(_context85) { + while (1) switch (_context85.prev = _context85.next) { + case 0: + return _context85.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/exist_exercise.json"), { + method: 'get', + params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context85.stop(); + } + }, _callee85); + })); + return _existExercise.apply(this, arguments); +} +function getMirrorApplies(_x86) { + return _getMirrorApplies.apply(this, arguments); +} +function _getMirrorApplies() { + _getMirrorApplies = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee86(params) { + return _regeneratorRuntime().wrap(function _callee86$(_context86) { + while (1) switch (_context86.prev = _context86.next) { + case 0: + return _context86.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, ".json"), { + method: 'get', + params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context86.stop(); + } + }, _callee86); + })); + return _getMirrorApplies.apply(this, arguments); +} +function mirrorAppliesPublish(_x87) { + return _mirrorAppliesPublish.apply(this, arguments); +} +function _mirrorAppliesPublish() { + _mirrorAppliesPublish = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee87(params) { + return _regeneratorRuntime().wrap(function _callee87$(_context87) { + while (1) switch (_context87.prev = _context87.next) { + case 0: + return _context87.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, "/publish.json"), { + method: 'post', + body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context87.stop(); + } + }, _callee87); + })); + return _mirrorAppliesPublish.apply(this, arguments); +} +function mirrorAppliesOpenVnc(_x88) { + return _mirrorAppliesOpenVnc.apply(this, arguments); +} +function _mirrorAppliesOpenVnc() { + _mirrorAppliesOpenVnc = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee88(params) { + return _regeneratorRuntime().wrap(function _callee88$(_context88) { + while (1) switch (_context88.prev = _context88.next) { + case 0: + return _context88.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, "/open_vnc.json"), { + method: 'post', + params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context88.stop(); + } + }, _callee88); + })); + return _mirrorAppliesOpenVnc.apply(this, arguments); +} +function mirrorAppliesOpenWebssh(_x89) { + return _mirrorAppliesOpenWebssh.apply(this, arguments); +} +function _mirrorAppliesOpenWebssh() { + _mirrorAppliesOpenWebssh = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee89(params) { + return _regeneratorRuntime().wrap(function _callee89$(_context89) { + while (1) switch (_context89.prev = _context89.next) { + case 0: + return _context89.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, "/open_webssh.json"), { + method: 'post', + params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context89.stop(); + } + }, _callee89); + })); + return _mirrorAppliesOpenWebssh.apply(this, arguments); +} +function mirrorAppliesSaveImage(_x90) { + return _mirrorAppliesSaveImage.apply(this, arguments); +} +function _mirrorAppliesSaveImage() { + _mirrorAppliesSaveImage = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee90(params) { + return _regeneratorRuntime().wrap(function _callee90$(_context90) { + while (1) switch (_context90.prev = _context90.next) { + case 0: + return _context90.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, "/save_image.json"), { + method: 'post', + body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context90.stop(); + } + }, _callee90); + })); + return _mirrorAppliesSaveImage.apply(this, arguments); +} +function mirrorAppliesDeleteImage(_x91) { + return _mirrorAppliesDeleteImage.apply(this, arguments); +} +function _mirrorAppliesDeleteImage() { + _mirrorAppliesDeleteImage = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee91(params) { + return _regeneratorRuntime().wrap(function _callee91$(_context91) { + while (1) switch (_context91.prev = _context91.next) { + case 0: + return _context91.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, "/delete_image.json"), { + method: 'post', + body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context91.stop(); + } + }, _callee91); + })); + return _mirrorAppliesDeleteImage.apply(this, arguments); +} +function mirrorAppliesExtendVnc(_x92) { + return _mirrorAppliesExtendVnc.apply(this, arguments); +} +function _mirrorAppliesExtendVnc() { + _mirrorAppliesExtendVnc = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee92(params) { + return _regeneratorRuntime().wrap(function _callee92$(_context92) { + while (1) switch (_context92.prev = _context92.next) { + case 0: + return _context92.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, "/extend_vnc.json"), { + method: 'post', + body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context92.stop(); + } + }, _callee92); + })); + return _mirrorAppliesExtendVnc.apply(this, arguments); +} +function mirrorAppliesResetVncLink(_x93) { + return _mirrorAppliesResetVncLink.apply(this, arguments); +} +function _mirrorAppliesResetVncLink() { + _mirrorAppliesResetVncLink = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee93(params) { + return _regeneratorRuntime().wrap(function _callee93$(_context93) { + while (1) switch (_context93.prev = _context93.next) { + case 0: + return _context93.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, "/reset_vnc_link.json"), { + method: 'post', + body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context93.stop(); + } + }, _callee93); + })); + return _mirrorAppliesResetVncLink.apply(this, arguments); +} +function getTaskPass(_x94) { + return _getTaskPass.apply(this, arguments); +} +function _getTaskPass() { + _getTaskPass = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee94(params) { + return _regeneratorRuntime().wrap(function _callee94$(_context94) { + while (1) switch (_context94.prev = _context94.next) { + case 0: + return _context94.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/get_task_pass.json", { + method: 'get', + params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context94.stop(); + } + }, _callee94); + })); + return _getTaskPass.apply(this, arguments); +} +function getInfoWithJupyterLab(_x95) { + return _getInfoWithJupyterLab.apply(this, arguments); +} +function _getInfoWithJupyterLab() { + _getInfoWithJupyterLab = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee95(params) { + return _regeneratorRuntime().wrap(function _callee95$(_context95) { + while (1) switch (_context95.prev = _context95.next) { + case 0: + return _context95.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/jupyters/get_info_with_jupyter_lab.json", { + method: 'get', + params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context95.stop(); + } + }, _callee95); + })); + return _getInfoWithJupyterLab.apply(this, arguments); +} +function updateJupyterLabSetting(_x96) { + return _updateJupyterLabSetting.apply(this, arguments); +} +function _updateJupyterLabSetting() { + _updateJupyterLabSetting = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee96(params) { + return _regeneratorRuntime().wrap(function _callee96$(_context96) { + while (1) switch (_context96.prev = _context96.next) { + case 0: + return _context96.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/update_jupyter_lab_setting.json"), { + method: 'post', + body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params) + })); + case 1: + case "end": + return _context96.stop(); + } + }, _callee96); + })); + return _updateJupyterLabSetting.apply(this, arguments); +} + +/***/ }), + +/***/ "HDXh": +/*!*********************************************************************!*\ + !*** ./node_modules/node-libs-browser/node_modules/buffer/index.js ***! + \*********************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ + + + +var base64 = __webpack_require__(/*! base64-js */ "H7XF") +var ieee754 = __webpack_require__(/*! ieee754 */ "kVK+") +var isArray = __webpack_require__(/*! isarray */ "49sm") + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Due to various browser bugs, sometimes the Object implementation will be used even + * when the browser supports typed arrays. + * + * Note: + * + * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they + * get the Object implementation, which is slower but behaves correctly. + */ +Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined + ? global.TYPED_ARRAY_SUPPORT + : typedArraySupport() + +/* + * Export kMaxLength after typed array support is determined. + */ +exports.kMaxLength = kMaxLength() + +function typedArraySupport () { + try { + var arr = new Uint8Array(1) + arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} + return arr.foo() === 42 && // typed array instances can be augmented + typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` + arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` + } catch (e) { + return false + } +} + +function kMaxLength () { + return Buffer.TYPED_ARRAY_SUPPORT + ? 0x7fffffff + : 0x3fffffff +} + +function createBuffer (that, length) { + if (kMaxLength() < length) { + throw new RangeError('Invalid typed array length') + } + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = new Uint8Array(length) + that.__proto__ = Buffer.prototype + } else { + // Fallback: Return an object instance of the Buffer class + if (that === null) { + that = new Buffer(length) + } + that.length = length + } + + return that +} + +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + +function Buffer (arg, encodingOrOffset, length) { + if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { + return new Buffer(arg, encodingOrOffset, length) + } + + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new Error( + 'If encoding is specified then the first argument must be a string' + ) + } + return allocUnsafe(this, arg) + } + return from(this, arg, encodingOrOffset, length) +} + +Buffer.poolSize = 8192 // not used by this implementation + +// TODO: Legacy, not needed anymore. Remove in next major version. +Buffer._augment = function (arr) { + arr.__proto__ = Buffer.prototype + return arr +} + +function from (that, value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number') + } + + if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { + return fromArrayBuffer(that, value, encodingOrOffset, length) + } + + if (typeof value === 'string') { + return fromString(that, value, encodingOrOffset) + } + + return fromObject(that, value) +} + +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ +Buffer.from = function (value, encodingOrOffset, length) { + return from(null, value, encodingOrOffset, length) +} + +if (Buffer.TYPED_ARRAY_SUPPORT) { + Buffer.prototype.__proto__ = Uint8Array.prototype + Buffer.__proto__ = Uint8Array + if (typeof Symbol !== 'undefined' && Symbol.species && + Buffer[Symbol.species] === Buffer) { + // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 + Object.defineProperty(Buffer, Symbol.species, { + value: null, + configurable: true + }) + } +} + +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be a number') + } else if (size < 0) { + throw new RangeError('"size" argument must not be negative') + } +} + +function alloc (that, size, fill, encoding) { + assertSize(size) + if (size <= 0) { + return createBuffer(that, size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' + ? createBuffer(that, size).fill(fill, encoding) + : createBuffer(that, size).fill(fill) + } + return createBuffer(that, size) +} + +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer.alloc = function (size, fill, encoding) { + return alloc(null, size, fill, encoding) +} + +function allocUnsafe (that, size) { + assertSize(size) + that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < size; ++i) { + that[i] = 0 + } + } + return that +} + +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer.allocUnsafe = function (size) { + return allocUnsafe(null, size) +} +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(null, size) +} + +function fromString (that, string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding') + } + + var length = byteLength(string, encoding) | 0 + that = createBuffer(that, length) + + var actual = that.write(string, encoding) + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + that = that.slice(0, actual) + } + + return that +} + +function fromArrayLike (that, array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0 + that = createBuffer(that, length) + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +function fromArrayBuffer (that, array, byteOffset, length) { + array.byteLength // this throws if `array` is not a valid ArrayBuffer + + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('\'offset\' is out of bounds') + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('\'length\' is out of bounds') + } + + if (byteOffset === undefined && length === undefined) { + array = new Uint8Array(array) + } else if (length === undefined) { + array = new Uint8Array(array, byteOffset) + } else { + array = new Uint8Array(array, byteOffset, length) + } + + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = array + that.__proto__ = Buffer.prototype + } else { + // Fallback: Return an object instance of the Buffer class + that = fromArrayLike(that, array) + } + return that +} + +function fromObject (that, obj) { + if (Buffer.isBuffer(obj)) { + var len = checked(obj.length) | 0 + that = createBuffer(that, len) + + if (that.length === 0) { + return that + } + + obj.copy(that, 0, 0, len) + return that + } + + if (obj) { + if ((typeof ArrayBuffer !== 'undefined' && + obj.buffer instanceof ArrayBuffer) || 'length' in obj) { + if (typeof obj.length !== 'number' || isnan(obj.length)) { + return createBuffer(that, 0) + } + return fromArrayLike(that, obj) + } + + if (obj.type === 'Buffer' && isArray(obj.data)) { + return fromArrayLike(that, obj.data) + } + } + + throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') +} + +function checked (length) { + // Note: cannot use `length < kMaxLength()` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= kMaxLength()) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + kMaxLength().toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (length) { + if (+length != length) { // eslint-disable-line eqeqeq + length = 0 + } + return Buffer.alloc(+length) +} + +Buffer.isBuffer = function isBuffer (b) { + return !!(b != null && b._isBuffer) +} + +Buffer.compare = function compare (a, b) { + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError('Arguments must be Buffers') + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i] + y = b[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + + if (list.length === 0) { + return Buffer.alloc(0) + } + + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; ++i) { + length += list[i].length + } + } + + var buffer = Buffer.allocUnsafe(length) + var pos = 0 + for (i = 0; i < list.length; ++i) { + var buf = list[i] + if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + buf.copy(buffer, pos) + pos += buf.length + } + return buffer +} + +function byteLength (string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length + } + if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && + (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + string = '' + string + } + + var len = string.length + if (len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + case undefined: + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) return utf8ToBytes(string).length // assume utf8 + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +function slowToString (encoding, start, end) { + var loweredCase = false + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0 + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } + + if (end === undefined || end > this.length) { + end = this.length + } + + if (end <= 0) { + return '' + } + + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0 + start >>>= 0 + + if (end <= start) { + return '' + } + + if (!encoding) encoding = 'utf8' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect +// Buffer instances. +Buffer.prototype._isBuffer = true + +function swap (b, n, m) { + var i = b[n] + b[n] = b[m] + b[m] = i +} + +Buffer.prototype.swap16 = function swap16 () { + var len = this.length + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1) + } + return this +} + +Buffer.prototype.swap32 = function swap32 () { + var len = this.length + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3) + swap(this, i + 1, i + 2) + } + return this +} + +Buffer.prototype.swap64 = function swap64 () { + var len = this.length + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7) + swap(this, i + 1, i + 6) + swap(this, i + 2, i + 5) + swap(this, i + 3, i + 4) + } + return this +} + +Buffer.prototype.toString = function toString () { + var length = this.length | 0 + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') + if (this.length > max) str += ' ... ' + } + return '' +} + +Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (!Buffer.isBuffer(target)) { + throw new TypeError('Argument must be a Buffer') + } + + if (start === undefined) { + start = 0 + } + if (end === undefined) { + end = target ? target.length : 0 + } + if (thisStart === undefined) { + thisStart = 0 + } + if (thisEnd === undefined) { + thisEnd = this.length + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } + + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } + + start >>>= 0 + end >>>= 0 + thisStart >>>= 0 + thisEnd >>>= 0 + + if (this === target) return 0 + + var x = thisEnd - thisStart + var y = end - start + var len = Math.min(x, y) + + var thisCopy = this.slice(thisStart, thisEnd) + var targetCopy = target.slice(start, end) + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i] + y = targetCopy[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset + byteOffset = 0 + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000 + } + byteOffset = +byteOffset // Coerce to Number. + if (isNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1) + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1 + } else if (byteOffset < 0) { + if (dir) byteOffset = 0 + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding) + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF // Search for a byte value [0-255] + if (Buffer.TYPED_ARRAY_SUPPORT && + typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + } + + throw new TypeError('val must be string, number or Buffer') +} + +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + var indexSize = 1 + var arrLength = arr.length + var valLength = val.length + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase() + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2 + arrLength /= 2 + valLength /= 2 + byteOffset /= 2 + } + } + + function read (buf, i) { + if (indexSize === 1) { + return buf[i] + } else { + return buf.readUInt16BE(i * indexSize) + } + } + + var i + if (dir) { + var foundIndex = -1 + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex + foundIndex = -1 + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength + for (i = byteOffset; i >= 0; i--) { + var found = true + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false + break + } + } + if (found) return i + } + } + + return -1 +} + +Buffer.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +} + +Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + // must be an even number of digits + var strLen = string.length + if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (isNaN(parsed)) return i + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function latin1Write (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset | 0 + if (isFinite(length)) { + length = length | 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + // legacy write(string, encoding, offset, length) - remove in v0.13 + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) + } + + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + var res = [] + + var i = start + while (i < end) { + var firstByte = buf[i] + var codePoint = null + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + var len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = '' + var i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function latin1Slice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; ++i) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf + if (Buffer.TYPED_ARRAY_SUPPORT) { + newBuf = this.subarray(start, end) + newBuf.__proto__ = Buffer.prototype + } else { + var sliceLen = end - start + newBuf = new Buffer(sliceLen, undefined) + for (var i = 0; i < sliceLen; ++i) { + newBuf[i] = this[i + start] + } + } + + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + this[offset] = (value & 0xff) + return offset + 1 +} + +function objectWriteUInt16 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { + buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> + (littleEndian ? i : 1 - i) * 8 + } +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +function objectWriteUInt32 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { + buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff + } +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = 0 + var mul = 1 + var sub = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = byteLength - 1 + var mul = 1 + var sub = 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + var len = end - start + var i + + if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start] + } + } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { + // ascending copy from start + for (i = 0; i < len; ++i) { + target[i + targetStart] = this[i + start] + } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, start + len), + targetStart + ) + } + + return len +} + +// Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) +Buffer.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = this.length + } else if (typeof end === 'string') { + encoding = end + end = this.length + } + if (val.length === 1) { + var code = val.charCodeAt(0) + if (code < 256) { + val = code + } + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + } else if (typeof val === 'number') { + val = val & 255 + } + + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } + + if (end <= start) { + return this + } + + start = start >>> 0 + end = end === undefined ? this.length : end >>> 0 + + if (!val) val = 0 + + var i + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val + } + } else { + var bytes = Buffer.isBuffer(val) + ? val + : utf8ToBytes(new Buffer(val, encoding).toString()) + var len = bytes.length + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len] + } + } + + return this +} + +// HELPER FUNCTIONS +// ================ + +var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim(str).replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function stringtrim (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +function isnan (val) { + return val !== val // eslint-disable-line no-self-compare +} + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "yLpj"))) + +/***/ }), + +/***/ "HH4o": +/*!**************************************************************************!*\ + !*** ./node_modules/core-js/internals/check-correctness-of-iteration.js ***! + \**************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp"); + +var ITERATOR = wellKnownSymbol('iterator'); +var SAFE_CLOSING = false; + +try { + var called = 0; + var iteratorWithReturn = { + next: function () { + return { done: !!called++ }; + }, + 'return': function () { + SAFE_CLOSING = true; + } + }; + iteratorWithReturn[ITERATOR] = function () { + return this; + }; + // eslint-disable-next-line no-throw-literal + Array.from(iteratorWithReturn, function () { throw 2; }); +} catch (error) { /* empty */ } + +module.exports = function (exec, SKIP_CLOSING) { + if (!SKIP_CLOSING && !SAFE_CLOSING) return false; + var ITERATION_SUPPORT = false; + try { + var object = {}; + object[ITERATOR] = function () { + return { + next: function () { + return { done: ITERATION_SUPPORT = true }; + } + }; + }; + exec(object); + } catch (error) { /* empty */ } + return ITERATION_SUPPORT; +}; + + +/***/ }), + +/***/ "HNyW": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/internals/engine-is-ios.js ***! + \*********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "NC/Y"); + +module.exports = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent); + + +/***/ }), + +/***/ "HSsa": +/*!************************************************!*\ + !*** ./node_modules/axios/lib/helpers/bind.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 bind; }); + + +function bind(fn, thisArg) { + return function wrap() { + return fn.apply(thisArg, arguments); + }; +} + + +/***/ }), + +/***/ "HTfv": +/*!**************************************************************************!*\ + !*** ./node_modules/antd/node_modules/rc-motion/es/index.js + 5 modules ***! + \**************************************************************************/ +/*! exports provided: CSSMotionList, default */ +/*! exports used: CSSMotionList, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js because of ./src/pages/Competitions/components/ClaModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js because of ./node_modules/rc-textarea/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js because of ./node_modules/rc-textarea/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js because of ./src/pages/Competitions/components/ClaModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./node_modules/rc-tooltip/es/Tooltip.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js because of ./node_modules/rc-textarea/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./node_modules/rc-tooltip/es/Tooltip.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js because of ./node_modules/rc-tooltip/es/Tooltip.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js because of ./node_modules/rc-tooltip/es/Tooltip.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js because of ./node_modules/rc-tooltip/node_modules/rc-trigger/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js because of ./node_modules/rc-tooltip/node_modules/rc-trigger/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ es_CSSMotionList; }); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js +var defineProperty = __webpack_require__("rePB"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("VTBJ"); + +// 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/assertThisInitialized.js +var assertThisInitialized = __webpack_require__("JX7q"); + +// 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: ./node_modules/@babel/runtime/helpers/esm/typeof.js +var esm_typeof = __webpack_require__("U8pU"); + +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__("q1tI"); + +// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/findDOMNode.js +var findDOMNode = __webpack_require__("m+aA"); + +// EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js +var es_ref = __webpack_require__("c+Xe"); + +// EXTERNAL MODULE: ./node_modules/classnames/index.js +var classnames = __webpack_require__("TSYQ"); +var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); + +// EXTERNAL MODULE: ./node_modules/raf/index.js +var raf = __webpack_require__("xEkU"); +var raf_default = /*#__PURE__*/__webpack_require__.n(raf); + +// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-motion/es/util/motion.js + +var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); // ================= Transition ================= +// Event wrapper. Copy from react source code + +function makePrefixMap(styleProp, eventName) { + var prefixes = {}; + prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); + prefixes["Webkit".concat(styleProp)] = "webkit".concat(eventName); + prefixes["Moz".concat(styleProp)] = "moz".concat(eventName); + prefixes["ms".concat(styleProp)] = "MS".concat(eventName); + prefixes["O".concat(styleProp)] = "o".concat(eventName.toLowerCase()); + return prefixes; +} + +function getVendorPrefixes(domSupport, win) { + var prefixes = { + animationend: makePrefixMap('Animation', 'AnimationEnd'), + transitionend: makePrefixMap('Transition', 'TransitionEnd') + }; + + if (domSupport) { + if (!('AnimationEvent' in win)) { + delete prefixes.animationend.animation; + } + + if (!('TransitionEvent' in win)) { + delete prefixes.transitionend.transition; + } + } + + return prefixes; +} +var vendorPrefixes = getVendorPrefixes(canUseDOM, typeof window !== 'undefined' ? window : {}); +var style = {}; + +if (canUseDOM) { + var _document$createEleme = document.createElement('div'); + + style = _document$createEleme.style; +} + +var prefixedEventNames = {}; +function getVendorPrefixedEventName(eventName) { + if (prefixedEventNames[eventName]) { + return prefixedEventNames[eventName]; + } + + var prefixMap = vendorPrefixes[eventName]; + + if (prefixMap) { + var stylePropList = Object.keys(prefixMap); + var len = stylePropList.length; + + for (var i = 0; i < len; i += 1) { + var styleProp = stylePropList[i]; + + if (Object.prototype.hasOwnProperty.call(prefixMap, styleProp) && styleProp in style) { + prefixedEventNames[eventName] = prefixMap[styleProp]; + return prefixedEventNames[eventName]; + } + } + } + + return ''; +} +var animationEndName = getVendorPrefixedEventName('animationend'); +var transitionEndName = getVendorPrefixedEventName('transitionend'); +var supportTransition = !!(animationEndName && transitionEndName); +function getTransitionName(transitionName, transitionType) { + if (!transitionName) return null; + + if (Object(esm_typeof["a" /* default */])(transitionName) === 'object') { + var type = transitionType.replace(/-\w/g, function (match) { + return match[1].toUpperCase(); + }); + return transitionName[type]; + } + + return "".concat(transitionName, "-").concat(transitionType); +} +// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-motion/es/interface.js +var STATUS_NONE = 'none'; +var STATUS_APPEAR = 'appear'; +var STATUS_ENTER = 'enter'; +var STATUS_LEAVE = 'leave'; +// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-motion/es/CSSMotion.js + + + + + + + + + +/* eslint-disable react/default-props-match-prop-types, react/no-multi-comp, react/prop-types */ + + + + + + + +/** + * `transitionSupport` is used for none transition test case. + * Default we use browser transition event support check. + */ + +function genCSSMotion(config) { + var transitionSupport = config; + var forwardRef = !!react["forwardRef"]; + + if (Object(esm_typeof["a" /* default */])(config) === 'object') { + transitionSupport = config.transitionSupport; + forwardRef = 'forwardRef' in config ? config.forwardRef : forwardRef; + } + + function isSupportTransition(props) { + return !!(props.motionName && transitionSupport); + } + + var CSSMotion = /*#__PURE__*/function (_React$Component) { + Object(inherits["a" /* default */])(CSSMotion, _React$Component); + + var _super = Object(createSuper["a" /* default */])(CSSMotion); + + function CSSMotion() { + var _this; + + Object(classCallCheck["a" /* default */])(this, CSSMotion); + + _this = _super.apply(this, arguments); + _this.$cacheEle = null; + _this.node = null; + _this.raf = null; + _this.destroyed = false; + _this.deadlineId = null; + _this.state = { + status: STATUS_NONE, + statusActive: false, + newStatus: false, + statusStyle: null + }; + + _this.onDomUpdate = function () { + var _this$state = _this.state, + status = _this$state.status, + newStatus = _this$state.newStatus; + var _this$props = _this.props, + onAppearStart = _this$props.onAppearStart, + onEnterStart = _this$props.onEnterStart, + onLeaveStart = _this$props.onLeaveStart, + onAppearActive = _this$props.onAppearActive, + onEnterActive = _this$props.onEnterActive, + onLeaveActive = _this$props.onLeaveActive, + motionAppear = _this$props.motionAppear, + motionEnter = _this$props.motionEnter, + motionLeave = _this$props.motionLeave; + + if (!isSupportTransition(_this.props)) { + return; + } // Event injection + + + var $ele = _this.getElement(); + + if (_this.$cacheEle !== $ele) { + _this.removeEventListener(_this.$cacheEle); + + _this.addEventListener($ele); + + _this.$cacheEle = $ele; + } // Init status + + + if (newStatus && status === STATUS_APPEAR && motionAppear) { + _this.updateStatus(onAppearStart, null, null, function () { + _this.updateActiveStatus(onAppearActive, STATUS_APPEAR); + }); + } else if (newStatus && status === STATUS_ENTER && motionEnter) { + _this.updateStatus(onEnterStart, null, null, function () { + _this.updateActiveStatus(onEnterActive, STATUS_ENTER); + }); + } else if (newStatus && status === STATUS_LEAVE && motionLeave) { + _this.updateStatus(onLeaveStart, null, null, function () { + _this.updateActiveStatus(onLeaveActive, STATUS_LEAVE); + }); + } + }; + + _this.onMotionEnd = function (event) { + if (event && !event.deadline && event.target !== _this.getElement()) { + // event exists + // not initiated by deadline + // transitionend not fired by inner elements + return; + } + + var _this$state2 = _this.state, + status = _this$state2.status, + statusActive = _this$state2.statusActive; + var _this$props2 = _this.props, + onAppearEnd = _this$props2.onAppearEnd, + onEnterEnd = _this$props2.onEnterEnd, + onLeaveEnd = _this$props2.onLeaveEnd; + + if (status === STATUS_APPEAR && statusActive) { + _this.updateStatus(onAppearEnd, { + status: STATUS_NONE + }, event); + } else if (status === STATUS_ENTER && statusActive) { + _this.updateStatus(onEnterEnd, { + status: STATUS_NONE + }, event); + } else if (status === STATUS_LEAVE && statusActive) { + _this.updateStatus(onLeaveEnd, { + status: STATUS_NONE + }, event); + } + }; + + _this.setNodeRef = function (node) { + var internalRef = _this.props.internalRef; + _this.node = node; + Object(es_ref["b" /* fillRef */])(internalRef, node); + }; + + _this.getElement = function () { + try { + return Object(findDOMNode["a" /* default */])(_this.node || Object(assertThisInitialized["a" /* default */])(_this)); + } catch (e) { + /** + * Fallback to cache element. + * This is only happen when `motionDeadline` trigger but element removed. + */ + return _this.$cacheEle; + } + }; + + _this.addEventListener = function ($ele) { + if (!$ele) return; + $ele.addEventListener(transitionEndName, _this.onMotionEnd); + $ele.addEventListener(animationEndName, _this.onMotionEnd); + }; + + _this.removeEventListener = function ($ele) { + if (!$ele) return; + $ele.removeEventListener(transitionEndName, _this.onMotionEnd); + $ele.removeEventListener(animationEndName, _this.onMotionEnd); + }; + + _this.updateStatus = function (styleFunc, additionalState, event, callback) { + var statusStyle = styleFunc ? styleFunc(_this.getElement(), event) : null; + if (statusStyle === false || _this.destroyed) return; + var nextStep; + + if (callback) { + nextStep = function nextStep() { + _this.nextFrame(callback); + }; + } + + _this.setState(Object(objectSpread2["a" /* default */])({ + statusStyle: Object(esm_typeof["a" /* default */])(statusStyle) === 'object' ? statusStyle : null, + newStatus: false + }, additionalState), nextStep); // Trigger before next frame & after `componentDidMount` + + }; + + _this.updateActiveStatus = function (styleFunc, currentStatus) { + // `setState` use `postMessage` to trigger at the end of frame. + // Let's use requestAnimationFrame to update new state in next frame. + _this.nextFrame(function () { + var status = _this.state.status; + if (status !== currentStatus) return; + var motionDeadline = _this.props.motionDeadline; + + _this.updateStatus(styleFunc, { + statusActive: true + }); + + if (motionDeadline > 0) { + _this.deadlineId = setTimeout(function () { + _this.onMotionEnd({ + deadline: true + }); + }, motionDeadline); + } + }); + }; + + _this.nextFrame = function (func) { + _this.cancelNextFrame(); + + _this.raf = raf_default()(func); + }; + + _this.cancelNextFrame = function () { + if (_this.raf) { + raf_default.a.cancel(_this.raf); + _this.raf = null; + } + }; + + return _this; + } + + Object(createClass["a" /* default */])(CSSMotion, [{ + key: "componentDidMount", + value: function componentDidMount() { + this.onDomUpdate(); + } + }, { + key: "componentDidUpdate", + value: function componentDidUpdate() { + this.onDomUpdate(); + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + this.destroyed = true; + this.removeEventListener(this.$cacheEle); + this.cancelNextFrame(); + clearTimeout(this.deadlineId); + } + }, { + key: "render", + value: function render() { + var _classNames; + + var _this$state3 = this.state, + status = _this$state3.status, + statusActive = _this$state3.statusActive, + statusStyle = _this$state3.statusStyle; + var _this$props3 = this.props, + children = _this$props3.children, + motionName = _this$props3.motionName, + visible = _this$props3.visible, + removeOnLeave = _this$props3.removeOnLeave, + leavedClassName = _this$props3.leavedClassName, + eventProps = _this$props3.eventProps; + if (!children) return null; + + if (status === STATUS_NONE || !isSupportTransition(this.props)) { + if (visible) { + return children(Object(objectSpread2["a" /* default */])({}, eventProps), this.setNodeRef); + } + + if (!removeOnLeave) { + return children(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, eventProps), {}, { + className: leavedClassName + }), this.setNodeRef); + } + + return null; + } + + return children(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, eventProps), {}, { + className: classnames_default()(getTransitionName(motionName, status), (_classNames = {}, Object(defineProperty["a" /* default */])(_classNames, getTransitionName(motionName, "".concat(status, "-active")), statusActive), Object(defineProperty["a" /* default */])(_classNames, motionName, typeof motionName === 'string'), _classNames)), + style: statusStyle + }), this.setNodeRef); + } + }], [{ + key: "getDerivedStateFromProps", + value: function getDerivedStateFromProps(props, _ref) { + var prevProps = _ref.prevProps, + prevStatus = _ref.status; + if (!isSupportTransition(props)) return {}; + var visible = props.visible, + motionAppear = props.motionAppear, + motionEnter = props.motionEnter, + motionLeave = props.motionLeave, + motionLeaveImmediately = props.motionLeaveImmediately; + var newState = { + prevProps: props + }; // Clean up status if prop set to false + + if (prevStatus === STATUS_APPEAR && !motionAppear || prevStatus === STATUS_ENTER && !motionEnter || prevStatus === STATUS_LEAVE && !motionLeave) { + newState.status = STATUS_NONE; + newState.statusActive = false; + newState.newStatus = false; + } // Appear + + + if (!prevProps && visible && motionAppear) { + newState.status = STATUS_APPEAR; + newState.statusActive = false; + newState.newStatus = true; + } // Enter + + + if (prevProps && !prevProps.visible && visible && motionEnter) { + newState.status = STATUS_ENTER; + newState.statusActive = false; + newState.newStatus = true; + } // Leave + + + if (prevProps && prevProps.visible && !visible && motionLeave || !prevProps && motionLeaveImmediately && !visible && motionLeave) { + newState.status = STATUS_LEAVE; + newState.statusActive = false; + newState.newStatus = true; + } + + return newState; + } + }]); + + return CSSMotion; + }(react["Component"]); + + CSSMotion.defaultProps = { + visible: true, + motionEnter: true, + motionAppear: true, + motionLeave: true, + removeOnLeave: true + }; + + if (!forwardRef) { + return CSSMotion; + } + + return react["forwardRef"](function (props, ref) { + return react["createElement"](CSSMotion, Object.assign({ + internalRef: ref + }, props)); + }); +} +/* harmony default export */ var es_CSSMotion = (genCSSMotion(supportTransition)); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +var objectWithoutProperties = __webpack_require__("Ff2n"); + +// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-motion/es/util/diff.js + + +var STATUS_ADD = 'add'; +var STATUS_KEEP = 'keep'; +var STATUS_REMOVE = 'remove'; +var STATUS_REMOVED = 'removed'; +function wrapKeyToObject(key) { + var keyObj; + + if (key && Object(esm_typeof["a" /* default */])(key) === 'object' && 'key' in key) { + keyObj = key; + } else { + keyObj = { + key: key + }; + } + + return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, keyObj), {}, { + key: String(keyObj.key) + }); +} +function parseKeys() { + var keys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + return keys.map(wrapKeyToObject); +} +function diffKeys() { + var prevKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + var currentKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + var list = []; + var currentIndex = 0; + var currentLen = currentKeys.length; + var prevKeyObjects = parseKeys(prevKeys); + var currentKeyObjects = parseKeys(currentKeys); // Check prev keys to insert or keep + + prevKeyObjects.forEach(function (keyObj) { + var hit = false; + + for (var i = currentIndex; i < currentLen; i += 1) { + var currentKeyObj = currentKeyObjects[i]; + + if (currentKeyObj.key === keyObj.key) { + // New added keys should add before current key + if (currentIndex < i) { + list = list.concat(currentKeyObjects.slice(currentIndex, i).map(function (obj) { + return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, obj), {}, { + status: STATUS_ADD + }); + })); + currentIndex = i; + } + + list.push(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, currentKeyObj), {}, { + status: STATUS_KEEP + })); + currentIndex += 1; + hit = true; + break; + } + } // If not hit, it means key is removed + + + if (!hit) { + list.push(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, keyObj), {}, { + status: STATUS_REMOVE + })); + } + }); // Add rest to the list + + if (currentIndex < currentLen) { + list = list.concat(currentKeyObjects.slice(currentIndex).map(function (obj) { + return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, obj), {}, { + status: STATUS_ADD + }); + })); + } + /** + * Merge same key when it remove and add again: + * [1 - add, 2 - keep, 1 - remove] -> [1 - keep, 2 - keep] + */ + + + var keys = {}; + list.forEach(function (_ref) { + var key = _ref.key; + keys[key] = (keys[key] || 0) + 1; + }); + var duplicatedKeys = Object.keys(keys).filter(function (key) { + return keys[key] > 1; + }); + duplicatedKeys.forEach(function (matchKey) { + // Remove `STATUS_REMOVE` node. + list = list.filter(function (_ref2) { + var key = _ref2.key, + status = _ref2.status; + return key !== matchKey || status !== STATUS_REMOVE; + }); // Update `STATUS_ADD` to `STATUS_KEEP` + + list.forEach(function (node) { + if (node.key === matchKey) { + // eslint-disable-next-line no-param-reassign + node.status = STATUS_KEEP; + } + }); + }); + return list; +} +// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-motion/es/CSSMotionList.js + + + + + + + +/* eslint react/prop-types: 0 */ + + + + +var MOTION_PROP_NAMES = ['eventProps', 'visible', 'children', 'motionName', 'motionAppear', 'motionEnter', 'motionLeave', 'motionLeaveImmediately', 'motionDeadline', 'removeOnLeave', 'leavedClassName', 'onAppearStart', 'onAppearActive', 'onAppearEnd', 'onEnterStart', 'onEnterActive', 'onEnterEnd', 'onLeaveStart', 'onLeaveActive', 'onLeaveEnd']; +function genCSSMotionList(transitionSupport) { + var CSSMotion = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : es_CSSMotion; + + var CSSMotionList = /*#__PURE__*/function (_React$Component) { + Object(inherits["a" /* default */])(CSSMotionList, _React$Component); + + var _super = Object(createSuper["a" /* default */])(CSSMotionList); + + function CSSMotionList() { + var _this; + + Object(classCallCheck["a" /* default */])(this, CSSMotionList); + + _this = _super.apply(this, arguments); + _this.state = { + keyEntities: [] + }; + + _this.removeKey = function (removeKey) { + _this.setState(function (_ref) { + var keyEntities = _ref.keyEntities; + return { + keyEntities: keyEntities.map(function (entity) { + if (entity.key !== removeKey) return entity; + return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, entity), {}, { + status: STATUS_REMOVED + }); + }) + }; + }); + }; + + return _this; + } + + Object(createClass["a" /* default */])(CSSMotionList, [{ + key: "render", + value: function render() { + var _this2 = this; + + var keyEntities = this.state.keyEntities; + + var _this$props = this.props, + component = _this$props.component, + children = _this$props.children, + restProps = Object(objectWithoutProperties["a" /* default */])(_this$props, ["component", "children"]); + + var Component = component || react["Fragment"]; + var motionProps = {}; + MOTION_PROP_NAMES.forEach(function (prop) { + motionProps[prop] = restProps[prop]; + delete restProps[prop]; + }); + delete restProps.keys; + return react["createElement"](Component, Object.assign({}, restProps), keyEntities.map(function (_ref2) { + var status = _ref2.status, + eventProps = Object(objectWithoutProperties["a" /* default */])(_ref2, ["status"]); + + var visible = status === STATUS_ADD || status === STATUS_KEEP; + return react["createElement"](CSSMotion, Object.assign({}, motionProps, { + key: eventProps.key, + visible: visible, + eventProps: eventProps, + onLeaveEnd: function onLeaveEnd() { + if (motionProps.onLeaveEnd) { + motionProps.onLeaveEnd.apply(motionProps, arguments); + } + + _this2.removeKey(eventProps.key); + } + }), children); + })); + } + }], [{ + key: "getDerivedStateFromProps", + value: function getDerivedStateFromProps(_ref3, _ref4) { + var keys = _ref3.keys; + var keyEntities = _ref4.keyEntities; + var parsedKeyObjects = parseKeys(keys); // Always as keep when motion not support + + if (!transitionSupport) { + return { + keyEntities: parsedKeyObjects.map(function (obj) { + return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, obj), {}, { + status: STATUS_KEEP + }); + }) + }; + } + + var mixedKeyEntities = diffKeys(keyEntities, parsedKeyObjects); + var keyEntitiesLen = keyEntities.length; + return { + keyEntities: mixedKeyEntities.filter(function (entity) { + // IE 9 not support Array.prototype.find + var prevEntity = null; + + for (var i = 0; i < keyEntitiesLen; i += 1) { + var currentEntity = keyEntities[i]; + + if (currentEntity.key === entity.key) { + prevEntity = currentEntity; + break; + } + } // Remove if already mark as removed + + + if (prevEntity && prevEntity.status === STATUS_REMOVED && entity.status === STATUS_REMOVE) { + return false; + } + + return true; + }) + }; + } + }]); + + return CSSMotionList; + }(react["Component"]); + + CSSMotionList.defaultProps = { + component: 'div' + }; + return CSSMotionList; +} +/* harmony default export */ var es_CSSMotionList = (genCSSMotionList(supportTransition)); +// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-motion/es/index.js + + + +/* harmony default export */ var es = __webpack_exports__["b"] = (es_CSSMotion); + +/***/ }), + +/***/ "HYAF": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/internals/require-object-coercible.js ***! + \********************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +// `RequireObjectCoercible` abstract operation +// https://tc39.github.io/ecma262/#sec-requireobjectcoercible +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; + + +/***/ }), + +/***/ "HaE+": +/*!*********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.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 _asyncToGenerator; }); +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(_next, _throw); + } +} +function _asyncToGenerator(fn) { + return function () { + var self = this, + args = arguments; + return new Promise(function (resolve, reject) { + var gen = fn.apply(self, args); + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); + } + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); + } + _next(undefined); + }); + }; +} + +/***/ }), + +/***/ "Hd5f": +/*!****************************************************************************!*\ + !*** ./node_modules/core-js/internals/array-method-has-species-support.js ***! + \****************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var fails = __webpack_require__(/*! ../internals/fails */ "0Dky"); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp"); +var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "LQDL"); + +var SPECIES = wellKnownSymbol('species'); + +module.exports = function (METHOD_NAME) { + // We can't use this feature detection in V8 since it causes + // deoptimization and serious performance degradation + // https://github.com/zloirock/core-js/issues/677 + return V8_VERSION >= 51 || !fails(function () { + var array = []; + var constructor = array.constructor = {}; + constructor[SPECIES] = function () { + return { foo: 1 }; + }; + return array[METHOD_NAME](Boolean).foo !== 1; + }); +}; + + +/***/ }), + +/***/ "Hg0r": +/*!*********************************************************!*\ + !*** ./node_modules/dva/dist/index.esm.js + 28 modules ***! + \*********************************************************/ +/*! exports provided: createBrowserHistory, createHashHistory, createMemoryHistory, connect, connectAdvanced, shallowEqual, useDispatch, useSelector, useStore, bindActionCreators, saga, router, routerRedux, fetch, default, dynamic, useHistory, useLocation, useParams, useRouteMatch */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js because of ./node_modules/rc-textarea/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js because of ./node_modules/rc-textarea/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js because of ./src/pages/Competitions/components/ClaModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./node_modules/rc-tooltip/es/Tooltip.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js because of ./node_modules/rc-textarea/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./node_modules/rc-tooltip/es/Tooltip.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js because of ./node_modules/@ant-design/icons/es/components/twoTonePrimaryColor.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toArray.js because of ./node_modules/antd/es/form/Form.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js because of ./src/pages/metting/information/detail.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js because of ./node_modules/rc-tooltip/es/Tooltip.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/dva-core/node_modules/warning/browser.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/flatten/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/global/document.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/history-with-query/esm/history.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/invariant/browser.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/is-plain-object/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/prop-types/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-redux/es/index.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router/esm/react-router.js because of ./node_modules/@umijs/renderer-react/node_modules/react-router-config/esm/react-router-config.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// UNUSED EXPORTS: createBrowserHistory, createHashHistory, createMemoryHistory, connect, connectAdvanced, shallowEqual, useDispatch, useSelector, useStore, bindActionCreators, saga, router, routerRedux, fetch, dynamic, useHistory, useLocation, useParams, useRouteMatch + +// NAMESPACE OBJECT: ./node_modules/redux-saga/es/effects.js +var effects_namespaceObject = {}; +__webpack_require__.r(effects_namespaceObject); +__webpack_require__.d(effects_namespaceObject, "take", function() { return io_take; }); +__webpack_require__.d(effects_namespaceObject, "takem", function() { return takem; }); +__webpack_require__.d(effects_namespaceObject, "put", function() { return io_put; }); +__webpack_require__.d(effects_namespaceObject, "all", function() { return io_all; }); +__webpack_require__.d(effects_namespaceObject, "race", function() { return io_race; }); +__webpack_require__.d(effects_namespaceObject, "call", function() { return io_call; }); +__webpack_require__.d(effects_namespaceObject, "apply", function() { return io_apply; }); +__webpack_require__.d(effects_namespaceObject, "cps", function() { return cps; }); +__webpack_require__.d(effects_namespaceObject, "fork", function() { return fork; }); +__webpack_require__.d(effects_namespaceObject, "spawn", function() { return spawn; }); +__webpack_require__.d(effects_namespaceObject, "join", function() { return join; }); +__webpack_require__.d(effects_namespaceObject, "cancel", function() { return io_cancel; }); +__webpack_require__.d(effects_namespaceObject, "select", function() { return io_select; }); +__webpack_require__.d(effects_namespaceObject, "actionChannel", function() { return actionChannel; }); +__webpack_require__.d(effects_namespaceObject, "cancelled", function() { return cancelled; }); +__webpack_require__.d(effects_namespaceObject, "flush", function() { return io_flush; }); +__webpack_require__.d(effects_namespaceObject, "getContext", function() { return getContext; }); +__webpack_require__.d(effects_namespaceObject, "setContext", function() { return io_setContext; }); +__webpack_require__.d(effects_namespaceObject, "takeEvery", function() { return io_helpers_takeEvery; }); +__webpack_require__.d(effects_namespaceObject, "takeLatest", function() { return io_helpers_takeLatest; }); +__webpack_require__.d(effects_namespaceObject, "throttle", function() { return io_helpers_throttle; }); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("VTBJ"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js +var esm_typeof = __webpack_require__("U8pU"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules +var toConsumableArray = __webpack_require__("KQm4"); + +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__("q1tI"); +var react_default = /*#__PURE__*/__webpack_require__.n(react); + +// EXTERNAL MODULE: ./node_modules/invariant/browser.js +var browser = __webpack_require__("QLaP"); +var browser_default = /*#__PURE__*/__webpack_require__.n(browser); + +// EXTERNAL MODULE: ./node_modules/history-with-query/esm/history.js + 2 modules +var esm_history = __webpack_require__("YS25"); + +// EXTERNAL MODULE: ./node_modules/global/document.js +var global_document = __webpack_require__("7zRj"); +var document_default = /*#__PURE__*/__webpack_require__.n(global_document); + +// EXTERNAL MODULE: ./node_modules/react-redux/es/index.js + 24 modules +var es = __webpack_require__("/MKj"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js +var defineProperty = __webpack_require__("rePB"); + +// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread.js + +function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? Object(arguments[i]) : {}; + var ownKeys = Object.keys(source); + if (typeof Object.getOwnPropertySymbols === 'function') { + ownKeys.push.apply(ownKeys, Object.getOwnPropertySymbols(source).filter(function (sym) { + return Object.getOwnPropertyDescriptor(source, sym).enumerable; + })); + } + ownKeys.forEach(function (key) { + Object(defineProperty["a" /* default */])(target, key, source[key]); + }); + } + return target; +} +// CONCATENATED MODULE: ./node_modules/redux/es/redux.js + + +/** + * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js + * + * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes + * during build. + * @param {number} code + */ +function formatProdErrorMessage(code) { + return "Minified Redux error #" + code + "; visit https://redux.js.org/Errors?code=" + code + " for the full message or " + 'use the non-minified dev environment for full errors. '; +} + +// Inlined version of the `symbol-observable` polyfill +var $$observable = (function () { + return typeof Symbol === 'function' && Symbol.observable || '@@observable'; +})(); + +/** + * These are private action types reserved by Redux. + * For any unknown actions, you must return the current state. + * If the current state is undefined, you must return the initial state. + * Do not reference these action types directly in your code. + */ +var randomString = function randomString() { + return Math.random().toString(36).substring(7).split('').join('.'); +}; + +var ActionTypes = { + INIT: "@@redux/INIT" + randomString(), + REPLACE: "@@redux/REPLACE" + randomString(), + PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() { + return "@@redux/PROBE_UNKNOWN_ACTION" + randomString(); + } +}; + +/** + * @param {any} obj The object to inspect. + * @returns {boolean} True if the argument appears to be a plain object. + */ +function isPlainObject(obj) { + if (typeof obj !== 'object' || obj === null) return false; + var proto = obj; + + while (Object.getPrototypeOf(proto) !== null) { + proto = Object.getPrototypeOf(proto); + } + + return Object.getPrototypeOf(obj) === proto; +} + +// Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of +function miniKindOf(val) { + if (val === void 0) return 'undefined'; + if (val === null) return 'null'; + var type = typeof val; + + switch (type) { + case 'boolean': + case 'string': + case 'number': + case 'symbol': + case 'function': + { + return type; + } + } + + if (Array.isArray(val)) return 'array'; + if (isDate(val)) return 'date'; + if (isError(val)) return 'error'; + var constructorName = ctorName(val); + + switch (constructorName) { + case 'Symbol': + case 'Promise': + case 'WeakMap': + case 'WeakSet': + case 'Map': + case 'Set': + return constructorName; + } // other + + + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); +} + +function ctorName(val) { + return typeof val.constructor === 'function' ? val.constructor.name : null; +} + +function isError(val) { + return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'; +} + +function isDate(val) { + if (val instanceof Date) return true; + return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function'; +} + +function kindOf(val) { + var typeOfVal = typeof val; + + if (false) {} + + return typeOfVal; +} + +/** + * @deprecated + * + * **We recommend using the `configureStore` method + * of the `@reduxjs/toolkit` package**, which replaces `createStore`. + * + * Redux Toolkit is our recommended approach for writing Redux logic today, + * including store setup, reducers, data fetching, and more. + * + * **For more details, please read this Redux docs page:** + * **https://redux.js.org/introduction/why-rtk-is-redux-today** + * + * `configureStore` from Redux Toolkit is an improved version of `createStore` that + * simplifies setup and helps avoid common bugs. + * + * You should not be using the `redux` core package by itself today, except for learning purposes. + * The `createStore` method from the core `redux` package will not be removed, but we encourage + * all users to migrate to using Redux Toolkit for all Redux code. + * + * If you want to use `createStore` without this visual deprecation warning, use + * the `legacy_createStore` import instead: + * + * `import { legacy_createStore as createStore} from 'redux'` + * + */ + +function redux_createStore(reducer, preloadedState, enhancer) { + var _ref2; + + if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') { + throw new Error( true ? formatProdErrorMessage(0) : undefined); + } + + if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { + enhancer = preloadedState; + preloadedState = undefined; + } + + if (typeof enhancer !== 'undefined') { + if (typeof enhancer !== 'function') { + throw new Error( true ? formatProdErrorMessage(1) : undefined); + } + + return enhancer(redux_createStore)(reducer, preloadedState); + } + + if (typeof reducer !== 'function') { + throw new Error( true ? formatProdErrorMessage(2) : undefined); + } + + var currentReducer = reducer; + var currentState = preloadedState; + var currentListeners = []; + var nextListeners = currentListeners; + var isDispatching = false; + /** + * This makes a shallow copy of currentListeners so we can use + * nextListeners as a temporary list while dispatching. + * + * This prevents any bugs around consumers calling + * subscribe/unsubscribe in the middle of a dispatch. + */ + + function ensureCanMutateNextListeners() { + if (nextListeners === currentListeners) { + nextListeners = currentListeners.slice(); + } + } + /** + * Reads the state tree managed by the store. + * + * @returns {any} The current state tree of your application. + */ + + + function getState() { + if (isDispatching) { + throw new Error( true ? formatProdErrorMessage(3) : undefined); + } + + return currentState; + } + /** + * Adds a change listener. It will be called any time an action is dispatched, + * and some part of the state tree may potentially have changed. You may then + * call `getState()` to read the current state tree inside the callback. + * + * You may call `dispatch()` from a change listener, with the following + * caveats: + * + * 1. The subscriptions are snapshotted just before every `dispatch()` call. + * If you subscribe or unsubscribe while the listeners are being invoked, this + * will not have any effect on the `dispatch()` that is currently in progress. + * However, the next `dispatch()` call, whether nested or not, will use a more + * recent snapshot of the subscription list. + * + * 2. The listener should not expect to see all state changes, as the state + * might have been updated multiple times during a nested `dispatch()` before + * the listener is called. It is, however, guaranteed that all subscribers + * registered before the `dispatch()` started will be called with the latest + * state by the time it exits. + * + * @param {Function} listener A callback to be invoked on every dispatch. + * @returns {Function} A function to remove this change listener. + */ + + + function subscribe(listener) { + if (typeof listener !== 'function') { + throw new Error( true ? formatProdErrorMessage(4) : undefined); + } + + if (isDispatching) { + throw new Error( true ? formatProdErrorMessage(5) : undefined); + } + + var isSubscribed = true; + ensureCanMutateNextListeners(); + nextListeners.push(listener); + return function unsubscribe() { + if (!isSubscribed) { + return; + } + + if (isDispatching) { + throw new Error( true ? formatProdErrorMessage(6) : undefined); + } + + isSubscribed = false; + ensureCanMutateNextListeners(); + var index = nextListeners.indexOf(listener); + nextListeners.splice(index, 1); + currentListeners = null; + }; + } + /** + * Dispatches an action. It is the only way to trigger a state change. + * + * The `reducer` function, used to create the store, will be called with the + * current state tree and the given `action`. Its return value will + * be considered the **next** state of the tree, and the change listeners + * will be notified. + * + * The base implementation only supports plain object actions. If you want to + * dispatch a Promise, an Observable, a thunk, or something else, you need to + * wrap your store creating function into the corresponding middleware. For + * example, see the documentation for the `redux-thunk` package. Even the + * middleware will eventually dispatch plain object actions using this method. + * + * @param {Object} action A plain object representing “what changed”. It is + * a good idea to keep actions serializable so you can record and replay user + * sessions, or use the time travelling `redux-devtools`. An action must have + * a `type` property which may not be `undefined`. It is a good idea to use + * string constants for action types. + * + * @returns {Object} For convenience, the same action object you dispatched. + * + * Note that, if you use a custom middleware, it may wrap `dispatch()` to + * return something else (for example, a Promise you can await). + */ + + + function dispatch(action) { + if (!isPlainObject(action)) { + throw new Error( true ? formatProdErrorMessage(7) : undefined); + } + + if (typeof action.type === 'undefined') { + throw new Error( true ? formatProdErrorMessage(8) : undefined); + } + + if (isDispatching) { + throw new Error( true ? formatProdErrorMessage(9) : undefined); + } + + try { + isDispatching = true; + currentState = currentReducer(currentState, action); + } finally { + isDispatching = false; + } + + var listeners = currentListeners = nextListeners; + + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + listener(); + } + + return action; + } + /** + * Replaces the reducer currently used by the store to calculate the state. + * + * You might need this if your app implements code splitting and you want to + * load some of the reducers dynamically. You might also need this if you + * implement a hot reloading mechanism for Redux. + * + * @param {Function} nextReducer The reducer for the store to use instead. + * @returns {void} + */ + + + function replaceReducer(nextReducer) { + if (typeof nextReducer !== 'function') { + throw new Error( true ? formatProdErrorMessage(10) : undefined); + } + + currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT. + // Any reducers that existed in both the new and old rootReducer + // will receive the previous state. This effectively populates + // the new state tree with any relevant data from the old one. + + dispatch({ + type: ActionTypes.REPLACE + }); + } + /** + * Interoperability point for observable/reactive libraries. + * @returns {observable} A minimal observable of state changes. + * For more information, see the observable proposal: + * https://github.com/tc39/proposal-observable + */ + + + function observable() { + var _ref; + + var outerSubscribe = subscribe; + return _ref = { + /** + * The minimal observable subscription method. + * @param {Object} observer Any object that can be used as an observer. + * The observer object should have a `next` method. + * @returns {subscription} An object with an `unsubscribe` method that can + * be used to unsubscribe the observable from the store, and prevent further + * emission of values from the observable. + */ + subscribe: function subscribe(observer) { + if (typeof observer !== 'object' || observer === null) { + throw new Error( true ? formatProdErrorMessage(11) : undefined); + } + + function observeState() { + if (observer.next) { + observer.next(getState()); + } + } + + observeState(); + var unsubscribe = outerSubscribe(observeState); + return { + unsubscribe: unsubscribe + }; + } + }, _ref[$$observable] = function () { + return this; + }, _ref; + } // When a store is created, an "INIT" action is dispatched so that every + // reducer returns their initial state. This effectively populates + // the initial state tree. + + + dispatch({ + type: ActionTypes.INIT + }); + return _ref2 = { + dispatch: dispatch, + subscribe: subscribe, + getState: getState, + replaceReducer: replaceReducer + }, _ref2[$$observable] = observable, _ref2; +} +/** + * Creates a Redux store that holds the state tree. + * + * **We recommend using `configureStore` from the + * `@reduxjs/toolkit` package**, which replaces `createStore`: + * **https://redux.js.org/introduction/why-rtk-is-redux-today** + * + * The only way to change the data in the store is to call `dispatch()` on it. + * + * There should only be a single store in your app. To specify how different + * parts of the state tree respond to actions, you may combine several reducers + * into a single reducer function by using `combineReducers`. + * + * @param {Function} reducer A function that returns the next state tree, given + * the current state tree and the action to handle. + * + * @param {any} [preloadedState] The initial state. You may optionally specify it + * to hydrate the state from the server in universal apps, or to restore a + * previously serialized user session. + * If you use `combineReducers` to produce the root reducer function, this must be + * an object with the same shape as `combineReducers` keys. + * + * @param {Function} [enhancer] The store enhancer. You may optionally specify it + * to enhance the store with third-party capabilities such as middleware, + * time travel, persistence, etc. The only store enhancer that ships with Redux + * is `applyMiddleware()`. + * + * @returns {Store} A Redux store that lets you read the state, dispatch actions + * and subscribe to changes. + */ + +var legacy_createStore = redux_createStore; + +/** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ +function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + + + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + } catch (e) {} // eslint-disable-line no-empty + +} + +function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { + var reducerKeys = Object.keys(reducers); + var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; + + if (reducerKeys.length === 0) { + return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; + } + + if (!isPlainObject(inputState)) { + return "The " + argumentName + " has unexpected type of \"" + kindOf(inputState) + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\""); + } + + var unexpectedKeys = Object.keys(inputState).filter(function (key) { + return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; + }); + unexpectedKeys.forEach(function (key) { + unexpectedKeyCache[key] = true; + }); + if (action && action.type === ActionTypes.REPLACE) return; + + if (unexpectedKeys.length > 0) { + return "Unexpected " + (unexpectedKeys.length > 1 ? 'keys' : 'key') + " " + ("\"" + unexpectedKeys.join('", "') + "\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\"" + reducerKeys.join('", "') + "\". Unexpected keys will be ignored."); + } +} + +function assertReducerShape(reducers) { + Object.keys(reducers).forEach(function (key) { + var reducer = reducers[key]; + var initialState = reducer(undefined, { + type: ActionTypes.INIT + }); + + if (typeof initialState === 'undefined') { + throw new Error( true ? formatProdErrorMessage(12) : undefined); + } + + if (typeof reducer(undefined, { + type: ActionTypes.PROBE_UNKNOWN_ACTION() + }) === 'undefined') { + throw new Error( true ? formatProdErrorMessage(13) : undefined); + } + }); +} +/** + * Turns an object whose values are different reducer functions, into a single + * reducer function. It will call every child reducer, and gather their results + * into a single state object, whose keys correspond to the keys of the passed + * reducer functions. + * + * @param {Object} reducers An object whose values correspond to different + * reducer functions that need to be combined into one. One handy way to obtain + * it is to use ES6 `import * as reducers` syntax. The reducers may never return + * undefined for any action. Instead, they should return their initial state + * if the state passed to them was undefined, and the current state for any + * unrecognized action. + * + * @returns {Function} A reducer function that invokes every reducer inside the + * passed object, and builds a state object with the same shape. + */ + + +function combineReducers(reducers) { + var reducerKeys = Object.keys(reducers); + var finalReducers = {}; + + for (var i = 0; i < reducerKeys.length; i++) { + var key = reducerKeys[i]; + + if (false) {} + + if (typeof reducers[key] === 'function') { + finalReducers[key] = reducers[key]; + } + } + + var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same + // keys multiple times. + + var unexpectedKeyCache; + + if (false) {} + + var shapeAssertionError; + + try { + assertReducerShape(finalReducers); + } catch (e) { + shapeAssertionError = e; + } + + return function combination(state, action) { + if (state === void 0) { + state = {}; + } + + if (shapeAssertionError) { + throw shapeAssertionError; + } + + if (false) { var warningMessage; } + + var hasChanged = false; + var nextState = {}; + + for (var _i = 0; _i < finalReducerKeys.length; _i++) { + var _key = finalReducerKeys[_i]; + var reducer = finalReducers[_key]; + var previousStateForKey = state[_key]; + var nextStateForKey = reducer(previousStateForKey, action); + + if (typeof nextStateForKey === 'undefined') { + var actionType = action && action.type; + throw new Error( true ? formatProdErrorMessage(14) : undefined); + } + + nextState[_key] = nextStateForKey; + hasChanged = hasChanged || nextStateForKey !== previousStateForKey; + } + + hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length; + return hasChanged ? nextState : state; + }; +} + +function bindActionCreator(actionCreator, dispatch) { + return function () { + return dispatch(actionCreator.apply(this, arguments)); + }; +} +/** + * Turns an object whose values are action creators, into an object with the + * same keys, but with every function wrapped into a `dispatch` call so they + * may be invoked directly. This is just a convenience method, as you can call + * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. + * + * For convenience, you can also pass an action creator as the first argument, + * and get a dispatch wrapped function in return. + * + * @param {Function|Object} actionCreators An object whose values are action + * creator functions. One handy way to obtain it is to use ES6 `import * as` + * syntax. You may also pass a single function. + * + * @param {Function} dispatch The `dispatch` function available on your Redux + * store. + * + * @returns {Function|Object} The object mimicking the original object, but with + * every action creator wrapped into the `dispatch` call. If you passed a + * function as `actionCreators`, the return value will also be a single + * function. + */ + + +function bindActionCreators(actionCreators, dispatch) { + if (typeof actionCreators === 'function') { + return bindActionCreator(actionCreators, dispatch); + } + + if (typeof actionCreators !== 'object' || actionCreators === null) { + throw new Error( true ? formatProdErrorMessage(16) : undefined); + } + + var boundActionCreators = {}; + + for (var key in actionCreators) { + var actionCreator = actionCreators[key]; + + if (typeof actionCreator === 'function') { + boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); + } + } + + return boundActionCreators; +} + +/** + * Composes single-argument functions from right to left. The rightmost + * function can take multiple arguments as it provides the signature for + * the resulting composite function. + * + * @param {...Function} funcs The functions to compose. + * @returns {Function} A function obtained by composing the argument functions + * from right to left. For example, compose(f, g, h) is identical to doing + * (...args) => f(g(h(...args))). + */ +function compose() { + for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } + + if (funcs.length === 0) { + return function (arg) { + return arg; + }; + } + + if (funcs.length === 1) { + return funcs[0]; + } + + return funcs.reduce(function (a, b) { + return function () { + return a(b.apply(void 0, arguments)); + }; + }); +} + +/** + * Creates a store enhancer that applies middleware to the dispatch method + * of the Redux store. This is handy for a variety of tasks, such as expressing + * asynchronous actions in a concise manner, or logging every action payload. + * + * See `redux-thunk` package as an example of the Redux middleware. + * + * Because middleware is potentially asynchronous, this should be the first + * store enhancer in the composition chain. + * + * Note that each middleware will be given the `dispatch` and `getState` functions + * as named arguments. + * + * @param {...Function} middlewares The middleware chain to be applied. + * @returns {Function} A store enhancer applying the middleware. + */ + +function applyMiddleware() { + for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } + + return function (createStore) { + return function () { + var store = createStore.apply(void 0, arguments); + + var _dispatch = function dispatch() { + throw new Error( true ? formatProdErrorMessage(15) : undefined); + }; + + var middlewareAPI = { + getState: store.getState, + dispatch: function dispatch() { + return _dispatch.apply(void 0, arguments); + } + }; + var chain = middlewares.map(function (middleware) { + return middleware(middlewareAPI); + }); + _dispatch = compose.apply(void 0, chain)(store.dispatch); + return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, store), {}, { + dispatch: _dispatch + }); + }; + }; +} + + + +// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/utils.js +var _extends = Object.assign || 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; }; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var sym = function sym(id) { + return '@@redux-saga/' + id; +}; + +var TASK = /*#__PURE__*/sym('TASK'); +var HELPER = /*#__PURE__*/sym('HELPER'); +var MATCH = /*#__PURE__*/sym('MATCH'); +var CANCEL = /*#__PURE__*/sym('CANCEL_PROMISE'); +var SAGA_ACTION = /*#__PURE__*/sym('SAGA_ACTION'); +var SELF_CANCELLATION = /*#__PURE__*/sym('SELF_CANCELLATION'); +var konst = function konst(v) { + return function () { + return v; + }; +}; +var kTrue = /*#__PURE__*/konst(true); +var kFalse = /*#__PURE__*/konst(false); +var utils_noop = function noop() {}; +var ident = function ident(v) { + return v; +}; + +function check(value, predicate, error) { + if (!predicate(value)) { + utils_log('error', 'uncaught at check', error); + throw new Error(error); + } +} + +var utils_hasOwnProperty = Object.prototype.hasOwnProperty; +function hasOwn(object, property) { + return is.notUndef(object) && utils_hasOwnProperty.call(object, property); +} + +var is = { + undef: function undef(v) { + return v === null || v === undefined; + }, + notUndef: function notUndef(v) { + return v !== null && v !== undefined; + }, + func: function func(f) { + return typeof f === 'function'; + }, + number: function number(n) { + return typeof n === 'number'; + }, + string: function string(s) { + return typeof s === 'string'; + }, + array: Array.isArray, + object: function object(obj) { + return obj && !is.array(obj) && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object'; + }, + promise: function promise(p) { + return p && is.func(p.then); + }, + iterator: function iterator(it) { + return it && is.func(it.next) && is.func(it.throw); + }, + iterable: function iterable(it) { + return it && is.func(Symbol) ? is.func(it[Symbol.iterator]) : is.array(it); + }, + task: function task(t) { + return t && t[TASK]; + }, + observable: function observable(ob) { + return ob && is.func(ob.subscribe); + }, + buffer: function buffer(buf) { + return buf && is.func(buf.isEmpty) && is.func(buf.take) && is.func(buf.put); + }, + pattern: function pattern(pat) { + return pat && (is.string(pat) || (typeof pat === 'undefined' ? 'undefined' : _typeof(pat)) === 'symbol' || is.func(pat) || is.array(pat)); + }, + channel: function channel(ch) { + return ch && is.func(ch.take) && is.func(ch.close); + }, + helper: function helper(it) { + return it && it[HELPER]; + }, + stringableFunc: function stringableFunc(f) { + return is.func(f) && hasOwn(f, 'toString'); + } +}; + +var object = { + assign: function assign(target, source) { + for (var i in source) { + if (hasOwn(source, i)) { + target[i] = source[i]; + } + } + } +}; + +function remove(array, item) { + var index = array.indexOf(item); + if (index >= 0) { + array.splice(index, 1); + } +} + +var array = { + from: function from(obj) { + var arr = Array(obj.length); + for (var i in obj) { + if (hasOwn(obj, i)) { + arr[i] = obj[i]; + } + } + return arr; + } +}; + +function deferred() { + var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var def = _extends({}, props); + var promise = new Promise(function (resolve, reject) { + def.resolve = resolve; + def.reject = reject; + }); + def.promise = promise; + return def; +} + +function arrayOfDeffered(length) { + var arr = []; + for (var i = 0; i < length; i++) { + arr.push(deferred()); + } + return arr; +} + +function utils_delay(ms) { + var val = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + var timeoutId = void 0; + var promise = new Promise(function (resolve) { + timeoutId = setTimeout(function () { + return resolve(val); + }, ms); + }); + + promise[CANCEL] = function () { + return clearTimeout(timeoutId); + }; + + return promise; +} + +function createMockTask() { + var _ref; + + var running = true; + var _result = void 0, + _error = void 0; + + return _ref = {}, _ref[TASK] = true, _ref.isRunning = function isRunning() { + return running; + }, _ref.result = function result() { + return _result; + }, _ref.error = function error() { + return _error; + }, _ref.setRunning = function setRunning(b) { + return running = b; + }, _ref.setResult = function setResult(r) { + return _result = r; + }, _ref.setError = function setError(e) { + return _error = e; + }, _ref; +} + +function autoInc() { + var seed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + + return function () { + return ++seed; + }; +} + +var uid = /*#__PURE__*/autoInc(); + +var kThrow = function kThrow(err) { + throw err; +}; +var kReturn = function kReturn(value) { + return { value: value, done: true }; +}; +function makeIterator(next) { + var thro = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : kThrow; + var name = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; + var isHelper = arguments[3]; + + var iterator = { name: name, next: next, throw: thro, return: kReturn }; + + if (isHelper) { + iterator[HELPER] = true; + } + if (typeof Symbol !== 'undefined') { + iterator[Symbol.iterator] = function () { + return iterator; + }; + } + return iterator; +} + +/** + Print error in a useful way whether in a browser environment + (with expandable error stack traces), or in a node.js environment + (text-only log output) + **/ +function utils_log(level, message) { + var error = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; + + /*eslint-disable no-console*/ + if (typeof window === 'undefined') { + console.log('redux-saga ' + level + ': ' + message + '\n' + (error && error.stack || error)); + } else { + console[level](message, error); + } +} + +function deprecate(fn, deprecationWarning) { + return function () { + if (false) {} + return fn.apply(undefined, arguments); + }; +} + +var updateIncentive = function updateIncentive(deprecated, preferred) { + return deprecated + ' has been deprecated in favor of ' + preferred + ', please update your code'; +}; + +var internalErr = function internalErr(err) { + return new Error('\n redux-saga: Error checking hooks detected an inconsistent state. This is likely a bug\n in redux-saga code and not yours. Thanks for reporting this in the project\'s github repo.\n Error: ' + err + '\n'); +}; + +var createSetContextWarning = function createSetContextWarning(ctx, props) { + return (ctx ? ctx + '.' : '') + 'setContext(props): argument ' + props + ' is not a plain object'; +}; + +var wrapSagaDispatch = function wrapSagaDispatch(dispatch) { + return function (action) { + return dispatch(Object.defineProperty(action, SAGA_ACTION, { value: true })); + }; +}; + +var cloneableGenerator = function cloneableGenerator(generatorFunc) { + return function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + var history = []; + var gen = generatorFunc.apply(undefined, args); + return { + next: function next(arg) { + history.push(arg); + return gen.next(arg); + }, + clone: function clone() { + var clonedGen = cloneableGenerator(generatorFunc).apply(undefined, args); + history.forEach(function (arg) { + return clonedGen.next(arg); + }); + return clonedGen; + }, + return: function _return(value) { + return gen.return(value); + }, + throw: function _throw(exception) { + return gen.throw(exception); + } + }; + }; +}; +// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/buffers.js + + +var BUFFER_OVERFLOW = "Channel's Buffer overflow!"; + +var ON_OVERFLOW_THROW = 1; +var ON_OVERFLOW_DROP = 2; +var ON_OVERFLOW_SLIDE = 3; +var ON_OVERFLOW_EXPAND = 4; + +var zeroBuffer = { isEmpty: kTrue, put: utils_noop, take: utils_noop }; + +function ringBuffer() { + var limit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10; + var overflowAction = arguments[1]; + + var arr = new Array(limit); + var length = 0; + var pushIndex = 0; + var popIndex = 0; + + var push = function push(it) { + arr[pushIndex] = it; + pushIndex = (pushIndex + 1) % limit; + length++; + }; + + var take = function take() { + if (length != 0) { + var it = arr[popIndex]; + arr[popIndex] = null; + length--; + popIndex = (popIndex + 1) % limit; + return it; + } + }; + + var flush = function flush() { + var items = []; + while (length) { + items.push(take()); + } + return items; + }; + + return { + isEmpty: function isEmpty() { + return length == 0; + }, + put: function put(it) { + if (length < limit) { + push(it); + } else { + var doubledLimit = void 0; + switch (overflowAction) { + case ON_OVERFLOW_THROW: + throw new Error(BUFFER_OVERFLOW); + case ON_OVERFLOW_SLIDE: + arr[pushIndex] = it; + pushIndex = (pushIndex + 1) % limit; + popIndex = pushIndex; + break; + case ON_OVERFLOW_EXPAND: + doubledLimit = 2 * limit; + + arr = flush(); + + length = arr.length; + pushIndex = arr.length; + popIndex = 0; + + arr.length = doubledLimit; + limit = doubledLimit; + + push(it); + break; + default: + // DROP + } + } + }, + take: take, + flush: flush + }; +} + +var buffers = { + none: function none() { + return zeroBuffer; + }, + fixed: function fixed(limit) { + return ringBuffer(limit, ON_OVERFLOW_THROW); + }, + dropping: function dropping(limit) { + return ringBuffer(limit, ON_OVERFLOW_DROP); + }, + sliding: function sliding(limit) { + return ringBuffer(limit, ON_OVERFLOW_SLIDE); + }, + expanding: function expanding(initialSize) { + return ringBuffer(initialSize, ON_OVERFLOW_EXPAND); + } +}; +// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/scheduler.js +var queue = []; +/** + Variable to hold a counting semaphore + - Incrementing adds a lock and puts the scheduler in a `suspended` state (if it's not + already suspended) + - Decrementing releases a lock. Zero locks puts the scheduler in a `released` state. This + triggers flushing the queued tasks. +**/ +var semaphore = 0; + +/** + Executes a task 'atomically'. Tasks scheduled during this execution will be queued + and flushed after this task has finished (assuming the scheduler endup in a released + state). +**/ +function exec(task) { + try { + suspend(); + task(); + } finally { + release(); + } +} + +/** + Executes or queues a task depending on the state of the scheduler (`suspended` or `released`) +**/ +function asap(task) { + queue.push(task); + + if (!semaphore) { + suspend(); + scheduler_flush(); + } +} + +/** + Puts the scheduler in a `suspended` state. Scheduled tasks will be queued until the + scheduler is released. +**/ +function suspend() { + semaphore++; +} + +/** + Puts the scheduler in a `released` state. +**/ +function release() { + semaphore--; +} + +/** + Releases the current lock. Executes all queued tasks if the scheduler is in the released state. +**/ +function scheduler_flush() { + release(); + + var task = void 0; + while (!semaphore && (task = queue.shift()) !== undefined) { + exec(task); + } +} +// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/channel.js +var channel_extends = Object.assign || 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; }; + + + + + +var CHANNEL_END_TYPE = '@@redux-saga/CHANNEL_END'; +var END = { type: CHANNEL_END_TYPE }; +var isEnd = function isEnd(a) { + return a && a.type === CHANNEL_END_TYPE; +}; + +function emitter() { + var subscribers = []; + + function subscribe(sub) { + subscribers.push(sub); + return function () { + return remove(subscribers, sub); + }; + } + + function emit(item) { + var arr = subscribers.slice(); + for (var i = 0, len = arr.length; i < len; i++) { + arr[i](item); + } + } + + return { + subscribe: subscribe, + emit: emit + }; +} + +var INVALID_BUFFER = 'invalid buffer passed to channel factory function'; +var UNDEFINED_INPUT_ERROR = 'Saga was provided with an undefined action'; + +if (false) {} + +function channel_channel() { + var buffer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : buffers.fixed(); + + var closed = false; + var takers = []; + + check(buffer, is.buffer, INVALID_BUFFER); + + function checkForbiddenStates() { + if (closed && takers.length) { + throw internalErr('Cannot have a closed channel with pending takers'); + } + if (takers.length && !buffer.isEmpty()) { + throw internalErr('Cannot have pending takers with non empty buffer'); + } + } + + function put(input) { + checkForbiddenStates(); + check(input, is.notUndef, UNDEFINED_INPUT_ERROR); + if (closed) { + return; + } + if (!takers.length) { + return buffer.put(input); + } + for (var i = 0; i < takers.length; i++) { + var cb = takers[i]; + if (!cb[MATCH] || cb[MATCH](input)) { + takers.splice(i, 1); + return cb(input); + } + } + } + + function take(cb) { + checkForbiddenStates(); + check(cb, is.func, "channel.take's callback must be a function"); + + if (closed && buffer.isEmpty()) { + cb(END); + } else if (!buffer.isEmpty()) { + cb(buffer.take()); + } else { + takers.push(cb); + cb.cancel = function () { + return remove(takers, cb); + }; + } + } + + function flush(cb) { + checkForbiddenStates(); // TODO: check if some new state should be forbidden now + check(cb, is.func, "channel.flush' callback must be a function"); + if (closed && buffer.isEmpty()) { + cb(END); + return; + } + cb(buffer.flush()); + } + + function close() { + checkForbiddenStates(); + if (!closed) { + closed = true; + if (takers.length) { + var arr = takers; + takers = []; + for (var i = 0, len = arr.length; i < len; i++) { + arr[i](END); + } + } + } + } + + return { + take: take, + put: put, + flush: flush, + close: close, + get __takers__() { + return takers; + }, + get __closed__() { + return closed; + } + }; +} + +function eventChannel(subscribe) { + var buffer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : buffers.none(); + var matcher = arguments[2]; + + /** + should be if(typeof matcher !== undefined) instead? + see PR #273 for a background discussion + **/ + if (arguments.length > 2) { + check(matcher, is.func, 'Invalid match function passed to eventChannel'); + } + + var chan = channel_channel(buffer); + var close = function close() { + if (!chan.__closed__) { + if (unsubscribe) { + unsubscribe(); + } + chan.close(); + } + }; + var unsubscribe = subscribe(function (input) { + if (isEnd(input)) { + close(); + return; + } + if (matcher && !matcher(input)) { + return; + } + chan.put(input); + }); + if (chan.__closed__) { + unsubscribe(); + } + + if (!is.func(unsubscribe)) { + throw new Error('in eventChannel: subscribe should return a function to unsubscribe'); + } + + return { + take: chan.take, + flush: chan.flush, + close: close + }; +} + +function channel_stdChannel(subscribe) { + var chan = eventChannel(function (cb) { + return subscribe(function (input) { + if (input[SAGA_ACTION]) { + cb(input); + return; + } + asap(function () { + return cb(input); + }); + }); + }); + + return channel_extends({}, chan, { + take: function take(cb, matcher) { + if (arguments.length > 1) { + check(matcher, is.func, "channel.take's matcher argument must be a function"); + cb[MATCH] = matcher; + } + chan.take(cb); + } + }); +} +// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/io.js + + +var IO = /*#__PURE__*/sym('IO'); +var TAKE = 'TAKE'; +var PUT = 'PUT'; +var ALL = 'ALL'; +var RACE = 'RACE'; +var CALL = 'CALL'; +var CPS = 'CPS'; +var FORK = 'FORK'; +var JOIN = 'JOIN'; +var io_CANCEL = 'CANCEL'; +var SELECT = 'SELECT'; +var ACTION_CHANNEL = 'ACTION_CHANNEL'; +var CANCELLED = 'CANCELLED'; +var FLUSH = 'FLUSH'; +var GET_CONTEXT = 'GET_CONTEXT'; +var SET_CONTEXT = 'SET_CONTEXT'; + +var TEST_HINT = '\n(HINT: if you are getting this errors in tests, consider using createMockTask from redux-saga/utils)'; + +var io_effect = function effect(type, payload) { + var _ref; + + return _ref = {}, _ref[IO] = true, _ref[type] = payload, _ref; +}; + +var io_detach = function detach(eff) { + check(asEffect.fork(eff), is.object, 'detach(eff): argument must be a fork effect'); + eff[FORK].detached = true; + return eff; +}; + +function io_take() { + var patternOrChannel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '*'; + + if (arguments.length) { + check(arguments[0], is.notUndef, 'take(patternOrChannel): patternOrChannel is undefined'); + } + if (is.pattern(patternOrChannel)) { + return io_effect(TAKE, { pattern: patternOrChannel }); + } + if (is.channel(patternOrChannel)) { + return io_effect(TAKE, { channel: patternOrChannel }); + } + throw new Error('take(patternOrChannel): argument ' + String(patternOrChannel) + ' is not valid channel or a valid pattern'); +} + +io_take.maybe = function () { + var eff = io_take.apply(undefined, arguments); + eff[TAKE].maybe = true; + return eff; +}; + +var takem = /*#__PURE__*/deprecate(io_take.maybe, /*#__PURE__*/updateIncentive('takem', 'take.maybe')); + +function io_put(channel, action) { + if (arguments.length > 1) { + check(channel, is.notUndef, 'put(channel, action): argument channel is undefined'); + check(channel, is.channel, 'put(channel, action): argument ' + channel + ' is not a valid channel'); + check(action, is.notUndef, 'put(channel, action): argument action is undefined'); + } else { + check(channel, is.notUndef, 'put(action): argument action is undefined'); + action = channel; + channel = null; + } + return io_effect(PUT, { channel: channel, action: action }); +} + +io_put.resolve = function () { + var eff = io_put.apply(undefined, arguments); + eff[PUT].resolve = true; + return eff; +}; + +io_put.sync = /*#__PURE__*/deprecate(io_put.resolve, /*#__PURE__*/updateIncentive('put.sync', 'put.resolve')); + +function io_all(effects) { + return io_effect(ALL, effects); +} + +function io_race(effects) { + return io_effect(RACE, effects); +} + +function getFnCallDesc(meth, fn, args) { + check(fn, is.notUndef, meth + ': argument fn is undefined'); + + var context = null; + if (is.array(fn)) { + var _fn = fn; + context = _fn[0]; + fn = _fn[1]; + } else if (fn.fn) { + var _fn2 = fn; + context = _fn2.context; + fn = _fn2.fn; + } + if (context && is.string(fn) && is.func(context[fn])) { + fn = context[fn]; + } + check(fn, is.func, meth + ': argument ' + fn + ' is not a function'); + + return { context: context, fn: fn, args: args }; +} + +function io_call(fn) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + return io_effect(CALL, getFnCallDesc('call', fn, args)); +} + +function io_apply(context, fn) { + var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; + + return io_effect(CALL, getFnCallDesc('apply', { context: context, fn: fn }, args)); +} + +function cps(fn) { + for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + + return io_effect(CPS, getFnCallDesc('cps', fn, args)); +} + +function fork(fn) { + for (var _len3 = arguments.length, args = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { + args[_key3 - 1] = arguments[_key3]; + } + + return io_effect(FORK, getFnCallDesc('fork', fn, args)); +} + +function spawn(fn) { + for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { + args[_key4 - 1] = arguments[_key4]; + } + + return io_detach(fork.apply(undefined, [fn].concat(args))); +} + +function join() { + for (var _len5 = arguments.length, tasks = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { + tasks[_key5] = arguments[_key5]; + } + + if (tasks.length > 1) { + return io_all(tasks.map(function (t) { + return join(t); + })); + } + var task = tasks[0]; + check(task, is.notUndef, 'join(task): argument task is undefined'); + check(task, is.task, 'join(task): argument ' + task + ' is not a valid Task object ' + TEST_HINT); + return io_effect(JOIN, task); +} + +function io_cancel() { + for (var _len6 = arguments.length, tasks = Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { + tasks[_key6] = arguments[_key6]; + } + + if (tasks.length > 1) { + return io_all(tasks.map(function (t) { + return io_cancel(t); + })); + } + var task = tasks[0]; + if (tasks.length === 1) { + check(task, is.notUndef, 'cancel(task): argument task is undefined'); + check(task, is.task, 'cancel(task): argument ' + task + ' is not a valid Task object ' + TEST_HINT); + } + return io_effect(io_CANCEL, task || SELF_CANCELLATION); +} + +function io_select(selector) { + for (var _len7 = arguments.length, args = Array(_len7 > 1 ? _len7 - 1 : 0), _key7 = 1; _key7 < _len7; _key7++) { + args[_key7 - 1] = arguments[_key7]; + } + + if (arguments.length === 0) { + selector = ident; + } else { + check(selector, is.notUndef, 'select(selector,[...]): argument selector is undefined'); + check(selector, is.func, 'select(selector,[...]): argument ' + selector + ' is not a function'); + } + return io_effect(SELECT, { selector: selector, args: args }); +} + +/** + channel(pattern, [buffer]) => creates an event channel for store actions +**/ +function actionChannel(pattern, buffer) { + check(pattern, is.notUndef, 'actionChannel(pattern,...): argument pattern is undefined'); + if (arguments.length > 1) { + check(buffer, is.notUndef, 'actionChannel(pattern, buffer): argument buffer is undefined'); + check(buffer, is.buffer, 'actionChannel(pattern, buffer): argument ' + buffer + ' is not a valid buffer'); + } + return io_effect(ACTION_CHANNEL, { pattern: pattern, buffer: buffer }); +} + +function cancelled() { + return io_effect(CANCELLED, {}); +} + +function io_flush(channel) { + check(channel, is.channel, 'flush(channel): argument ' + channel + ' is not valid channel'); + return io_effect(FLUSH, channel); +} + +function getContext(prop) { + check(prop, is.string, 'getContext(prop): argument ' + prop + ' is not a string'); + return io_effect(GET_CONTEXT, prop); +} + +function io_setContext(props) { + check(props, is.object, createSetContextWarning(null, props)); + return io_effect(SET_CONTEXT, props); +} + +var createAsEffectType = function createAsEffectType(type) { + return function (effect) { + return effect && effect[IO] && effect[type]; + }; +}; + +var asEffect = { + take: /*#__PURE__*/createAsEffectType(TAKE), + put: /*#__PURE__*/createAsEffectType(PUT), + all: /*#__PURE__*/createAsEffectType(ALL), + race: /*#__PURE__*/createAsEffectType(RACE), + call: /*#__PURE__*/createAsEffectType(CALL), + cps: /*#__PURE__*/createAsEffectType(CPS), + fork: /*#__PURE__*/createAsEffectType(FORK), + join: /*#__PURE__*/createAsEffectType(JOIN), + cancel: /*#__PURE__*/createAsEffectType(io_CANCEL), + select: /*#__PURE__*/createAsEffectType(SELECT), + actionChannel: /*#__PURE__*/createAsEffectType(ACTION_CHANNEL), + cancelled: /*#__PURE__*/createAsEffectType(CANCELLED), + flush: /*#__PURE__*/createAsEffectType(FLUSH), + getContext: /*#__PURE__*/createAsEffectType(GET_CONTEXT), + setContext: /*#__PURE__*/createAsEffectType(SET_CONTEXT) +}; +// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/proc.js +var proc_extends = Object.assign || 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; }; + +var proc_typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +function _defineEnumerableProperties(obj, descs) { for (var key in descs) { var desc = descs[key]; desc.configurable = desc.enumerable = true; if ("value" in desc) desc.writable = true; Object.defineProperty(obj, key, desc); } return obj; } + + + + + + + +var NOT_ITERATOR_ERROR = 'proc first argument (Saga function result) must be an iterator'; + +var CHANNEL_END = { + toString: function toString() { + return '@@redux-saga/CHANNEL_END'; + } +}; +var TASK_CANCEL = { + toString: function toString() { + return '@@redux-saga/TASK_CANCEL'; + } +}; + +var matchers = { + wildcard: function wildcard() { + return kTrue; + }, + default: function _default(pattern) { + return (typeof pattern === 'undefined' ? 'undefined' : proc_typeof(pattern)) === 'symbol' ? function (input) { + return input.type === pattern; + } : function (input) { + return input.type === String(pattern); + }; + }, + array: function array(patterns) { + return function (input) { + return patterns.some(function (p) { + return proc_matcher(p)(input); + }); + }; + }, + predicate: function predicate(_predicate) { + return function (input) { + return _predicate(input); + }; + } +}; + +function proc_matcher(pattern) { + // prettier-ignore + return (pattern === '*' ? matchers.wildcard : is.array(pattern) ? matchers.array : is.stringableFunc(pattern) ? matchers.default : is.func(pattern) ? matchers.predicate : matchers.default)(pattern); +} + +/** + Used to track a parent task and its forks + In the new fork model, forked tasks are attached by default to their parent + We model this using the concept of Parent task && main Task + main task is the main flow of the current Generator, the parent tasks is the + aggregation of the main tasks + all its forked tasks. + Thus the whole model represents an execution tree with multiple branches (vs the + linear execution tree in sequential (non parallel) programming) + + A parent tasks has the following semantics + - It completes if all its forks either complete or all cancelled + - If it's cancelled, all forks are cancelled as well + - It aborts if any uncaught error bubbles up from forks + - If it completes, the return value is the one returned by the main task +**/ +function forkQueue(name, mainTask, cb) { + var tasks = [], + result = void 0, + completed = false; + addTask(mainTask); + + function abort(err) { + cancelAll(); + cb(err, true); + } + + function addTask(task) { + tasks.push(task); + task.cont = function (res, isErr) { + if (completed) { + return; + } + + remove(tasks, task); + task.cont = utils_noop; + if (isErr) { + abort(res); + } else { + if (task === mainTask) { + result = res; + } + if (!tasks.length) { + completed = true; + cb(result); + } + } + }; + // task.cont.cancel = task.cancel + } + + function cancelAll() { + if (completed) { + return; + } + completed = true; + tasks.forEach(function (t) { + t.cont = utils_noop; + t.cancel(); + }); + tasks = []; + } + + return { + addTask: addTask, + cancelAll: cancelAll, + abort: abort, + getTasks: function getTasks() { + return tasks; + }, + taskNames: function taskNames() { + return tasks.map(function (t) { + return t.name; + }); + } + }; +} + +function createTaskIterator(_ref) { + var context = _ref.context, + fn = _ref.fn, + args = _ref.args; + + if (is.iterator(fn)) { + return fn; + } + + // catch synchronous failures; see #152 and #441 + var result = void 0, + error = void 0; + try { + result = fn.apply(context, args); + } catch (err) { + error = err; + } + + // i.e. a generator function returns an iterator + if (is.iterator(result)) { + return result; + } + + // do not bubble up synchronous failures for detached forks + // instead create a failed task. See #152 and #441 + return error ? makeIterator(function () { + throw error; + }) : makeIterator(function () { + var pc = void 0; + var eff = { done: false, value: result }; + var ret = function ret(value) { + return { done: true, value: value }; + }; + return function (arg) { + if (!pc) { + pc = true; + return eff; + } else { + return ret(arg); + } + }; + }()); +} + +var wrapHelper = function wrapHelper(helper) { + return { fn: helper }; +}; + +function proc(iterator) { + var subscribe = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () { + return utils_noop; + }; + var dispatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : utils_noop; + var getState = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : utils_noop; + var parentContext = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; + var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {}; + var parentEffectId = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 0; + var name = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 'anonymous'; + var cont = arguments[8]; + + check(iterator, is.iterator, NOT_ITERATOR_ERROR); + + var effectsString = '[...effects]'; + var runParallelEffect = deprecate(runAllEffect, updateIncentive(effectsString, 'all(' + effectsString + ')')); + + var sagaMonitor = options.sagaMonitor, + logger = options.logger, + onError = options.onError; + + var log = logger || utils_log; + var logError = function logError(err) { + var message = err.sagaStack; + + if (!message && err.stack) { + message = err.stack.split('\n')[0].indexOf(err.message) !== -1 ? err.stack : 'Error: ' + err.message + '\n' + err.stack; + } + + log('error', 'uncaught at ' + name, message || err.message || err); + }; + var stdChannel = channel_stdChannel(subscribe); + var taskContext = Object.create(parentContext); + /** + Tracks the current effect cancellation + Each time the generator progresses. calling runEffect will set a new value + on it. It allows propagating cancellation to child effects + **/ + next.cancel = utils_noop; + + /** + Creates a new task descriptor for this generator, We'll also create a main task + to track the main flow (besides other forked tasks) + **/ + var task = newTask(parentEffectId, name, iterator, cont); + var mainTask = { name: name, cancel: cancelMain, isRunning: true }; + var taskQueue = forkQueue(name, mainTask, end); + + /** + cancellation of the main task. We'll simply resume the Generator with a Cancel + **/ + function cancelMain() { + if (mainTask.isRunning && !mainTask.isCancelled) { + mainTask.isCancelled = true; + next(TASK_CANCEL); + } + } + + /** + This may be called by a parent generator to trigger/propagate cancellation + cancel all pending tasks (including the main task), then end the current task. + Cancellation propagates down to the whole execution tree holded by this Parent task + It's also propagated to all joiners of this task and their execution tree/joiners + Cancellation is noop for terminated/Cancelled tasks tasks + **/ + function cancel() { + /** + We need to check both Running and Cancelled status + Tasks can be Cancelled but still Running + **/ + if (iterator._isRunning && !iterator._isCancelled) { + iterator._isCancelled = true; + taskQueue.cancelAll(); + /** + Ending with a Never result will propagate the Cancellation to all joiners + **/ + end(TASK_CANCEL); + } + } + /** + attaches cancellation logic to this task's continuation + this will permit cancellation to propagate down the call chain + **/ + cont && (cont.cancel = cancel); + + // tracks the running status + iterator._isRunning = true; + + // kicks up the generator + next(); + + // then return the task descriptor to the caller + return task; + + /** + This is the generator driver + It's a recursive async/continuation function which calls itself + until the generator terminates or throws + **/ + function next(arg, isErr) { + // Preventive measure. If we end up here, then there is really something wrong + if (!mainTask.isRunning) { + throw new Error('Trying to resume an already finished generator'); + } + + try { + var result = void 0; + if (isErr) { + result = iterator.throw(arg); + } else if (arg === TASK_CANCEL) { + /** + getting TASK_CANCEL automatically cancels the main task + We can get this value here + - By cancelling the parent task manually + - By joining a Cancelled task + **/ + mainTask.isCancelled = true; + /** + Cancels the current effect; this will propagate the cancellation down to any called tasks + **/ + next.cancel(); + /** + If this Generator has a `return` method then invokes it + This will jump to the finally block + **/ + result = is.func(iterator.return) ? iterator.return(TASK_CANCEL) : { done: true, value: TASK_CANCEL }; + } else if (arg === CHANNEL_END) { + // We get CHANNEL_END by taking from a channel that ended using `take` (and not `takem` used to trap End of channels) + result = is.func(iterator.return) ? iterator.return() : { done: true }; + } else { + result = iterator.next(arg); + } + + if (!result.done) { + runEffect(result.value, parentEffectId, '', next); + } else { + /** + This Generator has ended, terminate the main task and notify the fork queue + **/ + mainTask.isMainRunning = false; + mainTask.cont && mainTask.cont(result.value); + } + } catch (error) { + if (mainTask.isCancelled) { + logError(error); + } + mainTask.isMainRunning = false; + mainTask.cont(error, true); + } + } + + function end(result, isErr) { + iterator._isRunning = false; + stdChannel.close(); + if (!isErr) { + iterator._result = result; + iterator._deferredEnd && iterator._deferredEnd.resolve(result); + } else { + if (result instanceof Error) { + Object.defineProperty(result, 'sagaStack', { + value: 'at ' + name + ' \n ' + (result.sagaStack || result.stack), + configurable: true + }); + } + if (!task.cont) { + if (result instanceof Error && onError) { + onError(result); + } else { + logError(result); + } + } + iterator._error = result; + iterator._isAborted = true; + iterator._deferredEnd && iterator._deferredEnd.reject(result); + } + task.cont && task.cont(result, isErr); + task.joiners.forEach(function (j) { + return j.cb(result, isErr); + }); + task.joiners = null; + } + + function runEffect(effect, parentEffectId) { + var label = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; + var cb = arguments[3]; + + var effectId = uid(); + sagaMonitor && sagaMonitor.effectTriggered({ effectId: effectId, parentEffectId: parentEffectId, label: label, effect: effect }); + + /** + completion callback and cancel callback are mutually exclusive + We can't cancel an already completed effect + And We can't complete an already cancelled effectId + **/ + var effectSettled = void 0; + + // Completion callback passed to the appropriate effect runner + function currCb(res, isErr) { + if (effectSettled) { + return; + } + + effectSettled = true; + cb.cancel = utils_noop; // defensive measure + if (sagaMonitor) { + isErr ? sagaMonitor.effectRejected(effectId, res) : sagaMonitor.effectResolved(effectId, res); + } + cb(res, isErr); + } + // tracks down the current cancel + currCb.cancel = utils_noop; + + // setup cancellation logic on the parent cb + cb.cancel = function () { + // prevents cancelling an already completed effect + if (effectSettled) { + return; + } + + effectSettled = true; + /** + propagates cancel downward + catch uncaught cancellations errors; since we can no longer call the completion + callback, log errors raised during cancellations into the console + **/ + try { + currCb.cancel(); + } catch (err) { + logError(err); + } + currCb.cancel = utils_noop; // defensive measure + + sagaMonitor && sagaMonitor.effectCancelled(effectId); + }; + + /** + each effect runner must attach its own logic of cancellation to the provided callback + it allows this generator to propagate cancellation downward. + ATTENTION! effect runners must setup the cancel logic by setting cb.cancel = [cancelMethod] + And the setup must occur before calling the callback + This is a sort of inversion of control: called async functions are responsible + for completing the flow by calling the provided continuation; while caller functions + are responsible for aborting the current flow by calling the attached cancel function + Library users can attach their own cancellation logic to promises by defining a + promise[CANCEL] method in their returned promises + ATTENTION! calling cancel must have no effect on an already completed or cancelled effect + **/ + var data = void 0; + // prettier-ignore + return ( + // Non declarative effect + is.promise(effect) ? resolvePromise(effect, currCb) : is.helper(effect) ? runForkEffect(wrapHelper(effect), effectId, currCb) : is.iterator(effect) ? resolveIterator(effect, effectId, name, currCb) + + // declarative effects + : is.array(effect) ? runParallelEffect(effect, effectId, currCb) : (data = asEffect.take(effect)) ? runTakeEffect(data, currCb) : (data = asEffect.put(effect)) ? runPutEffect(data, currCb) : (data = asEffect.all(effect)) ? runAllEffect(data, effectId, currCb) : (data = asEffect.race(effect)) ? runRaceEffect(data, effectId, currCb) : (data = asEffect.call(effect)) ? runCallEffect(data, effectId, currCb) : (data = asEffect.cps(effect)) ? runCPSEffect(data, currCb) : (data = asEffect.fork(effect)) ? runForkEffect(data, effectId, currCb) : (data = asEffect.join(effect)) ? runJoinEffect(data, currCb) : (data = asEffect.cancel(effect)) ? runCancelEffect(data, currCb) : (data = asEffect.select(effect)) ? runSelectEffect(data, currCb) : (data = asEffect.actionChannel(effect)) ? runChannelEffect(data, currCb) : (data = asEffect.flush(effect)) ? runFlushEffect(data, currCb) : (data = asEffect.cancelled(effect)) ? runCancelledEffect(data, currCb) : (data = asEffect.getContext(effect)) ? runGetContextEffect(data, currCb) : (data = asEffect.setContext(effect)) ? runSetContextEffect(data, currCb) : /* anything else returned as is */currCb(effect) + ); + } + + function resolvePromise(promise, cb) { + var cancelPromise = promise[CANCEL]; + if (is.func(cancelPromise)) { + cb.cancel = cancelPromise; + } else if (is.func(promise.abort)) { + cb.cancel = function () { + return promise.abort(); + }; + // TODO: add support for the fetch API, whenever they get around to + // adding cancel support + } + promise.then(cb, function (error) { + return cb(error, true); + }); + } + + function resolveIterator(iterator, effectId, name, cb) { + proc(iterator, subscribe, dispatch, getState, taskContext, options, effectId, name, cb); + } + + function runTakeEffect(_ref2, cb) { + var channel = _ref2.channel, + pattern = _ref2.pattern, + maybe = _ref2.maybe; + + channel = channel || stdChannel; + var takeCb = function takeCb(inp) { + return inp instanceof Error ? cb(inp, true) : isEnd(inp) && !maybe ? cb(CHANNEL_END) : cb(inp); + }; + try { + channel.take(takeCb, proc_matcher(pattern)); + } catch (err) { + return cb(err, true); + } + cb.cancel = takeCb.cancel; + } + + function runPutEffect(_ref3, cb) { + var channel = _ref3.channel, + action = _ref3.action, + resolve = _ref3.resolve; + + /** + Schedule the put in case another saga is holding a lock. + The put will be executed atomically. ie nested puts will execute after + this put has terminated. + **/ + asap(function () { + var result = void 0; + try { + result = (channel ? channel.put : dispatch)(action); + } catch (error) { + // If we have a channel or `put.resolve` was used then bubble up the error. + if (channel || resolve) return cb(error, true); + logError(error); + } + + if (resolve && is.promise(result)) { + resolvePromise(result, cb); + } else { + return cb(result); + } + }); + // Put effects are non cancellables + } + + function runCallEffect(_ref4, effectId, cb) { + var context = _ref4.context, + fn = _ref4.fn, + args = _ref4.args; + + var result = void 0; + // catch synchronous failures; see #152 + try { + result = fn.apply(context, args); + } catch (error) { + return cb(error, true); + } + return is.promise(result) ? resolvePromise(result, cb) : is.iterator(result) ? resolveIterator(result, effectId, fn.name, cb) : cb(result); + } + + function runCPSEffect(_ref5, cb) { + var context = _ref5.context, + fn = _ref5.fn, + args = _ref5.args; + + // CPS (ie node style functions) can define their own cancellation logic + // by setting cancel field on the cb + + // catch synchronous failures; see #152 + try { + var cpsCb = function cpsCb(err, res) { + return is.undef(err) ? cb(res) : cb(err, true); + }; + fn.apply(context, args.concat(cpsCb)); + if (cpsCb.cancel) { + cb.cancel = function () { + return cpsCb.cancel(); + }; + } + } catch (error) { + return cb(error, true); + } + } + + function runForkEffect(_ref6, effectId, cb) { + var context = _ref6.context, + fn = _ref6.fn, + args = _ref6.args, + detached = _ref6.detached; + + var taskIterator = createTaskIterator({ context: context, fn: fn, args: args }); + + try { + suspend(); + var _task = proc(taskIterator, subscribe, dispatch, getState, taskContext, options, effectId, fn.name, detached ? null : utils_noop); + + if (detached) { + cb(_task); + } else { + if (taskIterator._isRunning) { + taskQueue.addTask(_task); + cb(_task); + } else if (taskIterator._error) { + taskQueue.abort(taskIterator._error); + } else { + cb(_task); + } + } + } finally { + scheduler_flush(); + } + // Fork effects are non cancellables + } + + function runJoinEffect(t, cb) { + if (t.isRunning()) { + var joiner = { task: task, cb: cb }; + cb.cancel = function () { + return remove(t.joiners, joiner); + }; + t.joiners.push(joiner); + } else { + t.isAborted() ? cb(t.error(), true) : cb(t.result()); + } + } + + function runCancelEffect(taskToCancel, cb) { + if (taskToCancel === SELF_CANCELLATION) { + taskToCancel = task; + } + if (taskToCancel.isRunning()) { + taskToCancel.cancel(); + } + cb(); + // cancel effects are non cancellables + } + + function runAllEffect(effects, effectId, cb) { + var keys = Object.keys(effects); + + if (!keys.length) { + return cb(is.array(effects) ? [] : {}); + } + + var completedCount = 0; + var completed = void 0; + var results = {}; + var childCbs = {}; + + function checkEffectEnd() { + if (completedCount === keys.length) { + completed = true; + cb(is.array(effects) ? array.from(proc_extends({}, results, { length: keys.length })) : results); + } + } + + keys.forEach(function (key) { + var chCbAtKey = function chCbAtKey(res, isErr) { + if (completed) { + return; + } + if (isErr || isEnd(res) || res === CHANNEL_END || res === TASK_CANCEL) { + cb.cancel(); + cb(res, isErr); + } else { + results[key] = res; + completedCount++; + checkEffectEnd(); + } + }; + chCbAtKey.cancel = utils_noop; + childCbs[key] = chCbAtKey; + }); + + cb.cancel = function () { + if (!completed) { + completed = true; + keys.forEach(function (key) { + return childCbs[key].cancel(); + }); + } + }; + + keys.forEach(function (key) { + return runEffect(effects[key], effectId, key, childCbs[key]); + }); + } + + function runRaceEffect(effects, effectId, cb) { + var completed = void 0; + var keys = Object.keys(effects); + var childCbs = {}; + + keys.forEach(function (key) { + var chCbAtKey = function chCbAtKey(res, isErr) { + if (completed) { + return; + } + + if (isErr) { + // Race Auto cancellation + cb.cancel(); + cb(res, true); + } else if (!isEnd(res) && res !== CHANNEL_END && res !== TASK_CANCEL) { + var _response; + + cb.cancel(); + completed = true; + var response = (_response = {}, _response[key] = res, _response); + cb(is.array(effects) ? [].slice.call(proc_extends({}, response, { length: keys.length })) : response); + } + }; + chCbAtKey.cancel = utils_noop; + childCbs[key] = chCbAtKey; + }); + + cb.cancel = function () { + // prevents unnecessary cancellation + if (!completed) { + completed = true; + keys.forEach(function (key) { + return childCbs[key].cancel(); + }); + } + }; + keys.forEach(function (key) { + if (completed) { + return; + } + runEffect(effects[key], effectId, key, childCbs[key]); + }); + } + + function runSelectEffect(_ref7, cb) { + var selector = _ref7.selector, + args = _ref7.args; + + try { + var state = selector.apply(undefined, [getState()].concat(args)); + cb(state); + } catch (error) { + cb(error, true); + } + } + + function runChannelEffect(_ref8, cb) { + var pattern = _ref8.pattern, + buffer = _ref8.buffer; + + var match = proc_matcher(pattern); + match.pattern = pattern; + cb(eventChannel(subscribe, buffer || buffers.fixed(), match)); + } + + function runCancelledEffect(data, cb) { + cb(!!mainTask.isCancelled); + } + + function runFlushEffect(channel, cb) { + channel.flush(cb); + } + + function runGetContextEffect(prop, cb) { + cb(taskContext[prop]); + } + + function runSetContextEffect(props, cb) { + object.assign(taskContext, props); + cb(); + } + + function newTask(id, name, iterator, cont) { + var _done, _ref9, _mutatorMap; + + iterator._deferredEnd = null; + return _ref9 = {}, _ref9[TASK] = true, _ref9.id = id, _ref9.name = name, _done = 'done', _mutatorMap = {}, _mutatorMap[_done] = _mutatorMap[_done] || {}, _mutatorMap[_done].get = function () { + if (iterator._deferredEnd) { + return iterator._deferredEnd.promise; + } else { + var def = deferred(); + iterator._deferredEnd = def; + if (!iterator._isRunning) { + iterator._error ? def.reject(iterator._error) : def.resolve(iterator._result); + } + return def.promise; + } + }, _ref9.cont = cont, _ref9.joiners = [], _ref9.cancel = cancel, _ref9.isRunning = function isRunning() { + return iterator._isRunning; + }, _ref9.isCancelled = function isCancelled() { + return iterator._isCancelled; + }, _ref9.isAborted = function isAborted() { + return iterator._isAborted; + }, _ref9.result = function result() { + return iterator._result; + }, _ref9.error = function error() { + return iterator._error; + }, _ref9.setContext = function setContext(props) { + check(props, is.object, createSetContextWarning('task', props)); + object.assign(taskContext, props); + }, _defineEnumerableProperties(_ref9, _mutatorMap), _ref9; + } +} +// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/runSaga.js + + + +var RUN_SAGA_SIGNATURE = 'runSaga(storeInterface, saga, ...args)'; +var NON_GENERATOR_ERR = RUN_SAGA_SIGNATURE + ': saga argument must be a Generator function!'; + +function runSaga(storeInterface, saga) { + for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; + } + + var iterator = void 0; + + if (is.iterator(storeInterface)) { + if (false) {} + iterator = storeInterface; + storeInterface = saga; + } else { + check(saga, is.func, NON_GENERATOR_ERR); + iterator = saga.apply(undefined, args); + check(iterator, is.iterator, NON_GENERATOR_ERR); + } + + var _storeInterface = storeInterface, + subscribe = _storeInterface.subscribe, + dispatch = _storeInterface.dispatch, + getState = _storeInterface.getState, + context = _storeInterface.context, + sagaMonitor = _storeInterface.sagaMonitor, + logger = _storeInterface.logger, + onError = _storeInterface.onError; + + + var effectId = uid(); + + if (sagaMonitor) { + // monitors are expected to have a certain interface, let's fill-in any missing ones + sagaMonitor.effectTriggered = sagaMonitor.effectTriggered || utils_noop; + sagaMonitor.effectResolved = sagaMonitor.effectResolved || utils_noop; + sagaMonitor.effectRejected = sagaMonitor.effectRejected || utils_noop; + sagaMonitor.effectCancelled = sagaMonitor.effectCancelled || utils_noop; + sagaMonitor.actionDispatched = sagaMonitor.actionDispatched || utils_noop; + + sagaMonitor.effectTriggered({ effectId: effectId, root: true, parentEffectId: 0, effect: { root: true, saga: saga, args: args } }); + } + + var task = proc(iterator, subscribe, wrapSagaDispatch(dispatch), getState, context, { sagaMonitor: sagaMonitor, logger: logger, onError: onError }, effectId, saga.name); + + if (sagaMonitor) { + sagaMonitor.effectResolved(effectId, task); + } + + return task; +} +// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/middleware.js +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + + + + + +function sagaMiddlewareFactory() { + var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var _ref$context = _ref.context, + context = _ref$context === undefined ? {} : _ref$context, + options = _objectWithoutProperties(_ref, ['context']); + + var sagaMonitor = options.sagaMonitor, + logger = options.logger, + onError = options.onError; + + + if (is.func(options)) { + if (true) { + throw new Error('Saga middleware no longer accept Generator functions. Use sagaMiddleware.run instead'); + } else {} + } + + if (logger && !is.func(logger)) { + throw new Error('`options.logger` passed to the Saga middleware is not a function!'); + } + + if (false) {} + + if (onError && !is.func(onError)) { + throw new Error('`options.onError` passed to the Saga middleware is not a function!'); + } + + if (options.emitter && !is.func(options.emitter)) { + throw new Error('`options.emitter` passed to the Saga middleware is not a function!'); + } + + function sagaMiddleware(_ref2) { + var getState = _ref2.getState, + dispatch = _ref2.dispatch; + + var sagaEmitter = emitter(); + sagaEmitter.emit = (options.emitter || ident)(sagaEmitter.emit); + + sagaMiddleware.run = runSaga.bind(null, { + context: context, + subscribe: sagaEmitter.subscribe, + dispatch: dispatch, + getState: getState, + sagaMonitor: sagaMonitor, + logger: logger, + onError: onError + }); + + return function (next) { + return function (action) { + if (sagaMonitor && sagaMonitor.actionDispatched) { + sagaMonitor.actionDispatched(action); + } + var result = next(action); // hit reducers + sagaEmitter.emit(action); + return result; + }; + }; + } + + sagaMiddleware.run = function () { + throw new Error('Before running a Saga, you must mount the Saga middleware on the Store using applyMiddleware'); + }; + + sagaMiddleware.setContext = function (props) { + check(props, is.object, createSetContextWarning('sagaMiddleware', props)); + object.assign(context, props); + }; + + return sagaMiddleware; +} +// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/sagaHelpers/fsmIterator.js + + +var done = { done: true, value: undefined }; +var qEnd = {}; + +function safeName(patternOrChannel) { + if (is.channel(patternOrChannel)) { + return 'channel'; + } else if (Array.isArray(patternOrChannel)) { + return String(patternOrChannel.map(function (entry) { + return String(entry); + })); + } else { + return String(patternOrChannel); + } +} + +function fsmIterator(fsm, q0) { + var name = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'iterator'; + + var updateState = void 0, + qNext = q0; + + function next(arg, error) { + if (qNext === qEnd) { + return done; + } + + if (error) { + qNext = qEnd; + throw error; + } else { + updateState && updateState(arg); + + var _fsm$qNext = fsm[qNext](), + q = _fsm$qNext[0], + output = _fsm$qNext[1], + _updateState = _fsm$qNext[2]; + + qNext = q; + updateState = _updateState; + return qNext === qEnd ? done : output; + } + } + + return makeIterator(next, function (error) { + return next(null, error); + }, name, true); +} +// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/sagaHelpers/takeEvery.js + + + + +function takeEvery(patternOrChannel, worker) { + for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; + } + + var yTake = { done: false, value: io_take(patternOrChannel) }; + var yFork = function yFork(ac) { + return { done: false, value: fork.apply(undefined, [worker].concat(args, [ac])) }; + }; + + var action = void 0, + setAction = function setAction(ac) { + return action = ac; + }; + + return fsmIterator({ + q1: function q1() { + return ['q2', yTake, setAction]; + }, + q2: function q2() { + return action === END ? [qEnd] : ['q1', yFork(action)]; + } + }, 'q1', 'takeEvery(' + safeName(patternOrChannel) + ', ' + worker.name + ')'); +} +// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/sagaHelpers/takeLatest.js + + + + +function takeLatest(patternOrChannel, worker) { + for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; + } + + var yTake = { done: false, value: io_take(patternOrChannel) }; + var yFork = function yFork(ac) { + return { done: false, value: fork.apply(undefined, [worker].concat(args, [ac])) }; + }; + var yCancel = function yCancel(task) { + return { done: false, value: io_cancel(task) }; + }; + + var task = void 0, + action = void 0; + var setTask = function setTask(t) { + return task = t; + }; + var setAction = function setAction(ac) { + return action = ac; + }; + + return fsmIterator({ + q1: function q1() { + return ['q2', yTake, setAction]; + }, + q2: function q2() { + return action === END ? [qEnd] : task ? ['q3', yCancel(task)] : ['q1', yFork(action), setTask]; + }, + q3: function q3() { + return ['q1', yFork(action), setTask]; + } + }, 'q1', 'takeLatest(' + safeName(patternOrChannel) + ', ' + worker.name + ')'); +} +// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/sagaHelpers/throttle.js + + + + + + +function throttle(delayLength, pattern, worker) { + for (var _len = arguments.length, args = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) { + args[_key - 3] = arguments[_key]; + } + + var action = void 0, + channel = void 0; + + var yActionChannel = { done: false, value: actionChannel(pattern, buffers.sliding(1)) }; + var yTake = function yTake() { + return { done: false, value: io_take(channel) }; + }; + var yFork = function yFork(ac) { + return { done: false, value: fork.apply(undefined, [worker].concat(args, [ac])) }; + }; + var yDelay = { done: false, value: io_call(utils_delay, delayLength) }; + + var setAction = function setAction(ac) { + return action = ac; + }; + var setChannel = function setChannel(ch) { + return channel = ch; + }; + + return fsmIterator({ + q1: function q1() { + return ['q2', yActionChannel, setChannel]; + }, + q2: function q2() { + return ['q3', yTake(), setAction]; + }, + q3: function q3() { + return action === END ? [qEnd] : ['q4', yFork(action)]; + }, + q4: function q4() { + return ['q2', yDelay]; + } + }, 'q1', 'throttle(' + safeName(pattern) + ', ' + worker.name + ')'); +} +// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/sagaHelpers/index.js + + + + + + +var deprecationWarning = function deprecationWarning(helperName) { + return 'import { ' + helperName + ' } from \'redux-saga\' has been deprecated in favor of import { ' + helperName + ' } from \'redux-saga/effects\'.\nThe latter will not work with yield*, as helper effects are wrapped automatically for you in fork effect.\nTherefore yield ' + helperName + ' will return task descriptor to your saga and execute next lines of code.'; +}; + +var sagaHelpers_takeEvery = /*#__PURE__*/deprecate(takeEvery, /*#__PURE__*/deprecationWarning('takeEvery')); +var sagaHelpers_takeLatest = /*#__PURE__*/deprecate(takeLatest, /*#__PURE__*/deprecationWarning('takeLatest')); +var sagaHelpers_throttle = /*#__PURE__*/deprecate(throttle, /*#__PURE__*/deprecationWarning('throttle')); + + +// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/io-helpers.js + + + +function io_helpers_takeEvery(patternOrChannel, worker) { + for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; + } + + return fork.apply(undefined, [takeEvery, patternOrChannel, worker].concat(args)); +} + +function io_helpers_takeLatest(patternOrChannel, worker) { + for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { + args[_key2 - 2] = arguments[_key2]; + } + + return fork.apply(undefined, [takeLatest, patternOrChannel, worker].concat(args)); +} + +function io_helpers_throttle(ms, pattern, worker) { + for (var _len3 = arguments.length, args = Array(_len3 > 3 ? _len3 - 3 : 0), _key3 = 3; _key3 < _len3; _key3++) { + args[_key3 - 3] = arguments[_key3]; + } + + return fork.apply(undefined, [throttle, ms, pattern, worker].concat(args)); +} +// CONCATENATED MODULE: ./node_modules/redux-saga/es/effects.js + + + +// CONCATENATED MODULE: ./node_modules/redux-saga/es/utils.js + + + +// CONCATENATED MODULE: ./node_modules/redux-saga/es/index.js + +/* harmony default export */ var redux_saga_es = (sagaMiddlewareFactory); + + + + + + + + + + + + +// EXTERNAL MODULE: ./node_modules/is-plain-object/index.js +var is_plain_object = __webpack_require__("+0iv"); +var is_plain_object_default = /*#__PURE__*/__webpack_require__.n(is_plain_object); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toArray.js +var toArray = __webpack_require__("T5bk"); + +// EXTERNAL MODULE: ./node_modules/dva-core/node_modules/warning/browser.js +var warning_browser = __webpack_require__("myn2"); +var warning_browser_default = /*#__PURE__*/__webpack_require__.n(warning_browser); + +// 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/flatten/index.js +var flatten = __webpack_require__("QTEQ"); +var flatten_default = /*#__PURE__*/__webpack_require__.n(flatten); + +// EXTERNAL MODULE: ./node_modules/global/window.js +var global_window = __webpack_require__("vgmO"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules +var slicedToArray = __webpack_require__("ODXe"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js +var regenerator = __webpack_require__("o0o1"); +var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator); + +// CONCATENATED MODULE: ./node_modules/dva-core/dist/index.esm.js + + + + + + + + + + + + + + + + + + +var isArray = Array.isArray.bind(Array); +var isFunction = function isFunction(o) { + return typeof o === 'function'; +}; +var returnSelf = function returnSelf(m) { + return m; +}; +var index_esm_noop = function noop() {}; +var findIndex = function findIndex(array, predicate) { + for (var i = 0, length = array.length; i < length; i += 1) { + if (predicate(array[i], i)) return i; + } + + return -1; +}; + +var utils = /*#__PURE__*/Object.freeze({ + isPlainObject: is_plain_object_default.a, + isArray: isArray, + isFunction: isFunction, + returnSelf: returnSelf, + noop: index_esm_noop, + findIndex: findIndex +}); + +function checkModel(model, existModels) { + var namespace = model.namespace, + reducers = model.reducers, + effects = model.effects, + subscriptions = model.subscriptions; // namespace 必须被定义 + + browser_default()(namespace, "[app.model] namespace should be defined"); // 并且是字符串 + + browser_default()(typeof namespace === 'string', "[app.model] namespace should be string, but got ".concat(Object(esm_typeof["a" /* default */])(namespace))); // 并且唯一 + + browser_default()(!existModels.some(function (model) { + return model.namespace === namespace; + }), "[app.model] namespace should be unique"); // state 可以为任意值 + // reducers 可以为空,PlainObject 或者数组 + + if (reducers) { + browser_default()(is_plain_object_default()(reducers) || isArray(reducers), "[app.model] reducers should be plain object or array, but got ".concat(Object(esm_typeof["a" /* default */])(reducers))); // 数组的 reducers 必须是 [Object, Function] 的格式 + + browser_default()(!isArray(reducers) || is_plain_object_default()(reducers[0]) && isFunction(reducers[1]), "[app.model] reducers with array should be [Object, Function]"); + } // effects 可以为空,PlainObject + + + if (effects) { + browser_default()(is_plain_object_default()(effects), "[app.model] effects should be plain object, but got ".concat(Object(esm_typeof["a" /* default */])(effects))); + } + + if (subscriptions) { + // subscriptions 可以为空,PlainObject + browser_default()(is_plain_object_default()(subscriptions), "[app.model] subscriptions should be plain object, but got ".concat(Object(esm_typeof["a" /* default */])(subscriptions))); // subscription 必须为函数 + + browser_default()(isAllFunction(subscriptions), "[app.model] subscription should be function"); + } +} + +function isAllFunction(obj) { + return Object.keys(obj).every(function (key) { + return isFunction(obj[key]); + }); +} + +var NAMESPACE_SEP = '/'; + +function prefix(obj, namespace, type) { + return Object.keys(obj).reduce(function (memo, key) { + warning_browser_default()(key.indexOf("".concat(namespace).concat(NAMESPACE_SEP)) !== 0, "[prefixNamespace]: ".concat(type, " ").concat(key, " should not be prefixed with namespace ").concat(namespace)); + var newKey = "".concat(namespace).concat(NAMESPACE_SEP).concat(key); + memo[newKey] = obj[key]; + return memo; + }, {}); +} + +function prefixNamespace(model) { + var namespace = model.namespace, + reducers = model.reducers, + effects = model.effects; + + if (reducers) { + if (isArray(reducers)) { + // 需要复制一份,不能直接修改 model.reducers[0], 会导致微前端场景下,重复添加前缀 + var _reducers = Object(toArray["a" /* default */])(reducers), + reducer = _reducers[0], + rest = _reducers.slice(1); + + model.reducers = [prefix(reducer, namespace, 'reducer')].concat(Object(toConsumableArray["a" /* default */])(rest)); + } else { + model.reducers = prefix(reducers, namespace, 'reducer'); + } + } + + if (effects) { + model.effects = prefix(effects, namespace, 'effect'); + } + + return model; +} + +var index_esm_hooks = ['onError', 'onStateChange', 'onAction', 'onHmr', 'onReducer', 'onEffect', 'extraReducers', 'extraEnhancers', '_handleActions']; +function filterHooks(obj) { + return Object.keys(obj).reduce(function (memo, key) { + if (index_esm_hooks.indexOf(key) > -1) { + memo[key] = obj[key]; + } + + return memo; + }, {}); +} + +var index_esm_Plugin = +/*#__PURE__*/ +function () { + function Plugin() { + Object(classCallCheck["a" /* default */])(this, Plugin); + + this._handleActions = null; + this.hooks = index_esm_hooks.reduce(function (memo, key) { + memo[key] = []; + return memo; + }, {}); + } + + Object(createClass["a" /* default */])(Plugin, [{ + key: "use", + value: function use(plugin) { + browser_default()(is_plain_object_default()(plugin), 'plugin.use: plugin should be plain object'); + var hooks = this.hooks; + + for (var key in plugin) { + if (Object.prototype.hasOwnProperty.call(plugin, key)) { + browser_default()(hooks[key], "plugin.use: unknown plugin property: ".concat(key)); + + if (key === '_handleActions') { + this._handleActions = plugin[key]; + } else if (key === 'extraEnhancers') { + hooks[key] = plugin[key]; + } else { + hooks[key].push(plugin[key]); + } + } + } + } + }, { + key: "apply", + value: function apply(key, defaultHandler) { + var hooks = this.hooks; + var validApplyHooks = ['onError', 'onHmr']; + browser_default()(validApplyHooks.indexOf(key) > -1, "plugin.apply: hook ".concat(key, " cannot be applied")); + var fns = hooks[key]; + return function () { + if (fns.length) { + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = fns[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var fn = _step.value; + fn.apply(void 0, arguments); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + } else if (defaultHandler) { + defaultHandler.apply(void 0, arguments); + } + }; + } + }, { + key: "get", + value: function get(key) { + var hooks = this.hooks; + browser_default()(key in hooks, "plugin.get: hook ".concat(key, " cannot be got")); + + if (key === 'extraReducers') { + return getExtraReducers(hooks[key]); + } else if (key === 'onReducer') { + return getOnReducer(hooks[key]); + } else { + return hooks[key]; + } + } + }]); + + return Plugin; +}(); + +function getExtraReducers(hook) { + var ret = {}; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = hook[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var reducerObj = _step2.value; + ret = _objectSpread({}, ret, reducerObj); + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + return ret; +} + +function getOnReducer(hook) { + return function (reducer) { + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = hook[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var reducerEnhancer = _step3.value; + reducer = reducerEnhancer(reducer); + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + + return reducer; + }; +} + +function index_esm_createStore (_ref) { + var reducers = _ref.reducers, + initialState = _ref.initialState, + plugin = _ref.plugin, + sagaMiddleware = _ref.sagaMiddleware, + promiseMiddleware = _ref.promiseMiddleware, + _ref$createOpts$setup = _ref.createOpts.setupMiddlewares, + setupMiddlewares = _ref$createOpts$setup === void 0 ? returnSelf : _ref$createOpts$setup; + // extra enhancers + var extraEnhancers = plugin.get('extraEnhancers'); + browser_default()(isArray(extraEnhancers), "[app.start] extraEnhancers should be array, but got ".concat(Object(esm_typeof["a" /* default */])(extraEnhancers))); + var extraMiddlewares = plugin.get('onAction'); + var middlewares = setupMiddlewares([promiseMiddleware, sagaMiddleware].concat(Object(toConsumableArray["a" /* default */])(flatten_default()(extraMiddlewares)))); + var composeEnhancers = false ? undefined : compose; + var enhancers = [applyMiddleware.apply(void 0, Object(toConsumableArray["a" /* default */])(middlewares))].concat(Object(toConsumableArray["a" /* default */])(extraEnhancers)); + return redux_createStore(reducers, initialState, composeEnhancers.apply(void 0, Object(toConsumableArray["a" /* default */])(enhancers))); +} + +function prefixType(type, model) { + var prefixedType = "".concat(model.namespace).concat(NAMESPACE_SEP).concat(type); + var typeWithoutAffix = prefixedType.replace(/\/@@[^/]+?$/, ''); + var reducer = Array.isArray(model.reducers) ? model.reducers[0][typeWithoutAffix] : model.reducers && model.reducers[typeWithoutAffix]; + + if (reducer || model.effects && model.effects[typeWithoutAffix]) { + return prefixedType; + } + + return type; +} + +function getSaga(effects$1, model, onError, onEffect) { + var opts = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; + return ( + /*#__PURE__*/ + regenerator_default.a.mark(function _callee3() { + var key; + return regenerator_default.a.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _context3.t0 = regenerator_default.a.keys(effects$1); + + case 1: + if ((_context3.t1 = _context3.t0()).done) { + _context3.next = 7; + break; + } + + key = _context3.t1.value; + + if (!Object.prototype.hasOwnProperty.call(effects$1, key)) { + _context3.next = 5; + break; + } + + return _context3.delegateYield( + /*#__PURE__*/ + regenerator_default.a.mark(function _callee2() { + var watcher, task; + return regenerator_default.a.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + watcher = getWatcher(key, effects$1[key], model, onError, onEffect, opts); + _context2.next = 3; + return effects_namespaceObject.fork(watcher); + + case 3: + task = _context2.sent; + _context2.next = 6; + return effects_namespaceObject.fork( + /*#__PURE__*/ + regenerator_default.a.mark(function _callee() { + return regenerator_default.a.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return effects_namespaceObject.take("".concat(model.namespace, "/@@CANCEL_EFFECTS")); + + case 2: + _context.next = 4; + return effects_namespaceObject.cancel(task); + + case 4: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + case 6: + case "end": + return _context2.stop(); + } + } + }, _callee2); + })(), "t2", 5); + + case 5: + _context3.next = 1; + break; + + case 7: + case "end": + return _context3.stop(); + } + } + }, _callee3); + }) + ); +} + +function getWatcher(key, _effect, model, onError, onEffect, opts) { + var _marked = + /*#__PURE__*/ + regenerator_default.a.mark(sagaWithCatch); + + var effect = _effect; + var type = 'takeEvery'; + var ms; + var delayMs; + + if (Array.isArray(_effect)) { + var _effect2 = Object(slicedToArray["a" /* default */])(_effect, 1); + + effect = _effect2[0]; + var _opts = _effect[1]; + + if (_opts && _opts.type) { + type = _opts.type; + + if (type === 'throttle') { + browser_default()(_opts.ms, 'app.start: opts.ms should be defined if type is throttle'); + ms = _opts.ms; + } + + if (type === 'poll') { + browser_default()(_opts.delay, 'app.start: opts.delay should be defined if type is poll'); + delayMs = _opts.delay; + } + } + + browser_default()(['watcher', 'takeEvery', 'takeLatest', 'throttle', 'poll'].indexOf(type) > -1, 'app.start: effect type should be takeEvery, takeLatest, throttle, poll or watcher'); + } + + function noop() {} + + function sagaWithCatch() { + var _len, + args, + _key, + _ref, + _ref$__dva_resolve, + resolve, + _ref$__dva_reject, + reject, + ret, + _args4 = arguments; + + return regenerator_default.a.wrap(function sagaWithCatch$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + for (_len = _args4.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = _args4[_key]; + } + + _ref = args.length > 0 ? args[0] : {}, _ref$__dva_resolve = _ref.__dva_resolve, resolve = _ref$__dva_resolve === void 0 ? noop : _ref$__dva_resolve, _ref$__dva_reject = _ref.__dva_reject, reject = _ref$__dva_reject === void 0 ? noop : _ref$__dva_reject; + _context4.prev = 2; + _context4.next = 5; + return effects_namespaceObject.put({ + type: "".concat(key).concat(NAMESPACE_SEP, "@@start") + }); + + case 5: + _context4.next = 7; + return effect.apply(void 0, Object(toConsumableArray["a" /* default */])(args.concat(createEffects(model, opts)))); + + case 7: + ret = _context4.sent; + _context4.next = 10; + return effects_namespaceObject.put({ + type: "".concat(key).concat(NAMESPACE_SEP, "@@end") + }); + + case 10: + resolve(ret); + _context4.next = 17; + break; + + case 13: + _context4.prev = 13; + _context4.t0 = _context4["catch"](2); + onError(_context4.t0, { + key: key, + effectArgs: args + }); + + if (!_context4.t0._dontReject) { + reject(_context4.t0); + } + + case 17: + case "end": + return _context4.stop(); + } + } + }, _marked, null, [[2, 13]]); + } + + var sagaWithOnEffect = applyOnEffect(onEffect, sagaWithCatch, model, key); + + switch (type) { + case 'watcher': + return sagaWithCatch; + + case 'takeLatest': + return ( + /*#__PURE__*/ + regenerator_default.a.mark(function _callee4() { + return regenerator_default.a.wrap(function _callee4$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + _context5.next = 2; + return effects_namespaceObject.takeLatest(key, sagaWithOnEffect); + + case 2: + case "end": + return _context5.stop(); + } + } + }, _callee4); + }) + ); + + case 'throttle': + return ( + /*#__PURE__*/ + regenerator_default.a.mark(function _callee5() { + return regenerator_default.a.wrap(function _callee5$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + _context6.next = 2; + return effects_namespaceObject.throttle(ms, key, sagaWithOnEffect); + + case 2: + case "end": + return _context6.stop(); + } + } + }, _callee5); + }) + ); + + case 'poll': + return ( + /*#__PURE__*/ + regenerator_default.a.mark(function _callee6() { + var _marked2, delay, pollSagaWorker, call, take, race, action; + + return regenerator_default.a.wrap(function _callee6$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + pollSagaWorker = function _ref3(sagaEffects, action) { + var call; + return regenerator_default.a.wrap(function pollSagaWorker$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + call = sagaEffects.call; + + case 1: + + _context7.next = 4; + return call(sagaWithOnEffect, action); + + case 4: + _context7.next = 6; + return call(delay, delayMs); + + case 6: + _context7.next = 1; + break; + + case 8: + case "end": + return _context7.stop(); + } + } + }, _marked2); + }; + + delay = function _ref2(timeout) { + return new Promise(function (resolve) { + return setTimeout(resolve, timeout); + }); + }; + + _marked2 = + /*#__PURE__*/ + regenerator_default.a.mark(pollSagaWorker); + call = effects_namespaceObject.call, take = effects_namespaceObject.take, race = effects_namespaceObject.race; + + case 4: + + _context8.next = 7; + return take("".concat(key, "-start")); + + case 7: + action = _context8.sent; + _context8.next = 10; + return race([call(pollSagaWorker, effects_namespaceObject, action), take("".concat(key, "-stop"))]); + + case 10: + _context8.next = 4; + break; + + case 12: + case "end": + return _context8.stop(); + } + } + }, _callee6); + }) + ); + + default: + return ( + /*#__PURE__*/ + regenerator_default.a.mark(function _callee7() { + return regenerator_default.a.wrap(function _callee7$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + _context9.next = 2; + return effects_namespaceObject.takeEvery(key, sagaWithOnEffect); + + case 2: + case "end": + return _context9.stop(); + } + } + }, _callee7); + }) + ); + } +} + +function createEffects(model, opts) { + function assertAction(type, name) { + browser_default()(type, 'dispatch: action should be a plain Object with type'); + var _opts$namespacePrefix = opts.namespacePrefixWarning, + namespacePrefixWarning = _opts$namespacePrefix === void 0 ? true : _opts$namespacePrefix; + + if (namespacePrefixWarning) { + warning_browser_default()(type.indexOf("".concat(model.namespace).concat(NAMESPACE_SEP)) !== 0, "[".concat(name, "] ").concat(type, " should not be prefixed with namespace ").concat(model.namespace)); + } + } + + function put(action) { + var type = action.type; + assertAction(type, 'sagaEffects.put'); + return effects_namespaceObject.put(_objectSpread({}, action, { + type: prefixType(type, model) + })); + } // The operator `put` doesn't block waiting the returned promise to resolve. + // Using `put.resolve` will wait until the promsie resolve/reject before resuming. + // It will be helpful to organize multi-effects in order, + // and increase the reusability by seperate the effect in stand-alone pieces. + // https://github.com/redux-saga/redux-saga/issues/336 + + + function putResolve(action) { + var type = action.type; + assertAction(type, 'sagaEffects.put.resolve'); + return effects_namespaceObject.put.resolve(_objectSpread({}, action, { + type: prefixType(type, model) + })); + } + + put.resolve = putResolve; + + function take(type) { + if (typeof type === 'string') { + assertAction(type, 'sagaEffects.take'); + return effects_namespaceObject.take(prefixType(type, model)); + } else if (Array.isArray(type)) { + return effects_namespaceObject.take(type.map(function (t) { + if (typeof t === 'string') { + assertAction(t, 'sagaEffects.take'); + return prefixType(t, model); + } + + return t; + })); + } else { + return effects_namespaceObject.take(type); + } + } + + return _objectSpread({}, effects_namespaceObject, { + put: put, + take: take + }); +} + +function applyOnEffect(fns, effect, model, key) { + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = fns[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var fn = _step.value; + effect = fn(effect, effects_namespaceObject, model, key); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return effect; +} + +function identify(value) { + return value; +} + +function handleAction(actionType) { + var reducer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : identify; + return function (state, action) { + var type = action.type; + browser_default()(type, 'dispatch: action should be a plain Object with type'); + + if (actionType === type) { + return reducer(state, action); + } + + return state; + }; +} + +function reduceReducers() { + for (var _len = arguments.length, reducers = new Array(_len), _key = 0; _key < _len; _key++) { + reducers[_key] = arguments[_key]; + } + + return function (previous, current) { + return reducers.reduce(function (p, r) { + return r(p, current); + }, previous); + }; +} + +function handleActions(handlers, defaultState) { + var reducers = Object.keys(handlers).map(function (type) { + return handleAction(type, handlers[type]); + }); + var reducer = reduceReducers.apply(void 0, Object(toConsumableArray["a" /* default */])(reducers)); + return function () { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState; + var action = arguments.length > 1 ? arguments[1] : undefined; + return reducer(state, action); + }; +} + +function getReducer(reducers, state, handleActions$1) { + // Support reducer enhancer + // e.g. reducers: [realReducers, enhancer] + if (Array.isArray(reducers)) { + return reducers[1]((handleActions$1 || handleActions)(reducers[0], state)); + } else { + return (handleActions$1 || handleActions)(reducers || {}, state); + } +} + +function createPromiseMiddleware(app) { + return function () { + return function (next) { + return function (action) { + var type = action.type; + + if (isEffect(type)) { + return new Promise(function (resolve, reject) { + next(_objectSpread({ + __dva_resolve: resolve, + __dva_reject: reject + }, action)); + }); + } else { + return next(action); + } + }; + }; + }; + + function isEffect(type) { + if (!type || typeof type !== 'string') return false; + + var _type$split = type.split(NAMESPACE_SEP), + _type$split2 = Object(slicedToArray["a" /* default */])(_type$split, 1), + namespace = _type$split2[0]; + + var model = app._models.filter(function (m) { + return m.namespace === namespace; + })[0]; + + if (model) { + if (model.effects && model.effects[type]) { + return true; + } + } + + return false; + } +} + +function prefixedDispatch(dispatch, model) { + return function (action) { + var type = action.type; + browser_default()(type, 'dispatch: action should be a plain Object with type'); + warning_browser_default()(type.indexOf("".concat(model.namespace).concat(NAMESPACE_SEP)) !== 0, "dispatch: ".concat(type, " should not be prefixed with namespace ").concat(model.namespace)); + return dispatch(_objectSpread({}, action, { + type: prefixType(type, model) + })); + }; +} + +function run(subs, model, app, onError) { + var funcs = []; + var nonFuncs = []; + + for (var key in subs) { + if (Object.prototype.hasOwnProperty.call(subs, key)) { + var sub = subs[key]; + var unlistener = sub({ + dispatch: prefixedDispatch(app._store.dispatch, model), + history: app._history + }, onError); + + if (isFunction(unlistener)) { + funcs.push(unlistener); + } else { + nonFuncs.push(key); + } + } + } + + return { + funcs: funcs, + nonFuncs: nonFuncs + }; +} +function unlisten(unlisteners, namespace) { + if (!unlisteners[namespace]) return; + var _unlisteners$namespac = unlisteners[namespace], + funcs = _unlisteners$namespac.funcs, + nonFuncs = _unlisteners$namespac.nonFuncs; + warning_browser_default()(nonFuncs.length === 0, "[app.unmodel] subscription should return unlistener function, check these subscriptions ".concat(nonFuncs.join(', '))); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = funcs[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var unlistener = _step.value; + unlistener(); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + delete unlisteners[namespace]; +} + +var noop$1 = index_esm_noop, + findIndex$1 = findIndex; // Internal model to update global state when do unmodel + +var dvaModel = { + namespace: '@@dva', + state: 0, + reducers: { + UPDATE: function UPDATE(state) { + return state + 1; + } + } +}; +/** + * Create dva-core instance. + * + * @param hooksAndOpts + * @param createOpts + */ + +function create() { + var hooksAndOpts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var createOpts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var initialReducer = createOpts.initialReducer, + _createOpts$setupApp = createOpts.setupApp, + setupApp = _createOpts$setupApp === void 0 ? noop$1 : _createOpts$setupApp; + var plugin = new index_esm_Plugin(); + plugin.use(filterHooks(hooksAndOpts)); + var app = { + _models: [prefixNamespace(_objectSpread({}, dvaModel))], + _store: null, + _plugin: plugin, + use: plugin.use.bind(plugin), + model: model, + start: start + }; + return app; + /** + * Register model before app is started. + * + * @param m {Object} model to register + */ + + function model(m) { + if (false) {} + + var prefixedModel = prefixNamespace(_objectSpread({}, m)); + + app._models.push(prefixedModel); + + return prefixedModel; + } + /** + * Inject model after app is started. + * + * @param createReducer + * @param onError + * @param unlisteners + * @param m + */ + + + function injectModel(createReducer, onError, unlisteners, m) { + m = model(m); + var store = app._store; + store.asyncReducers[m.namespace] = getReducer(m.reducers, m.state, plugin._handleActions); + store.replaceReducer(createReducer()); + + if (m.effects) { + store.runSaga(app._getSaga(m.effects, m, onError, plugin.get('onEffect'), hooksAndOpts)); + } + + if (m.subscriptions) { + unlisteners[m.namespace] = run(m.subscriptions, m, app, onError); + } + } + /** + * Unregister model. + * + * @param createReducer + * @param reducers + * @param unlisteners + * @param namespace + * + * Unexpected key warn problem: + * https://github.com/reactjs/redux/issues/1636 + */ + + + function unmodel(createReducer, reducers, unlisteners, namespace) { + var store = app._store; // Delete reducers + + delete store.asyncReducers[namespace]; + delete reducers[namespace]; + store.replaceReducer(createReducer()); + store.dispatch({ + type: '@@dva/UPDATE' + }); // Cancel effects + + store.dispatch({ + type: "".concat(namespace, "/@@CANCEL_EFFECTS") + }); // Unlisten subscrioptions + + unlisten(unlisteners, namespace); // Delete model from app._models + + app._models = app._models.filter(function (model) { + return model.namespace !== namespace; + }); + } + /** + * Replace a model if it exsits, if not, add it to app + * Attention: + * - Only available after dva.start gets called + * - Will not check origin m is strict equal to the new one + * Useful for HMR + * @param createReducer + * @param reducers + * @param unlisteners + * @param onError + * @param m + */ + + + function replaceModel(createReducer, reducers, unlisteners, onError, m) { + var store = app._store; + var namespace = m.namespace; + var oldModelIdx = findIndex$1(app._models, function (model) { + return model.namespace === namespace; + }); + + if (~oldModelIdx) { + // Cancel effects + store.dispatch({ + type: "".concat(namespace, "/@@CANCEL_EFFECTS") + }); // Delete reducers + + delete store.asyncReducers[namespace]; + delete reducers[namespace]; // Unlisten subscrioptions + + unlisten(unlisteners, namespace); // Delete model from app._models + + app._models.splice(oldModelIdx, 1); + } // add new version model to store + + + app.model(m); + store.dispatch({ + type: '@@dva/UPDATE' + }); + } + /** + * Start the app. + * + * @returns void + */ + + + function start() { + // Global error handler + var onError = function onError(err, extension) { + if (err) { + if (typeof err === 'string') err = new Error(err); + + err.preventDefault = function () { + err._dontReject = true; + }; + + plugin.apply('onError', function (err) { + throw new Error(err.stack || err); + })(err, app._store.dispatch, extension); + } + }; + + var sagaMiddleware = redux_saga_es(); + var promiseMiddleware = createPromiseMiddleware(app); + app._getSaga = getSaga.bind(null); + var sagas = []; + + var reducers = _objectSpread({}, initialReducer); + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = app._models[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var m = _step.value; + reducers[m.namespace] = getReducer(m.reducers, m.state, plugin._handleActions); + + if (m.effects) { + sagas.push(app._getSaga(m.effects, m, onError, plugin.get('onEffect'), hooksAndOpts)); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + var reducerEnhancer = plugin.get('onReducer'); + var extraReducers = plugin.get('extraReducers'); + browser_default()(Object.keys(extraReducers).every(function (key) { + return !(key in reducers); + }), "[app.start] extraReducers is conflict with other reducers, reducers list: ".concat(Object.keys(reducers).join(', '))); // Create store + + app._store = index_esm_createStore({ + reducers: createReducer(), + initialState: hooksAndOpts.initialState || {}, + plugin: plugin, + createOpts: createOpts, + sagaMiddleware: sagaMiddleware, + promiseMiddleware: promiseMiddleware + }); + var store = app._store; // Extend store + + store.runSaga = sagaMiddleware.run; + store.asyncReducers = {}; // Execute listeners when state is changed + + var listeners = plugin.get('onStateChange'); + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + var _loop = function _loop() { + var listener = _step2.value; + store.subscribe(function () { + listener(store.getState()); + }); + }; + + for (var _iterator2 = listeners[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + _loop(); + } // Run sagas + + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + sagas.forEach(sagaMiddleware.run); // Setup app + + setupApp(app); // Run subscriptions + + var unlisteners = {}; + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = this._models[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var _model = _step3.value; + + if (_model.subscriptions) { + unlisteners[_model.namespace] = run(_model.subscriptions, _model, app, onError); + } + } // Setup app.model and app.unmodel + + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + + app.model = injectModel.bind(app, createReducer, onError, unlisteners); + app.unmodel = unmodel.bind(app, createReducer, reducers, unlisteners); + app.replaceModel = replaceModel.bind(app, createReducer, reducers, unlisteners, onError); + /** + * Create global reducer for redux. + * + * @returns {Object} + */ + + function createReducer() { + return reducerEnhancer(combineReducers(_objectSpread({}, reducers, extraReducers, app._store ? app._store.asyncReducers : {}))); + } + } +} + + + +// EXTERNAL MODULE: ./node_modules/react-router/esm/react-router.js +var react_router = __webpack_require__("Ty5D"); + +// EXTERNAL MODULE: ./node_modules/prop-types/index.js +var prop_types = __webpack_require__("17x9"); +var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); + +// CONCATENATED MODULE: ./node_modules/connected-react-router/esm/actions.js +/** + * This action type will be dispatched when your history + * receives a location change. + */ +var LOCATION_CHANGE = '@@router/LOCATION_CHANGE'; +var actions_onLocationChanged = function onLocationChanged(location, action) { + var isFirstRendering = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + return { + type: LOCATION_CHANGE, + payload: { + location: location, + action: action, + isFirstRendering: isFirstRendering + } + }; +}; +/** + * This action type will be dispatched by the history actions below. + * If you're writing a middleware to watch for navigation events, be sure to + * look for actions of this type. + */ + +var CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD'; + +var updateLocation = function updateLocation(method) { + return function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return { + type: CALL_HISTORY_METHOD, + payload: { + method: method, + args: args + } + }; + }; +}; +/** + * These actions correspond to the history API. + * The associated routerMiddleware will capture these events before they get to + * your reducer and reissue them as the matching function on your history. + */ + + +var push = updateLocation('push'); +var replace = updateLocation('replace'); +var go = updateLocation('go'); +var goBack = updateLocation('goBack'); +var goForward = updateLocation('goForward'); +var routerActions = { + push: push, + replace: replace, + go: go, + goBack: goBack, + goForward: goForward +}; +// CONCATENATED MODULE: ./node_modules/connected-react-router/esm/selectors.js +function selectors_typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { selectors_typeof = function _typeof(obj) { return typeof obj; }; } else { selectors_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return selectors_typeof(obj); } + + + +var selectors_createSelectors = function createSelectors(structure) { + var getIn = structure.getIn, + toJS = structure.toJS; + + var isRouter = function isRouter(value) { + return value != null && selectors_typeof(value) === 'object' && getIn(value, ['location']) && getIn(value, ['action']); + }; + + var getRouter = function getRouter(state) { + var router = toJS(getIn(state, ['router'])); + + if (!isRouter(router)) { + throw 'Could not find router reducer in state tree, it must be mounted under "router"'; + } + + return router; + }; + + var getLocation = function getLocation(state) { + return toJS(getIn(getRouter(state), ['location'])); + }; + + var getAction = function getAction(state) { + return toJS(getIn(getRouter(state), ['action'])); + }; + + var getSearch = function getSearch(state) { + return toJS(getIn(getRouter(state), ['location', 'search'])); + }; + + var getHash = function getHash(state) { + return toJS(getIn(getRouter(state), ['location', 'hash'])); + }; // It only makes sense to recalculate the `matchPath` whenever the pathname + // of the location changes. That's why `createMatchSelector` memoizes + // the latest result based on the location's pathname. + + + var createMatchSelector = function createMatchSelector(path) { + var lastPathname = null; + var lastMatch = null; + return function (state) { + var _ref = getLocation(state) || {}, + pathname = _ref.pathname; + + if (pathname === lastPathname) { + return lastMatch; + } + + lastPathname = pathname; + var match = Object(react_router["i" /* matchPath */])(pathname, path); + + if (!match || !lastMatch || match.url !== lastMatch.url) { + lastMatch = match; + } + + return lastMatch; + }; + }; + + return { + getLocation: getLocation, + getAction: getAction, + getRouter: getRouter, + getSearch: getSearch, + getHash: getHash, + createMatchSelector: createMatchSelector + }; +}; + +/* harmony default export */ var selectors = (selectors_createSelectors); +// CONCATENATED MODULE: ./node_modules/connected-react-router/esm/ConnectedRouter.js +function ConnectedRouter_typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { ConnectedRouter_typeof = function _typeof(obj) { return typeof obj; }; } else { ConnectedRouter_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return ConnectedRouter_typeof(obj); } + +function ConnectedRouter_extends() { ConnectedRouter_extends = Object.assign || 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 ConnectedRouter_extends.apply(this, arguments); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _possibleConstructorReturn(self, call) { if (call && (ConnectedRouter_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + + + + + + + + +var ConnectedRouter_createConnectedRouter = function createConnectedRouter(structure) { + var _createSelectors = selectors(structure), + getLocation = _createSelectors.getLocation; + /* + * ConnectedRouter listens to a history object passed from props. + * When history is changed, it dispatches action to redux store. + * Then, store will pass props to component to render. + * This creates uni-directional flow from history->store->router->components. + */ + + + var ConnectedRouter = + /*#__PURE__*/ + function (_PureComponent) { + _inherits(ConnectedRouter, _PureComponent); + + function ConnectedRouter(props) { + var _this; + + _classCallCheck(this, ConnectedRouter); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(ConnectedRouter).call(this, props)); + var store = props.store, + history = props.history, + onLocationChanged = props.onLocationChanged; + _this.inTimeTravelling = false; // Subscribe to store changes to check if we are in time travelling + + _this.unsubscribe = store.subscribe(function () { + // Extract store's location + var _getLocation = getLocation(store.getState()), + pathnameInStore = _getLocation.pathname, + searchInStore = _getLocation.search, + hashInStore = _getLocation.hash; // Extract history's location + + + var _history$location = history.location, + pathnameInHistory = _history$location.pathname, + searchInHistory = _history$location.search, + hashInHistory = _history$location.hash; // If we do time travelling, the location in store is changed but location in history is not changed + + if (pathnameInHistory !== pathnameInStore || searchInHistory !== searchInStore || hashInHistory !== hashInStore) { + _this.inTimeTravelling = true; // Update history's location to match store's location + + history.push({ + pathname: pathnameInStore, + search: searchInStore, + hash: hashInStore + }); + } + }); + + var handleLocationChange = function handleLocationChange(location, action) { + var isFirstRendering = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + // Dispatch onLocationChanged except when we're in time travelling + if (!_this.inTimeTravelling) { + onLocationChanged(location, action, isFirstRendering); + } else { + _this.inTimeTravelling = false; + } + }; // Listen to history changes + + + _this.unlisten = history.listen(handleLocationChange); // Dispatch a location change action for the initial location. + // This makes it backward-compatible with react-router-redux. + // But, we add `isFirstRendering` to `true` to prevent double-rendering. + + handleLocationChange(history.location, history.action, true); + return _this; + } + + _createClass(ConnectedRouter, [{ + key: "componentWillUnmount", + value: function componentWillUnmount() { + this.unlisten(); + this.unsubscribe(); + } + }, { + key: "render", + value: function render() { + var _this$props = this.props, + history = _this$props.history, + children = _this$props.children; + return react_default.a.createElement(react_router["e" /* Router */], { + history: history + }, children); + } + }]); + + return ConnectedRouter; + }(react["PureComponent"]); + + ConnectedRouter.propTypes = { + store: prop_types_default.a.shape({ + getState: prop_types_default.a.func.isRequired, + subscribe: prop_types_default.a.func.isRequired + }).isRequired, + history: prop_types_default.a.shape({ + action: prop_types_default.a.string.isRequired, + listen: prop_types_default.a.func.isRequired, + location: prop_types_default.a.object.isRequired, + push: prop_types_default.a.func.isRequired + }).isRequired, + basename: prop_types_default.a.string, + children: prop_types_default.a.oneOfType([prop_types_default.a.func, prop_types_default.a.node]), + onLocationChanged: prop_types_default.a.func.isRequired + }; + + var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + onLocationChanged: function onLocationChanged(location, action, isFirstRendering) { + return dispatch(actions_onLocationChanged(location, action, isFirstRendering)); + } + }; + }; + + var ConnectedRouterWithContext = function ConnectedRouterWithContext(props) { + var Context = props.context || es["b" /* ReactReduxContext */]; + + if (Context == null) { + throw 'Please upgrade to react-redux v6'; + } + + return react_default.a.createElement(Context.Consumer, null, function (_ref) { + var store = _ref.store; + return react_default.a.createElement(ConnectedRouter, ConnectedRouter_extends({ + store: store + }, props)); + }); + }; + + ConnectedRouterWithContext.propTypes = { + context: prop_types_default.a.object + }; + return Object(es["c" /* connect */])(null, mapDispatchToProps)(ConnectedRouterWithContext); +}; + +/* harmony default export */ var esm_ConnectedRouter = (ConnectedRouter_createConnectedRouter); +// CONCATENATED MODULE: ./node_modules/connected-react-router/esm/reducer.js + + +var reducer_createConnectRouter = function createConnectRouter(structure) { + var fromJS = structure.fromJS, + merge = structure.merge; + + var createRouterReducer = function createRouterReducer(history) { + var initialRouterState = fromJS({ + location: history.location, + action: history.action + }); + /* + * This reducer will update the state with the most recent location history + * has transitioned to. + */ + + return function () { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialRouterState; + + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + type = _ref.type, + payload = _ref.payload; + + if (type === LOCATION_CHANGE) { + var location = payload.location, + action = payload.action, + isFirstRendering = payload.isFirstRendering; // Don't update the state ref for the first rendering + // to prevent the double-rendering issue on initilization + + return isFirstRendering ? state : merge(state, { + location: fromJS(location), + action: action + }); + } + + return state; + }; + }; + + return createRouterReducer; +}; + +/* harmony default export */ var esm_reducer = (reducer_createConnectRouter); +// CONCATENATED MODULE: ./node_modules/connected-react-router/esm/structure/plain/getIn.js +/* Code from github.com/erikras/redux-form by Erik Rasmussen */ +var getIn_getIn = function getIn(state, path) { + if (!state) { + return state; + } + + var length = path.length; + + if (!length) { + return undefined; + } + + var result = state; + + for (var i = 0; i < length && !!result; ++i) { + result = result[path[i]]; + } + + return result; +}; + +/* harmony default export */ var plain_getIn = (getIn_getIn); +// CONCATENATED MODULE: ./node_modules/connected-react-router/esm/structure/plain/index.js +function plain_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + +var plain_structure = { + fromJS: function fromJS(value) { + return value; + }, + getIn: plain_getIn, + merge: function merge(state, payload) { + return plain_objectSpread({}, state, payload); + }, + toJS: function toJS(value) { + return value; + } +}; +/* harmony default export */ var plain = (plain_structure); +// CONCATENATED MODULE: ./node_modules/connected-react-router/esm/index.js + + + + + + +var connected_react_router_esm_ConnectedRouter = +/*#__PURE__*/ +esm_ConnectedRouter(plain); +var connectRouter = +/*#__PURE__*/ +esm_reducer(plain); + +var esm_createSelectors = +/*#__PURE__*/ +selectors(plain), + esm_getLocation = esm_createSelectors.getLocation, + esm_getAction = esm_createSelectors.getAction, + esm_getHash = esm_createSelectors.getHash, + esm_getSearch = esm_createSelectors.getSearch, + esm_createMatchSelector = esm_createSelectors.createMatchSelector; + + +// CONCATENATED MODULE: ./node_modules/connected-react-router/esm/middleware.js +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } + +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } + +function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } + +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } + + +/** + * This middleware captures CALL_HISTORY_METHOD actions to redirect to the + * provided history object. This will prevent these actions from reaching your + * reducer or any middleware that comes after this one. + */ + +var middleware_routerMiddleware = function routerMiddleware(history) { + return function (store) { + return function (next) { + return function (action) { + // eslint-disable-line no-unused-vars + if (action.type !== CALL_HISTORY_METHOD) { + return next(action); + } + + var _action$payload = action.payload, + method = _action$payload.method, + args = _action$payload.args; + history[method].apply(history, _toConsumableArray(args)); + }; + }; + }; +}; + +/* harmony default export */ var middleware = (middleware_routerMiddleware); +// EXTERNAL MODULE: ./node_modules/isomorphic-fetch/fetch-npm-browserify.js +var fetch_npm_browserify = __webpack_require__("LpSC"); + +// 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"); + +// CONCATENATED MODULE: ./node_modules/dva/dist/index.esm.js + + + + + + + + + + + + + + + + + + + + + + + + + +var cached = {}; + +function registerModel(app, model) { + model = model.default || model; + + if (!cached[model.namespace]) { + app.model(model); + cached[model.namespace] = 1; + } +} + +var defaultLoadingComponent = function defaultLoadingComponent() { + return null; +}; + +function asyncComponent(config) { + var resolve = config.resolve; + return /*#__PURE__*/function (_Component) { + Object(inherits["a" /* default */])(DynamicComponent, _Component); + + var _super = Object(createSuper["a" /* default */])(DynamicComponent); + + function DynamicComponent() { + var _this; + + Object(classCallCheck["a" /* default */])(this, DynamicComponent); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + _this.LoadingComponent = config.LoadingComponent || defaultLoadingComponent; + _this.state = { + AsyncComponent: null + }; + + _this.load(); + + return _this; + } + + Object(createClass["a" /* default */])(DynamicComponent, [{ + key: "componentDidMount", + value: function componentDidMount() { + this.mounted = true; + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + this.mounted = false; + } + }, { + key: "load", + value: function load() { + var _this2 = this; + + resolve().then(function (m) { + var AsyncComponent = m.default || m; + + if (_this2.mounted) { + _this2.setState({ + AsyncComponent: AsyncComponent + }); + } else { + _this2.state.AsyncComponent = AsyncComponent; // eslint-disable-line + } + }); + } + }, { + key: "render", + value: function render() { + var AsyncComponent = this.state.AsyncComponent; + var LoadingComponent = this.LoadingComponent; + if (AsyncComponent) return /*#__PURE__*/react_default.a.createElement(AsyncComponent, this.props); + return /*#__PURE__*/react_default.a.createElement(LoadingComponent, this.props); + } + }]); + + return DynamicComponent; + }(react["Component"]); +} + +function dynamic(config) { + var app = config.app, + resolveModels = config.models, + resolveComponent = config.component; + return asyncComponent(Object(objectSpread2["a" /* default */])({ + resolve: config.resolve || function () { + var models = typeof resolveModels === 'function' ? resolveModels() : []; + var component = resolveComponent(); + return new Promise(function (resolve) { + Promise.all([].concat(Object(toConsumableArray["a" /* default */])(models), [component])).then(function (ret) { + if (!models || !models.length) { + return resolve(ret[0]); + } else { + var len = models.length; + ret.slice(0, len).forEach(function (m) { + m = m.default || m; + + if (!Array.isArray(m)) { + m = [m]; + } + + m.map(function (_) { + return registerModel(app, _); + }); + }); + resolve(ret[len]); + } + }); + }); + } + }, config)); +} + +dynamic.setDefaultLoadingComponent = function (LoadingComponent) { + defaultLoadingComponent = LoadingComponent; +}; + +var index_esm_connectRouter = connectRouter, + index_esm_routerMiddleware = middleware; +var index_esm_isFunction = utils.isFunction; +var useHistory = react_router["j" /* useHistory */], + useLocation = react_router["k" /* useLocation */], + useParams = react_router["l" /* useParams */], + useRouteMatch = react_router["m" /* useRouteMatch */]; +function index () { + var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var history = opts.history || Object(esm_history["b" /* createHashHistory */])(); + var createOpts = { + initialReducer: { + router: index_esm_connectRouter(history) + }, + setupMiddlewares: function setupMiddlewares(middlewares) { + return [index_esm_routerMiddleware(history)].concat(Object(toConsumableArray["a" /* default */])(middlewares)); + }, + setupApp: function setupApp(app) { + app._history = patchHistory(history); + } + }; + var app = create(opts, createOpts); + var oldAppStart = app.start; + app.router = router; + app.start = start; + return app; + + function router(router) { + browser_default()(index_esm_isFunction(router), "[app.router] router should be function, but got ".concat(Object(esm_typeof["a" /* default */])(router))); + app._router = router; + } + + function start(container) { + // 允许 container 是字符串,然后用 querySelector 找元素 + if (isString(container)) { + container = document_default.a.querySelector(container); + browser_default()(container, "[app.start] container ".concat(container, " not found")); + } // 并且是 HTMLElement + + + browser_default()(!container || isHTMLElement(container), "[app.start] container should be HTMLElement"); // 路由必须提前注册 + + browser_default()(app._router, "[app.start] router must be registered before app.start()"); + + if (!app._store) { + oldAppStart.call(app); + } + + var store = app._store; // export _getProvider for HMR + // ref: https://github.com/dvajs/dva/issues/469 + + app._getProvider = getProvider.bind(null, store, app); // If has container, render; else, return react component + + if (container) { + index_esm_render(container, store, app, app._router); + + app._plugin.apply('onHmr')(index_esm_render.bind(null, container, store, app)); + } else { + return getProvider(store, this, this._router); + } + } +} + +function isHTMLElement(node) { + return Object(esm_typeof["a" /* default */])(node) === 'object' && node !== null && node.nodeType && node.nodeName; +} + +function isString(str) { + return typeof str === 'string'; +} + +function getProvider(store, app, router) { + var DvaRoot = function DvaRoot(extraProps) { + return /*#__PURE__*/react_default.a.createElement(es["a" /* Provider */], { + store: store + }, router(Object(objectSpread2["a" /* default */])({ + app: app, + history: app._history + }, extraProps))); + }; + + return DvaRoot; +} + +function index_esm_render(container, store, app, router) { + var ReactDOM = __webpack_require__(/*! react-dom */ "i8i4"); // eslint-disable-line + + + ReactDOM.render(react_default.a.createElement(getProvider(store, app, router)), container); +} + +function patchHistory(history) { + var oldListen = history.listen; + + history.listen = function (callback) { + // TODO: refact this with modified ConnectedRouter + // Let ConnectedRouter to sync history to store first + // connected-react-router's version is locked since the check function may be broken + // min version of connected-react-router + // e.g. + // function (e, t) { + // var n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + // r.inTimeTravelling ? r.inTimeTravelling = !1 : a(e, t, n) + // } + // ref: https://github.com/umijs/umi/issues/2693 + var cbStr = callback.toString(); + var isConnectedRouterHandler = callback.name === 'handleLocationChange' && cbStr.indexOf('onLocationChanged') > -1 || cbStr.indexOf('.inTimeTravelling') > -1 && cbStr.indexOf('.inTimeTravelling') > -1 && cbStr.indexOf('arguments[2]') > -1; // why add __isDvaPatch: true + // since it's a patch from dva, we need to identify it in the listen handlers + + callback(history.location, history.action, { + __isDvaPatch: true + }); + return oldListen.call(history, function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + if (isConnectedRouterHandler) { + callback.apply(void 0, args); + } else { + // Delay all listeners besides ConnectedRouter + setTimeout(function () { + callback.apply(void 0, args); + }); + } + }); + }; + + return history; +} + +/* harmony default export */ var index_esm = __webpack_exports__["a"] = (index); + + + +/***/ }), + +/***/ "HiXI": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.trim-end.js ***! + \************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var $trimEnd = __webpack_require__(/*! ../internals/string-trim */ "WKiH").end; +var forcedStringTrimMethod = __webpack_require__(/*! ../internals/string-trim-forced */ "yNLB"); + +var FORCED = forcedStringTrimMethod('trimEnd'); + +var trimEnd = FORCED ? function trimEnd() { + return $trimEnd(this); +} : ''.trimEnd; + +// `String.prototype.{ trimEnd, trimRight }` methods +// https://github.com/tc39/ecmascript-string-left-right-trim +$({ target: 'String', proto: true, forced: FORCED }, { + trimEnd: trimEnd, + trimRight: trimEnd +}); + + +/***/ }), + +/***/ "HsHA": +/*!******************************************************!*\ + !*** ./node_modules/core-js/internals/math-log1p.js ***! + \******************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +var log = Math.log; + +// `Math.log1p` method implementation +// https://tc39.github.io/ecma262/#sec-math.log1p +module.exports = Math.log1p || function log1p(x) { + return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : log(1 + x); +}; + + +/***/ }), + +/***/ "HyNC": +/*!*******************************************************************************************!*\ + !*** ./node_modules/@umijs/preset-built-in/node_modules/@umijs/runtime/dist/index.esm.js ***! + \*******************************************************************************************/ +/*! exports provided: Link, MemoryRouter, NavLink, Prompt, Redirect, Route, Router, StaticRouter, Switch, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter, __RouterContext, createBrowserHistory, createHashHistory, createMemoryHistory, ApplyPluginsType, Plugin, dynamic */ +/*! exports used: ApplyPluginsType, Plugin, dynamic */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ApplyPluginsType; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Plugin; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return dynamic; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var use_subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! use-subscription */ "/ccO"); +/* harmony import */ var use_subscription__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(use_subscription__WEBPACK_IMPORTED_MODULE_1__); + + + + + + +function _typeof(obj) { + "@babel/helpers - typeof"; + + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); +} + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(_next, _throw); + } +} + +function _asyncToGenerator(fn) { + return function () { + var self = this, + args = arguments; + return new Promise(function (resolve, reject) { + var gen = fn.apply(self, args); + + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); + } + + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); + } + + _next(undefined); + }); + }; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + keys.push.apply(keys, symbols); + } + + return keys; +} + +function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys(Object(source), true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; +} + +function _toArray(arr) { + return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); +} + +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} + +function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); +} + +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(n); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); +} + +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + + return arr2; +} + +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} + +function _createForOfIteratorHelper(o) { + if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { + if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { + var i = 0; + + var F = function () {}; + + return { + s: F, + n: function () { + if (i >= o.length) return { + done: true + }; + return { + done: false, + value: o[i++] + }; + }, + e: function (e) { + throw e; + }, + f: F + }; + } + + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + + var it, + normalCompletion = true, + didErr = false, + err; + return { + s: function () { + it = o[Symbol.iterator](); + }, + n: function () { + var step = it.next(); + normalCompletion = step.done; + return step; + }, + e: function (e) { + didErr = true; + err = e; + }, + f: function () { + try { + if (!normalCompletion && it.return != null) it.return(); + } finally { + if (didErr) throw err; + } + } + }; +} + +function assert(value, message) { + if (!value) throw new Error(message); +} + +var ApplyPluginsType; + +(function (ApplyPluginsType) { + ApplyPluginsType["compose"] = "compose"; + ApplyPluginsType["modify"] = "modify"; + ApplyPluginsType["event"] = "event"; +})(ApplyPluginsType || (ApplyPluginsType = {})); + +function _compose(_ref) { + var fns = _ref.fns, + args = _ref.args; + + if (fns.length === 1) { + return fns[0]; + } + + var last = fns.pop(); + return fns.reduce(function (a, b) { + return function () { + return b(a, args); + }; + }, last); +} + +function isPromiseLike(obj) { + return !!obj && _typeof(obj) === 'object' && typeof obj.then === 'function'; +} + +var Plugin = /*#__PURE__*/function () { + function Plugin(opts) { + _classCallCheck(this, Plugin); + + this.hooks = {}; + this.validKeys = (opts === null || opts === void 0 ? void 0 : opts.validKeys) || []; + } + + _createClass(Plugin, [{ + key: "register", + value: function register(plugin) { + var _this = this; + + assert(!!plugin.apply, "register failed, plugin.apply must supplied"); + assert(!!plugin.path, "register failed, plugin.path must supplied"); + Object.keys(plugin.apply).forEach(function (key) { + assert(_this.validKeys.indexOf(key) > -1, "register failed, invalid key ".concat(key, " from plugin ").concat(plugin.path, ".")); + if (!_this.hooks[key]) _this.hooks[key] = []; + _this.hooks[key] = _this.hooks[key].concat(plugin.apply[key]); + }); + } + }, { + key: "getHooks", + value: function getHooks(keyWithDot) { + var _keyWithDot$split = keyWithDot.split('.'), + _keyWithDot$split2 = _toArray(_keyWithDot$split), + key = _keyWithDot$split2[0], + memberKeys = _keyWithDot$split2.slice(1); + + var hooks = this.hooks[key] || []; + + if (memberKeys.length) { + hooks = hooks.map(function (hook) { + try { + var ret = hook; + + var _iterator = _createForOfIteratorHelper(memberKeys), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var memberKey = _step.value; + ret = ret[memberKey]; + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + return ret; + } catch (e) { + return null; + } + }).filter(Boolean); + } + + return hooks; + } + }, { + key: "applyPlugins", + value: function applyPlugins(_ref2) { + var key = _ref2.key, + type = _ref2.type, + initialValue = _ref2.initialValue, + args = _ref2.args, + async = _ref2.async; + var hooks = this.getHooks(key) || []; + + if (args) { + assert(_typeof(args) === 'object', "applyPlugins failed, args must be plain object."); + } + + switch (type) { + case ApplyPluginsType.modify: + if (async) { + return hooks.reduce( /*#__PURE__*/function () { + var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(memo, hook) { + var ret; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + assert(typeof hook === 'function' || _typeof(hook) === 'object' || isPromiseLike(hook), "applyPlugins failed, all hooks for key ".concat(key, " must be function, plain object or Promise.")); + + if (!isPromiseLike(memo)) { + _context.next = 5; + break; + } + + _context.next = 4; + return memo; + + case 4: + memo = _context.sent; + + case 5: + if (!(typeof hook === 'function')) { + _context.next = 16; + break; + } + + ret = hook(memo, args); + + if (!isPromiseLike(ret)) { + _context.next = 13; + break; + } + + _context.next = 10; + return ret; + + case 10: + return _context.abrupt("return", _context.sent); + + case 13: + return _context.abrupt("return", ret); + + case 14: + _context.next = 21; + break; + + case 16: + if (!isPromiseLike(hook)) { + _context.next = 20; + break; + } + + _context.next = 19; + return hook; + + case 19: + hook = _context.sent; + + case 20: + return _context.abrupt("return", _objectSpread2({}, memo, {}, hook)); + + case 21: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function (_x, _x2) { + return _ref3.apply(this, arguments); + }; + }(), isPromiseLike(initialValue) ? initialValue : Promise.resolve(initialValue)); + } else { + return hooks.reduce(function (memo, hook) { + assert(typeof hook === 'function' || _typeof(hook) === 'object', "applyPlugins failed, all hooks for key ".concat(key, " must be function or plain object.")); + + if (typeof hook === 'function') { + return hook(memo, args); + } else { + // TODO: deepmerge? + return _objectSpread2({}, memo, {}, hook); + } + }, initialValue); + } + + case ApplyPluginsType.event: + return hooks.forEach(function (hook) { + assert(typeof hook === 'function', "applyPlugins failed, all hooks for key ".concat(key, " must be function.")); + hook(args); + }); + + case ApplyPluginsType.compose: + return function () { + return _compose({ + fns: hooks.concat(initialValue), + args: args + })(); + }; + } + } + }]); + + return Plugin; +}(); + +var LoadableContext = Object(react__WEBPACK_IMPORTED_MODULE_0__["createContext"])(null); + +var ALL_INITIALIZERS = []; +var READY_INITIALIZERS = []; +var initialized = false; + +function load(loader) { + var promise = loader(); + var state = { + loading: true, + loaded: null, + error: null + }; + state.promise = promise.then(function (loaded) { + state.loading = false; + state.loaded = loaded; + return loaded; + }).catch(function (err) { + state.loading = false; + state.error = err; + throw err; + }); + return state; +} + +function loadMap(obj) { + var state = { + loading: false, + loaded: {}, + error: null + }; + var promises = []; + + try { + Object.keys(obj).forEach(function (key) { + var result = load(obj[key]); + + if (!result.loading) { + state.loaded[key] = result.loaded; + state.error = result.error; + } else { + state.loading = true; + } + + promises.push(result.promise); + result.promise.then(function (res) { + state.loaded[key] = res; + }).catch(function (err) { + state.error = err; + }); + }); + } catch (err) { + state.error = err; + } + + state.promise = Promise.all(promises).then(function (res) { + state.loading = false; + return res; + }).catch(function (err) { + state.loading = false; + throw err; + }); + return state; +} + +function resolve(obj) { + return obj && obj.__esModule ? obj.default : obj; +} + +function render(loaded, props) { + return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(resolve(loaded), props); +} + +function createLoadableComponent(loadFn, options) { + var opts = Object.assign({ + loader: null, + loading: null, + delay: 200, + timeout: null, + render: render, + webpack: null, + modules: null + }, options); + var subscription = null; + + function init() { + if (!subscription) { + var sub = new LoadableSubscription(loadFn, opts); + subscription = { + getCurrentValue: sub.getCurrentValue.bind(sub), + subscribe: sub.subscribe.bind(sub), + retry: sub.retry.bind(sub), + promise: sub.promise.bind(sub) + }; + } + + return subscription.promise(); + } // Server only + + + if (typeof window === 'undefined') { + ALL_INITIALIZERS.push(init); + } // Client only + + + if (!initialized && typeof window !== 'undefined' && typeof opts.webpack === 'function') { + var moduleIds = opts.webpack(); + READY_INITIALIZERS.push(function (ids) { + var _iterator = _createForOfIteratorHelper(moduleIds), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var moduleId = _step.value; + + if (ids.indexOf(moduleId) !== -1) { + return init(); + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + }); + } + + var LoadableComponent = function LoadableComponent(props, ref) { + init(); + var context = react__WEBPACK_IMPORTED_MODULE_0___default.a.useContext(LoadableContext); + var state = Object(use_subscription__WEBPACK_IMPORTED_MODULE_1__["useSubscription"])(subscription); + react__WEBPACK_IMPORTED_MODULE_0___default.a.useImperativeHandle(ref, function () { + return { + retry: subscription.retry + }; + }); + + if (context && Array.isArray(opts.modules)) { + opts.modules.forEach(function (moduleName) { + context(moduleName); + }); + } + + if (state.loading || state.error) { + return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(opts.loading, { + isLoading: state.loading, + pastDelay: state.pastDelay, + timedOut: state.timedOut, + error: state.error, + retry: subscription.retry + }); + } else if (state.loaded) { + return opts.render(state.loaded, props); + } else { + return null; + } + }; + + var LoadableComponentWithRef = react__WEBPACK_IMPORTED_MODULE_0___default.a.forwardRef(LoadableComponent); // add static method in React.forwardRef + // https://github.com/facebook/react/issues/17830 + + LoadableComponentWithRef.preload = function () { + return init(); + }; + + LoadableComponentWithRef.displayName = 'LoadableComponent'; + return LoadableComponentWithRef; +} + +var LoadableSubscription = /*#__PURE__*/function () { + function LoadableSubscription(loadFn, opts) { + _classCallCheck(this, LoadableSubscription); + + this._loadFn = loadFn; + this._opts = opts; + this._callbacks = new Set(); + this._delay = null; + this._timeout = null; + this.retry(); + } + + _createClass(LoadableSubscription, [{ + key: "promise", + value: function promise() { + return this._res.promise; + } + }, { + key: "retry", + value: function retry() { + var _this = this; + + this._clearTimeouts(); + + this._res = this._loadFn(this._opts.loader); + this._state = { + pastDelay: false, + timedOut: false + }; + var res = this._res, + opts = this._opts; + + if (res.loading) { + if (typeof opts.delay === 'number') { + if (opts.delay === 0) { + this._state.pastDelay = true; + } else { + this._delay = setTimeout(function () { + _this._update({ + pastDelay: true + }); + }, opts.delay); + } + } + + if (typeof opts.timeout === 'number') { + this._timeout = setTimeout(function () { + _this._update({ + timedOut: true + }); + }, opts.timeout); + } + } + + this._res.promise.then(function () { + _this._update(); + + _this._clearTimeouts(); + }) // eslint-disable-next-line handle-callback-err + .catch(function (err) { + _this._update(); + + _this._clearTimeouts(); + }); + + this._update({}); + } + }, { + key: "_update", + value: function _update(partial) { + this._state = _objectSpread2({}, this._state, {}, partial); + + this._callbacks.forEach(function (callback) { + return callback(); + }); + } + }, { + key: "_clearTimeouts", + value: function _clearTimeouts() { + clearTimeout(this._delay); + clearTimeout(this._timeout); + } + }, { + key: "getCurrentValue", + value: function getCurrentValue() { + return _objectSpread2({}, this._state, { + error: this._res.error, + loaded: this._res.loaded, + loading: this._res.loading + }); + } + }, { + key: "subscribe", + value: function subscribe(callback) { + var _this2 = this; + + this._callbacks.add(callback); + + return function () { + _this2._callbacks.delete(callback); + }; + } + }]); + + return LoadableSubscription; +}(); + +function Loadable(opts) { + return createLoadableComponent(load, opts); +} + +function LoadableMap(opts) { + if (typeof opts.render !== 'function') { + throw new Error('LoadableMap requires a `render(loaded, props)` function'); + } + + return createLoadableComponent(loadMap, opts); +} + +Loadable.Map = LoadableMap; + +function flushInitializers(initializers, ids) { + var promises = []; + + while (initializers.length) { + var init = initializers.pop(); + promises.push(init(ids)); + } + + return Promise.all(promises).then(function () { + if (initializers.length) { + return flushInitializers(initializers, ids); + } + }); +} + +Loadable.preloadAll = function () { + return new Promise(function (resolve, reject) { + flushInitializers(ALL_INITIALIZERS).then(resolve, reject); + }); +}; + +Loadable.preloadReady = function () { + var ids = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + return new Promise(function (resolve) { + var res = function res() { + initialized = true; + return resolve(); + }; // We always will resolve, errors should be handled within loading UIs. + + + flushInitializers(READY_INITIALIZERS, ids).then(res, res); + }); +}; + +if (typeof window !== 'undefined') { + window.__NEXT_PRELOADREADY = Loadable.preloadReady; +} + +function dynamic (opts) { + var loadableFn = Loadable; + var loadableOptions = { + loading: function loading(_ref) { + var error = _ref.error, + isLoading = _ref.isLoading; + + if (false) {} + + return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["createElement"])("p", null, "loading..."); + } + }; // Support for direct import(), + // eg: dynamic(() => import('../hello-world')) + + if (typeof opts === 'function') { + loadableOptions.loader = opts; // Support for having first argument being options, + // eg: dynamic({loader: import('../hello-world')}) + } else if (_typeof(opts) === 'object') { + loadableOptions = _objectSpread2({}, loadableOptions, {}, opts); + } else { + throw new Error("Unexpect arguments ".concat(opts)); + } // Support for passing options, + // eg: dynamic(import('../hello-world'), {loading: () =>

Loading something

}) + // loadableOptions = { ...loadableOptions, ...options }; + + + return loadableFn(loadableOptions); +} + + + + +/***/ }), + +/***/ "I+eb": +/*!**************************************************!*\ + !*** ./node_modules/core-js/internals/export.js ***! + \**************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(/*! ../internals/global */ "2oRo"); +var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V").f; +var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp"); +var redefine = __webpack_require__(/*! ../internals/redefine */ "busE"); +var setGlobal = __webpack_require__(/*! ../internals/set-global */ "zk60"); +var copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ "6JNq"); +var isForced = __webpack_require__(/*! ../internals/is-forced */ "lMq5"); + +/* + options.target - name of the target object + options.global - target is the global object + options.stat - export as static methods of target + options.proto - export as prototype methods of target + options.real - real prototype method for the `pure` version + options.forced - export even if the native feature is available + options.bind - bind methods to the target, required for the `pure` version + options.wrap - wrap constructors to preventing global pollution, required for the `pure` version + options.unsafe - use the simple assignment of property instead of delete + defineProperty + options.sham - add a flag to not completely full polyfills + options.enumerable - export as enumerable property + options.noTargetGet - prevent calling a getter on target +*/ +module.exports = function (options, source) { + var TARGET = options.target; + var GLOBAL = options.global; + var STATIC = options.stat; + var FORCED, target, key, targetProperty, sourceProperty, descriptor; + if (GLOBAL) { + target = global; + } else if (STATIC) { + target = global[TARGET] || setGlobal(TARGET, {}); + } else { + target = (global[TARGET] || {}).prototype; + } + if (target) for (key in source) { + sourceProperty = source[key]; + if (options.noTargetGet) { + descriptor = getOwnPropertyDescriptor(target, key); + targetProperty = descriptor && descriptor.value; + } else targetProperty = target[key]; + FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); + // contained in target + if (!FORCED && targetProperty !== undefined) { + if (typeof sourceProperty === typeof targetProperty) continue; + copyConstructorProperties(sourceProperty, targetProperty); + } + // add a flag to not completely full polyfills + if (options.sham || (targetProperty && targetProperty.sham)) { + createNonEnumerableProperty(sourceProperty, 'sham', true); + } + // extend global + redefine(target, key, sourceProperty, options); + } +}; + + +/***/ }), + +/***/ "I1Gw": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/es.symbol.split.js ***! + \*********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n"); + +// `Symbol.split` well-known symbol +// https://tc39.github.io/ecma262/#sec-symbol.split +defineWellKnownSymbol('split'); + + +/***/ }), + +/***/ "I5X1": +/*!*******************************************************!*\ + !*** ./src/.umi-production/plugin-model/useModel.tsx ***! + \*******************************************************/ +/*! exports provided: useModel */ +/*! exports used: useModel */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useModel; }); +/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */ "tJVT"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_plugin_model_node_modules_fast_deep_equal_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@umijs/plugin-model/node_modules/fast-deep-equal/index.js */ "1WJl"); +/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_plugin_model_node_modules_fast_deep_equal_index_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(D_projects_competitions_forgeplus_react_node_modules_umijs_plugin_model_node_modules_fast_deep_equal_index_js__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_plugin_model_lib_helpers_constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@umijs/plugin-model/lib/helpers/constant */ "FMtG"); +/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_plugin_model_lib_helpers_constant__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(D_projects_competitions_forgeplus_react_node_modules_umijs_plugin_model_lib_helpers_constant__WEBPACK_IMPORTED_MODULE_3__); + +// @ts-nocheck + +// @ts-ignore + +// @ts-ignore + +function useModel(namespace, updater) { + var dispatcher = Object(react__WEBPACK_IMPORTED_MODULE_1__["useContext"])(D_projects_competitions_forgeplus_react_node_modules_umijs_plugin_model_lib_helpers_constant__WEBPACK_IMPORTED_MODULE_3__["UmiContext"]); + var updaterRef = Object(react__WEBPACK_IMPORTED_MODULE_1__["useRef"])(updater); + updaterRef.current = updater; + var _useState = Object(react__WEBPACK_IMPORTED_MODULE_1__["useState"])(function () { + return updaterRef.current ? updaterRef.current(dispatcher.data[namespace]) : dispatcher.data[namespace]; + }), + _useState2 = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_useState, 2), + state = _useState2[0], + setState = _useState2[1]; + var stateRef = Object(react__WEBPACK_IMPORTED_MODULE_1__["useRef"])(state); + stateRef.current = state; + Object(react__WEBPACK_IMPORTED_MODULE_1__["useEffect"])(function () { + var handler = function handler(e) { + if (updater && updaterRef.current) { + var currentState = updaterRef.current(e); + var previousState = stateRef.current; + if (!D_projects_competitions_forgeplus_react_node_modules_umijs_plugin_model_node_modules_fast_deep_equal_index_js__WEBPACK_IMPORTED_MODULE_2___default()(currentState, previousState)) { + setState(currentState); + } + } else { + setState(e); + } + }; + try { + dispatcher.callbacks[namespace].add(handler); + } catch (e) { + dispatcher.callbacks[namespace] = new Set(); + dispatcher.callbacks[namespace].add(handler); + } + return function () { + dispatcher.callbacks[namespace].delete(handler); + }; + }, [namespace]); + return state; +} +; + +/***/ }), + +/***/ "I8vh": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/internals/to-absolute-index.js ***! + \*************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(/*! ../internals/to-integer */ "ppGB"); + +var max = Math.max; +var min = Math.min; + +// Helper for a popular repeating case of the spec: +// Let integer be ? ToInteger(index). +// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). +module.exports = function (index, length) { + var integer = toInteger(index); + return integer < 0 ? max(integer + length, 0) : min(integer, length); +}; + + +/***/ }), + +/***/ "I9xj": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/es.math.to-string-tag.js ***! + \***************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "1E5z"); + +// Math[@@toStringTag] property +// https://tc39.github.io/ecma262/#sec-math-@@tostringtag +setToStringTag(Math, 'Math', true); + + +/***/ }), + +/***/ "IL/d": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/es.typed-array.from.js ***! + \*************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = __webpack_require__(/*! ../internals/typed-array-constructors-require-wrappers */ "iqeF"); +var exportTypedArrayStaticMethod = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC").exportTypedArrayStaticMethod; +var typedArrayFrom = __webpack_require__(/*! ../internals/typed-array-from */ "oHi+"); + +// `%TypedArray%.from` method +// https://tc39.github.io/ecma262/#sec-%typedarray%.from +exportTypedArrayStaticMethod('from', typedArrayFrom, TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS); + + +/***/ }), + +/***/ "ITfd": +/*!***********************************************!*\ + !*** ./node_modules/hash.js/lib/hash/hmac.js ***! + \***********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(/*! ./utils */ "w8CP"); +var assert = __webpack_require__(/*! minimalistic-assert */ "2j6C"); + +function Hmac(hash, key, enc) { + if (!(this instanceof Hmac)) + return new Hmac(hash, key, enc); + this.Hash = hash; + this.blockSize = hash.blockSize / 8; + this.outSize = hash.outSize / 8; + this.inner = null; + this.outer = null; + + this._init(utils.toArray(key, enc)); +} +module.exports = Hmac; + +Hmac.prototype._init = function init(key) { + // Shorten key, if needed + if (key.length > this.blockSize) + key = new this.Hash().update(key).digest(); + assert(key.length <= this.blockSize); + + // Add padding to key + for (var i = key.length; i < this.blockSize; i++) + key.push(0); + + for (i = 0; i < key.length; i++) + key[i] ^= 0x36; + this.inner = new this.Hash().update(key); + + // 0x36 ^ 0x5c = 0x6a + for (i = 0; i < key.length; i++) + key[i] ^= 0x6a; + this.outer = new this.Hash().update(key); +}; + +Hmac.prototype.update = function update(msg, enc) { + this.inner.update(msg, enc); + return this; +}; + +Hmac.prototype.digest = function digest(enc) { + this.outer.update(this.inner.digest()); + return this.outer.digest(enc); +}; + + +/***/ }), + +/***/ "IZzc": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/es.typed-array.sort.js ***! + \*************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC"); + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; +var $sort = [].sort; + +// `%TypedArray%.prototype.sort` method +// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.sort +exportTypedArrayMethod('sort', function sort(comparefn) { + return $sort.call(aTypedArray(this), comparefn); +}); + + +/***/ }), + +/***/ "Ijbi": +/*!******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! + \******************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "WkPL"); +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return arrayLikeToArray(arr); +} +module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "ImZN": +/*!***************************************************!*\ + !*** ./node_modules/core-js/internals/iterate.js ***! + \***************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk"); +var isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ "6VoE"); +var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ"); +var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE"); +var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ "NaFW"); +var callWithSafeIterationClosing = __webpack_require__(/*! ../internals/call-with-safe-iteration-closing */ "m92n"); + +var Result = function (stopped, result) { + this.stopped = stopped; + this.result = result; +}; + +var iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) { + var boundFunction = bind(fn, that, AS_ENTRIES ? 2 : 1); + var iterator, iterFn, index, length, result, next, step; + + if (IS_ITERATOR) { + iterator = iterable; + } else { + iterFn = getIteratorMethod(iterable); + if (typeof iterFn != 'function') throw TypeError('Target is not iterable'); + // optimisation for array iterators + if (isArrayIteratorMethod(iterFn)) { + for (index = 0, length = toLength(iterable.length); length > index; index++) { + result = AS_ENTRIES + ? boundFunction(anObject(step = iterable[index])[0], step[1]) + : boundFunction(iterable[index]); + if (result && result instanceof Result) return result; + } return new Result(false); + } + iterator = iterFn.call(iterable); + } + + next = iterator.next; + while (!(step = next.call(iterator)).done) { + result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES); + if (typeof result == 'object' && result && result instanceof Result) return result; + } return new Result(false); +}; + +iterate.stop = function (result) { + return new Result(true, result); +}; + + +/***/ }), + +/***/ "IxXR": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.strike.js ***! + \**********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var createHTML = __webpack_require__(/*! ../internals/create-html */ "hXpO"); +var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "rwPt"); + +// `String.prototype.strike` method +// https://tc39.github.io/ecma262/#sec-string.prototype.strike +$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('strike') }, { + strike: function strike() { + return createHTML(this, 'strike', '', ''); + } +}); + + +/***/ }), + +/***/ "J4zp": +/*!**************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***! + \**************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "wTVA"); +var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "m0LI"); +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "ZhPi"); +var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "wkBT"); +function _slicedToArray(arr, i) { + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); +} +module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "J84W": +/*!*************************************************************!*\ + !*** ./node_modules/@ant-design/icons/CheckCircleFilled.js ***! + \*************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; + + var _CheckCircleFilled = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/CheckCircleFilled */ "bz9Y")); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _default = _CheckCircleFilled; + exports.default = _default; + module.exports = _default; + +/***/ }), + +/***/ "JBy8": +/*!*************************************************************************!*\ + !*** ./node_modules/core-js/internals/object-get-own-property-names.js ***! + \*************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ "yoRg"); +var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "eDl+"); + +var hiddenKeys = enumBugKeys.concat('length', 'prototype'); + +// `Object.getOwnPropertyNames` method +// https://tc39.github.io/ecma262/#sec-object.getownpropertynames +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return internalObjectKeys(O, hiddenKeys); +}; + + +/***/ }), + +/***/ "JTJg": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.includes.js ***! + \************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var notARegExp = __webpack_require__(/*! ../internals/not-a-regexp */ "WjRb"); +var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF"); +var correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ "qxPZ"); + +// `String.prototype.includes` method +// https://tc39.github.io/ecma262/#sec-string.prototype.includes +$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, { + includes: function includes(searchString /* , position = 0 */) { + return !!~String(requireObjectCoercible(this)) + .indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined); + } +}); + + +/***/ }), + +/***/ "JX7q": +/*!**************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.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 _assertThisInitialized; }); +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return self; +} + +/***/ }), + +/***/ "JaFt": +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/modules/es.typed-array.reduce-right.js ***! + \*********************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC"); +var $reduceRight = __webpack_require__(/*! ../internals/array-reduce */ "1Y/n").right; + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; + +// `%TypedArray%.prototype.reduceRicht` method +// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reduceright +exportTypedArrayMethod('reduceRight', function reduceRight(callbackfn /* , initialValue */) { + return $reduceRight(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined); +}); + + +/***/ }), + +/***/ "JevA": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/es.number.parse-int.js ***! + \*************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var parseInt = __webpack_require__(/*! ../internals/number-parse-int */ "wg0c"); + +// `Number.parseInt` method +// https://tc39.github.io/ecma262/#sec-number.parseint +$({ target: 'Number', stat: true, forced: Number.parseInt != parseInt }, { + parseInt: parseInt +}); + + +/***/ }), + +/***/ "JfAA": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/es.regexp.to-string.js ***! + \*************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var redefine = __webpack_require__(/*! ../internals/redefine */ "busE"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk"); +var fails = __webpack_require__(/*! ../internals/fails */ "0Dky"); +var flags = __webpack_require__(/*! ../internals/regexp-flags */ "rW0t"); + +var TO_STRING = 'toString'; +var RegExpPrototype = RegExp.prototype; +var nativeToString = RegExpPrototype[TO_STRING]; + +var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; }); +// FF44- RegExp#toString has a wrong name +var INCORRECT_NAME = nativeToString.name != TO_STRING; + +// `RegExp.prototype.toString` method +// https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring +if (NOT_GENERIC || INCORRECT_NAME) { + redefine(RegExp.prototype, TO_STRING, function toString() { + var R = anObject(this); + var p = String(R.source); + var rf = R.flags; + var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf); + return '/' + p + '/' + f; + }, { unsafe: true }); +} + + +/***/ }), + +/***/ "Ji7U": +/*!*************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/inherits.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 _inherits; }); +/* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf.js */ "s4An"); + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + Object.defineProperty(subClass, "prototype", { + writable: false + }); + if (superClass) Object(_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(subClass, superClass); +} + +/***/ }), + +/***/ "JiZb": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/set-species.js ***! + \*******************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY"); +var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "m/L8"); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp"); +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/"); + +var SPECIES = wellKnownSymbol('species'); + +module.exports = function (CONSTRUCTOR_NAME) { + var Constructor = getBuiltIn(CONSTRUCTOR_NAME); + var defineProperty = definePropertyModule.f; + + if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) { + defineProperty(Constructor, SPECIES, { + configurable: true, + get: function () { return this; } + }); + } +}; + + +/***/ }), + +/***/ "JwUS": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.set.reduce.js ***! + \***********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM"); +var getSetIterator = __webpack_require__(/*! ../internals/get-set-iterator */ "WGBp"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN"); + +// `Set.prototype.reduce` method +// https://github.com/tc39/proposal-collection-methods +$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { + reduce: function reduce(callbackfn /* , initialValue */) { + var set = anObject(this); + var iterator = getSetIterator(set); + var noInitial = arguments.length < 2; + var accumulator = noInitial ? undefined : arguments[1]; + aFunction(callbackfn); + iterate(iterator, function (value) { + if (noInitial) { + noInitial = false; + accumulator = value; + } else { + accumulator = callbackfn(accumulator, value, value, set); + } + }, undefined, false, true); + if (noInitial) throw TypeError('Reduce of empty set with no initial value'); + return accumulator; + } +}); + + +/***/ }), + +/***/ "JxQ3": +/*!**********************************************!*\ + !*** ./node_modules/object-inspect/index.js ***! + \**********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {var hasMap = typeof Map === 'function' && Map.prototype; +var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; +var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; +var mapForEach = hasMap && Map.prototype.forEach; +var hasSet = typeof Set === 'function' && Set.prototype; +var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null; +var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null; +var setForEach = hasSet && Set.prototype.forEach; +var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype; +var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; +var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype; +var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; +var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype; +var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; +var booleanValueOf = Boolean.prototype.valueOf; +var objectToString = Object.prototype.toString; +var functionToString = Function.prototype.toString; +var $match = String.prototype.match; +var $slice = String.prototype.slice; +var $replace = String.prototype.replace; +var $toUpperCase = String.prototype.toUpperCase; +var $toLowerCase = String.prototype.toLowerCase; +var $test = RegExp.prototype.test; +var $concat = Array.prototype.concat; +var $join = Array.prototype.join; +var $arrSlice = Array.prototype.slice; +var $floor = Math.floor; +var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null; +var gOPS = Object.getOwnPropertySymbols; +var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null; +var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object'; +// ie, `has-tostringtag/shams +var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') + ? Symbol.toStringTag + : null; +var isEnumerable = Object.prototype.propertyIsEnumerable; + +var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ( + [].__proto__ === Array.prototype // eslint-disable-line no-proto + ? function (O) { + return O.__proto__; // eslint-disable-line no-proto + } + : null +); + +function addNumericSeparator(num, str) { + if ( + num === Infinity + || num === -Infinity + || num !== num + || (num && num > -1000 && num < 1000) + || $test.call(/e/, str) + ) { + return str; + } + var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; + if (typeof num === 'number') { + var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num) + if (int !== num) { + var intStr = String(int); + var dec = $slice.call(str, intStr.length + 1); + return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, ''); + } + } + return $replace.call(str, sepRegex, '$&_'); +} + +var utilInspect = __webpack_require__(/*! ./util.inspect */ 2); +var inspectCustom = utilInspect.custom; +var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; + +module.exports = function inspect_(obj, options, depth, seen) { + var opts = options || {}; + + if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) { + throw new TypeError('option "quoteStyle" must be "single" or "double"'); + } + if ( + has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' + ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity + : opts.maxStringLength !== null + ) + ) { + throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); + } + var customInspect = has(opts, 'customInspect') ? opts.customInspect : true; + if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') { + throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`'); + } + + if ( + has(opts, 'indent') + && opts.indent !== null + && opts.indent !== '\t' + && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0) + ) { + throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); + } + if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') { + throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); + } + var numericSeparator = opts.numericSeparator; + + if (typeof obj === 'undefined') { + return 'undefined'; + } + if (obj === null) { + return 'null'; + } + if (typeof obj === 'boolean') { + return obj ? 'true' : 'false'; + } + + if (typeof obj === 'string') { + return inspectString(obj, opts); + } + if (typeof obj === 'number') { + if (obj === 0) { + return Infinity / obj > 0 ? '0' : '-0'; + } + var str = String(obj); + return numericSeparator ? addNumericSeparator(obj, str) : str; + } + if (typeof obj === 'bigint') { + var bigIntStr = String(obj) + 'n'; + return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; + } + + var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth; + if (typeof depth === 'undefined') { depth = 0; } + if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') { + return isArray(obj) ? '[Array]' : '[Object]'; + } + + var indent = getIndent(opts, depth); + + if (typeof seen === 'undefined') { + seen = []; + } else if (indexOf(seen, obj) >= 0) { + return '[Circular]'; + } + + function inspect(value, from, noIndent) { + if (from) { + seen = $arrSlice.call(seen); + seen.push(from); + } + if (noIndent) { + var newOpts = { + depth: opts.depth + }; + if (has(opts, 'quoteStyle')) { + newOpts.quoteStyle = opts.quoteStyle; + } + return inspect_(value, newOpts, depth + 1, seen); + } + return inspect_(value, opts, depth + 1, seen); + } + + if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable + var name = nameOf(obj); + var keys = arrObjKeys(obj, inspect); + return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : ''); + } + if (isSymbol(obj)) { + var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj); + return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString; + } + if (isElement(obj)) { + var s = '<' + $toLowerCase.call(String(obj.nodeName)); + var attrs = obj.attributes || []; + for (var i = 0; i < attrs.length; i++) { + s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts); + } + s += '>'; + if (obj.childNodes && obj.childNodes.length) { s += '...'; } + s += ''; + return s; + } + if (isArray(obj)) { + if (obj.length === 0) { return '[]'; } + var xs = arrObjKeys(obj, inspect); + if (indent && !singleLineValues(xs)) { + return '[' + indentedJoin(xs, indent) + ']'; + } + return '[ ' + $join.call(xs, ', ') + ' ]'; + } + if (isError(obj)) { + var parts = arrObjKeys(obj, inspect); + if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) { + return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }'; + } + if (parts.length === 0) { return '[' + String(obj) + ']'; } + return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }'; + } + if (typeof obj === 'object' && customInspect) { + if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) { + return utilInspect(obj, { depth: maxDepth - depth }); + } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') { + return obj.inspect(); + } + } + if (isMap(obj)) { + var mapParts = []; + if (mapForEach) { + mapForEach.call(obj, function (value, key) { + mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj)); + }); + } + return collectionOf('Map', mapSize.call(obj), mapParts, indent); + } + if (isSet(obj)) { + var setParts = []; + if (setForEach) { + setForEach.call(obj, function (value) { + setParts.push(inspect(value, obj)); + }); + } + return collectionOf('Set', setSize.call(obj), setParts, indent); + } + if (isWeakMap(obj)) { + return weakCollectionOf('WeakMap'); + } + if (isWeakSet(obj)) { + return weakCollectionOf('WeakSet'); + } + if (isWeakRef(obj)) { + return weakCollectionOf('WeakRef'); + } + if (isNumber(obj)) { + return markBoxed(inspect(Number(obj))); + } + if (isBigInt(obj)) { + return markBoxed(inspect(bigIntValueOf.call(obj))); + } + if (isBoolean(obj)) { + return markBoxed(booleanValueOf.call(obj)); + } + if (isString(obj)) { + return markBoxed(inspect(String(obj))); + } + // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other + /* eslint-env browser */ + if (typeof window !== 'undefined' && obj === window) { + return '{ [object Window] }'; + } + if (obj === global) { + return '{ [object globalThis] }'; + } + if (!isDate(obj) && !isRegExp(obj)) { + var ys = arrObjKeys(obj, inspect); + var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; + var protoTag = obj instanceof Object ? '' : 'null prototype'; + var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : ''; + var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : ''; + var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : ''); + if (ys.length === 0) { return tag + '{}'; } + if (indent) { + return tag + '{' + indentedJoin(ys, indent) + '}'; + } + return tag + '{ ' + $join.call(ys, ', ') + ' }'; + } + return String(obj); +}; + +function wrapQuotes(s, defaultStyle, opts) { + var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'"; + return quoteChar + s + quoteChar; +} + +function quote(s) { + return $replace.call(String(s), /"/g, '"'); +} + +function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } + +// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives +function isSymbol(obj) { + if (hasShammedSymbols) { + return obj && typeof obj === 'object' && obj instanceof Symbol; + } + if (typeof obj === 'symbol') { + return true; + } + if (!obj || typeof obj !== 'object' || !symToString) { + return false; + } + try { + symToString.call(obj); + return true; + } catch (e) {} + return false; +} + +function isBigInt(obj) { + if (!obj || typeof obj !== 'object' || !bigIntValueOf) { + return false; + } + try { + bigIntValueOf.call(obj); + return true; + } catch (e) {} + return false; +} + +var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; }; +function has(obj, key) { + return hasOwn.call(obj, key); +} + +function toStr(obj) { + return objectToString.call(obj); +} + +function nameOf(f) { + if (f.name) { return f.name; } + var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); + if (m) { return m[1]; } + return null; +} + +function indexOf(xs, x) { + if (xs.indexOf) { return xs.indexOf(x); } + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) { return i; } + } + return -1; +} + +function isMap(x) { + if (!mapSize || !x || typeof x !== 'object') { + return false; + } + try { + mapSize.call(x); + try { + setSize.call(x); + } catch (s) { + return true; + } + return x instanceof Map; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakMap(x) { + if (!weakMapHas || !x || typeof x !== 'object') { + return false; + } + try { + weakMapHas.call(x, weakMapHas); + try { + weakSetHas.call(x, weakSetHas); + } catch (s) { + return true; + } + return x instanceof WeakMap; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakRef(x) { + if (!weakRefDeref || !x || typeof x !== 'object') { + return false; + } + try { + weakRefDeref.call(x); + return true; + } catch (e) {} + return false; +} + +function isSet(x) { + if (!setSize || !x || typeof x !== 'object') { + return false; + } + try { + setSize.call(x); + try { + mapSize.call(x); + } catch (m) { + return true; + } + return x instanceof Set; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakSet(x) { + if (!weakSetHas || !x || typeof x !== 'object') { + return false; + } + try { + weakSetHas.call(x, weakSetHas); + try { + weakMapHas.call(x, weakMapHas); + } catch (s) { + return true; + } + return x instanceof WeakSet; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isElement(x) { + if (!x || typeof x !== 'object') { return false; } + if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) { + return true; + } + return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function'; +} + +function inspectString(str, opts) { + if (str.length > opts.maxStringLength) { + var remaining = str.length - opts.maxStringLength; + var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : ''); + return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; + } + // eslint-disable-next-line no-control-regex + var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte); + return wrapQuotes(s, 'single', opts); +} + +function lowbyte(c) { + var n = c.charCodeAt(0); + var x = { + 8: 'b', + 9: 't', + 10: 'n', + 12: 'f', + 13: 'r' + }[n]; + if (x) { return '\\' + x; } + return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16)); +} + +function markBoxed(str) { + return 'Object(' + str + ')'; +} + +function weakCollectionOf(type) { + return type + ' { ? }'; +} + +function collectionOf(type, size, entries, indent) { + var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', '); + return type + ' (' + size + ') {' + joinedEntries + '}'; +} + +function singleLineValues(xs) { + for (var i = 0; i < xs.length; i++) { + if (indexOf(xs[i], '\n') >= 0) { + return false; + } + } + return true; +} + +function getIndent(opts, depth) { + var baseIndent; + if (opts.indent === '\t') { + baseIndent = '\t'; + } else if (typeof opts.indent === 'number' && opts.indent > 0) { + baseIndent = $join.call(Array(opts.indent + 1), ' '); + } else { + return null; + } + return { + base: baseIndent, + prev: $join.call(Array(depth + 1), baseIndent) + }; +} + +function indentedJoin(xs, indent) { + if (xs.length === 0) { return ''; } + var lineJoiner = '\n' + indent.prev + indent.base; + return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev; +} + +function arrObjKeys(obj, inspect) { + var isArr = isArray(obj); + var xs = []; + if (isArr) { + xs.length = obj.length; + for (var i = 0; i < obj.length; i++) { + xs[i] = has(obj, i) ? inspect(obj[i], obj) : ''; + } + } + var syms = typeof gOPS === 'function' ? gOPS(obj) : []; + var symMap; + if (hasShammedSymbols) { + symMap = {}; + for (var k = 0; k < syms.length; k++) { + symMap['$' + syms[k]] = syms[k]; + } + } + + for (var key in obj) { // eslint-disable-line no-restricted-syntax + if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) { + // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section + continue; // eslint-disable-line no-restricted-syntax, no-continue + } else if ($test.call(/[^\w$]/, key)) { + xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)); + } else { + xs.push(key + ': ' + inspect(obj[key], obj)); + } + } + if (typeof gOPS === 'function') { + for (var j = 0; j < syms.length; j++) { + if (isEnumerable.call(obj, syms[j])) { + xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj)); + } + } + } + return xs; +} + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "yLpj"))) + +/***/ }), + +/***/ "KAsB": +/*!********************************************************!*\ + !*** ./node_modules/antd/es/dropdown/style/index.less ***! + \********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), + +/***/ "KBXm": +/*!************************************************************************!*\ + !*** ./node_modules/@ant-design/icons-svg/lib/asn/EllipsisOutlined.js ***! + \************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// This icon file is generated automatically. +Object.defineProperty(exports, "__esModule", { value: true }); +var EllipsisOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, "name": "ellipsis", "theme": "outlined" }; +exports.default = EllipsisOutlined; + + +/***/ }), + +/***/ "KCY9": +/*!********************************************************!*\ + !*** ./node_modules/antd/es/checkbox/style/index.less ***! + \********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), + +/***/ "KQm4": +/*!**********************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules ***! + \**********************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js because of ./node_modules/antd/es/form/Form.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js because of ./node_modules/antd/es/form/Form.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js because of ./node_modules/antd/es/form/Form.js */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; }); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +var arrayLikeToArray = __webpack_require__("a3WO"); + +// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js + +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr); +} +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js +var iterableToArray = __webpack_require__("25BE"); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +var unsupportedIterableToArray = __webpack_require__("BsWD"); + +// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + + + + +function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread(); +} + +/***/ }), + +/***/ "KQxl": +/*!*******************************************************************!*\ + !*** ./node_modules/@ant-design/icons/lib/components/AntdIcon.js ***! + \*******************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt"); +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9")); +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "J4zp")); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "lSNA")); +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "QILm")); +var React = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI")); +var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "TSYQ")); +var _Context = _interopRequireDefault(__webpack_require__(/*! ./Context */ "Bgsj")); +var _IconBase = _interopRequireDefault(__webpack_require__(/*! ./IconBase */ "/qSt")); +var _twoTonePrimaryColor = __webpack_require__(/*! ./twoTonePrimaryColor */ "03hy"); +var _utils = __webpack_require__(/*! ../utils */ "vmBS"); +var _excluded = ["className", "icon", "spin", "rotate", "tabIndex", "onClick", "twoToneColor"]; +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +// Initial setting +// should move it to antd main repo? +(0, _twoTonePrimaryColor.setTwoToneColor)('#1890ff'); +var Icon = /*#__PURE__*/React.forwardRef(function (props, ref) { + var className = props.className, + icon = props.icon, + spin = props.spin, + rotate = props.rotate, + tabIndex = props.tabIndex, + onClick = props.onClick, + twoToneColor = props.twoToneColor, + restProps = (0, _objectWithoutProperties2.default)(props, _excluded); + var _React$useContext = React.useContext(_Context.default), + _React$useContext$pre = _React$useContext.prefixCls, + prefixCls = _React$useContext$pre === void 0 ? 'anticon' : _React$useContext$pre, + rootClassName = _React$useContext.rootClassName; + var classString = (0, _classnames.default)(rootClassName, prefixCls, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(prefixCls, "-").concat(icon.name), !!icon.name), "".concat(prefixCls, "-spin"), !!spin || icon.name === 'loading'), className); + var iconTabIndex = tabIndex; + if (iconTabIndex === undefined && onClick) { + iconTabIndex = -1; + } + var svgStyle = rotate ? { + msTransform: "rotate(".concat(rotate, "deg)"), + transform: "rotate(".concat(rotate, "deg)") + } : undefined; + var _normalizeTwoToneColo = (0, _utils.normalizeTwoToneColors)(twoToneColor), + _normalizeTwoToneColo2 = (0, _slicedToArray2.default)(_normalizeTwoToneColo, 2), + primaryColor = _normalizeTwoToneColo2[0], + secondaryColor = _normalizeTwoToneColo2[1]; + return /*#__PURE__*/React.createElement("span", (0, _objectSpread2.default)((0, _objectSpread2.default)({ + role: "img", + "aria-label": icon.name + }, restProps), {}, { + ref: ref, + tabIndex: iconTabIndex, + onClick: onClick, + className: classString + }), /*#__PURE__*/React.createElement(_IconBase.default, { + icon: icon, + primaryColor: primaryColor, + secondaryColor: secondaryColor, + style: svgStyle + })); +}); +Icon.displayName = 'AntdIcon'; +Icon.getTwoToneColor = _twoTonePrimaryColor.getTwoToneColor; +Icon.setTwoToneColor = _twoTonePrimaryColor.setTwoToneColor; +var _default = exports.default = Icon; + +/***/ }), + +/***/ "KS4O": +/*!************************************************************!*\ + !*** ./node_modules/@ant-design/css-animation/es/Event.js ***! + \************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var START_EVENT_NAME_MAP = { + transitionstart: { + transition: 'transitionstart', + WebkitTransition: 'webkitTransitionStart', + MozTransition: 'mozTransitionStart', + OTransition: 'oTransitionStart', + msTransition: 'MSTransitionStart' + }, + + animationstart: { + animation: 'animationstart', + WebkitAnimation: 'webkitAnimationStart', + MozAnimation: 'mozAnimationStart', + OAnimation: 'oAnimationStart', + msAnimation: 'MSAnimationStart' + } +}; + +var END_EVENT_NAME_MAP = { + transitionend: { + transition: 'transitionend', + WebkitTransition: 'webkitTransitionEnd', + MozTransition: 'mozTransitionEnd', + OTransition: 'oTransitionEnd', + msTransition: 'MSTransitionEnd' + }, + + animationend: { + animation: 'animationend', + WebkitAnimation: 'webkitAnimationEnd', + MozAnimation: 'mozAnimationEnd', + OAnimation: 'oAnimationEnd', + msAnimation: 'MSAnimationEnd' + } +}; + +var startEvents = []; +var endEvents = []; + +function detectEvents() { + var testEl = document.createElement('div'); + var style = testEl.style; + + if (!('AnimationEvent' in window)) { + delete START_EVENT_NAME_MAP.animationstart.animation; + delete END_EVENT_NAME_MAP.animationend.animation; + } + + if (!('TransitionEvent' in window)) { + delete START_EVENT_NAME_MAP.transitionstart.transition; + delete END_EVENT_NAME_MAP.transitionend.transition; + } + + function process(EVENT_NAME_MAP, events) { + for (var baseEventName in EVENT_NAME_MAP) { + if (EVENT_NAME_MAP.hasOwnProperty(baseEventName)) { + var baseEvents = EVENT_NAME_MAP[baseEventName]; + for (var styleName in baseEvents) { + if (styleName in style) { + events.push(baseEvents[styleName]); + break; + } + } + } + } + } + + process(START_EVENT_NAME_MAP, startEvents); + process(END_EVENT_NAME_MAP, endEvents); +} + +if (typeof window !== 'undefined' && typeof document !== 'undefined') { + detectEvents(); +} + +function addEventListener(node, eventName, eventListener) { + node.addEventListener(eventName, eventListener, false); +} + +function removeEventListener(node, eventName, eventListener) { + node.removeEventListener(eventName, eventListener, false); +} + +var TransitionEvents = { + // Start events + startEvents: startEvents, + + addStartEventListener: function addStartEventListener(node, eventListener) { + if (startEvents.length === 0) { + window.setTimeout(eventListener, 0); + return; + } + startEvents.forEach(function (startEvent) { + addEventListener(node, startEvent, eventListener); + }); + }, + removeStartEventListener: function removeStartEventListener(node, eventListener) { + if (startEvents.length === 0) { + return; + } + startEvents.forEach(function (startEvent) { + removeEventListener(node, startEvent, eventListener); + }); + }, + + + // End events + endEvents: endEvents, + + addEndEventListener: function addEndEventListener(node, eventListener) { + if (endEvents.length === 0) { + window.setTimeout(eventListener, 0); + return; + } + endEvents.forEach(function (endEvent) { + addEventListener(node, endEvent, eventListener); + }); + }, + removeEndEventListener: function removeEndEventListener(node, eventListener) { + if (endEvents.length === 0) { + return; + } + endEvents.forEach(function (endEvent) { + removeEventListener(node, endEvent, eventListener); + }); + } +}; + +/* harmony default export */ __webpack_exports__["a"] = (TransitionEvents); + +/***/ }), + +/***/ "KVSy": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/modules/es.typed-array.slice.js ***! + \**************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC"); +var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh"); +var fails = __webpack_require__(/*! ../internals/fails */ "0Dky"); + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; +var $slice = [].slice; + +var FORCED = fails(function () { + // eslint-disable-next-line no-undef + new Int8Array(1).slice(); +}); + +// `%TypedArray%.prototype.slice` method +// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.slice +exportTypedArrayMethod('slice', function slice(start, end) { + var list = $slice.call(aTypedArray(this), start, end); + var C = speciesConstructor(this, this.constructor); + var index = 0; + var length = list.length; + var result = new (aTypedArrayConstructor(C))(length); + while (length > index) result[index] = list[index++]; + return result; +}, FORCED); + + +/***/ }), + +/***/ "KW7l": +/*!*******************************************************!*\ + !*** ./node_modules/rc-field-form/es/FieldContext.js ***! + \*******************************************************/ +/*! exports provided: HOOK_MARK, default */ +/*! exports used: HOOK_MARK, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return HOOK_MARK; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var rc_util_es_warning__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-util/es/warning */ "Kwbf"); + + +var HOOK_MARK = 'RC_FORM_INTERNAL_HOOKS'; // eslint-disable-next-line @typescript-eslint/no-explicit-any + +var warningFunc = function warningFunc() { + Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(false, 'Can not find FormContext. Please make sure you wrap Field under Form.'); +}; + +var Context = react__WEBPACK_IMPORTED_MODULE_0__["createContext"]({ + getFieldValue: warningFunc, + getFieldsValue: warningFunc, + getFieldError: warningFunc, + getFieldsError: warningFunc, + isFieldsTouched: warningFunc, + isFieldTouched: warningFunc, + isFieldValidating: warningFunc, + isFieldsValidating: warningFunc, + resetFields: warningFunc, + setFields: warningFunc, + setFieldsValue: warningFunc, + validateFields: warningFunc, + submit: warningFunc, + getInternalHooks: function getInternalHooks() { + warningFunc(); + return { + dispatch: warningFunc, + registerField: warningFunc, + useSubscribe: warningFunc, + setInitialValues: warningFunc, + setCallbacks: warningFunc, + getFields: warningFunc, + setValidateMessages: warningFunc, + setPreserve: warningFunc + }; + } +}); +/* harmony default export */ __webpack_exports__["b"] = (Context); + +/***/ }), + +/***/ "KfNM": +/*!************************************************!*\ + !*** ./node_modules/lodash/_objectToString.js ***! + \************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} + +module.exports = objectToString; + + +/***/ }), + +/***/ "KhsS": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/es.symbol.match.js ***! + \*********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n"); + +// `Symbol.match` well-known symbol +// https://tc39.github.io/ecma262/#sec-symbol.match +defineWellKnownSymbol('match'); + + +/***/ }), + +/***/ "KpVd": +/*!********************************************************!*\ + !*** ./node_modules/async-validator/dist-web/index.js ***! + \********************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module uses injected variables (process) */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {function _extends() { + _extends = Object.assign || 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); +} + +function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); +} + +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + + try { + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + return true; + } catch (e) { + return false; + } +} + +function _construct(Parent, args, Class) { + if (_isNativeReflectConstruct()) { + _construct = Reflect.construct; + } else { + _construct = function _construct(Parent, args, Class) { + var a = [null]; + a.push.apply(a, args); + var Constructor = Function.bind.apply(Parent, a); + var instance = new Constructor(); + if (Class) _setPrototypeOf(instance, Class.prototype); + return instance; + }; + } + + return _construct.apply(null, arguments); +} + +function _isNativeFunction(fn) { + return Function.toString.call(fn).indexOf("[native code]") !== -1; +} + +function _wrapNativeSuper(Class) { + var _cache = typeof Map === "function" ? new Map() : undefined; + + _wrapNativeSuper = function _wrapNativeSuper(Class) { + if (Class === null || !_isNativeFunction(Class)) return Class; + + if (typeof Class !== "function") { + throw new TypeError("Super expression must either be null or a function"); + } + + if (typeof _cache !== "undefined") { + if (_cache.has(Class)) return _cache.get(Class); + + _cache.set(Class, Wrapper); + } + + function Wrapper() { + return _construct(Class, arguments, _getPrototypeOf(this).constructor); + } + + Wrapper.prototype = Object.create(Class.prototype, { + constructor: { + value: Wrapper, + enumerable: false, + writable: true, + configurable: true + } + }); + return _setPrototypeOf(Wrapper, Class); + }; + + return _wrapNativeSuper(Class); +} + +/* eslint no-console:0 */ +var formatRegExp = /%[sdj%]/g; +var warning = function warning() {}; // don't print warning message when in production env or node runtime + +if (typeof process !== 'undefined' && Object({"NODE_ENV":"production"}) && "production" !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') { + warning = function warning(type, errors) { + if (typeof console !== 'undefined' && console.warn) { + if (errors.every(function (e) { + return typeof e === 'string'; + })) { + console.warn(type, errors); + } + } + }; +} + +function convertFieldsError(errors) { + if (!errors || !errors.length) return null; + var fields = {}; + errors.forEach(function (error) { + var field = error.field; + fields[field] = fields[field] || []; + fields[field].push(error); + }); + return fields; +} +function format() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + var i = 1; + var f = args[0]; + var len = args.length; + + if (typeof f === 'function') { + return f.apply(null, args.slice(1)); + } + + if (typeof f === 'string') { + var str = String(f).replace(formatRegExp, function (x) { + if (x === '%%') { + return '%'; + } + + if (i >= len) { + return x; + } + + switch (x) { + case '%s': + return String(args[i++]); + + case '%d': + return Number(args[i++]); + + case '%j': + try { + return JSON.stringify(args[i++]); + } catch (_) { + return '[Circular]'; + } + + break; + + default: + return x; + } + }); + return str; + } + + return f; +} + +function isNativeStringType(type) { + return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'date' || type === 'pattern'; +} + +function isEmptyValue(value, type) { + if (value === undefined || value === null) { + return true; + } + + if (type === 'array' && Array.isArray(value) && !value.length) { + return true; + } + + if (isNativeStringType(type) && typeof value === 'string' && !value) { + return true; + } + + return false; +} + +function asyncParallelArray(arr, func, callback) { + var results = []; + var total = 0; + var arrLength = arr.length; + + function count(errors) { + results.push.apply(results, errors); + total++; + + if (total === arrLength) { + callback(results); + } + } + + arr.forEach(function (a) { + func(a, count); + }); +} + +function asyncSerialArray(arr, func, callback) { + var index = 0; + var arrLength = arr.length; + + function next(errors) { + if (errors && errors.length) { + callback(errors); + return; + } + + var original = index; + index = index + 1; + + if (original < arrLength) { + func(arr[original], next); + } else { + callback([]); + } + } + + next([]); +} + +function flattenObjArr(objArr) { + var ret = []; + Object.keys(objArr).forEach(function (k) { + ret.push.apply(ret, objArr[k]); + }); + return ret; +} + +var AsyncValidationError = /*#__PURE__*/function (_Error) { + _inheritsLoose(AsyncValidationError, _Error); + + function AsyncValidationError(errors, fields) { + var _this; + + _this = _Error.call(this, 'Async Validation Error') || this; + _this.errors = errors; + _this.fields = fields; + return _this; + } + + return AsyncValidationError; +}( /*#__PURE__*/_wrapNativeSuper(Error)); +function asyncMap(objArr, option, func, callback) { + if (option.first) { + var _pending = new Promise(function (resolve, reject) { + var next = function next(errors) { + callback(errors); + return errors.length ? reject(new AsyncValidationError(errors, convertFieldsError(errors))) : resolve(); + }; + + var flattenArr = flattenObjArr(objArr); + asyncSerialArray(flattenArr, func, next); + }); + + _pending["catch"](function (e) { + return e; + }); + + return _pending; + } + + var firstFields = option.firstFields || []; + + if (firstFields === true) { + firstFields = Object.keys(objArr); + } + + var objArrKeys = Object.keys(objArr); + var objArrLength = objArrKeys.length; + var total = 0; + var results = []; + var pending = new Promise(function (resolve, reject) { + var next = function next(errors) { + results.push.apply(results, errors); + total++; + + if (total === objArrLength) { + callback(results); + return results.length ? reject(new AsyncValidationError(results, convertFieldsError(results))) : resolve(); + } + }; + + if (!objArrKeys.length) { + callback(results); + resolve(); + } + + objArrKeys.forEach(function (key) { + var arr = objArr[key]; + + if (firstFields.indexOf(key) !== -1) { + asyncSerialArray(arr, func, next); + } else { + asyncParallelArray(arr, func, next); + } + }); + }); + pending["catch"](function (e) { + return e; + }); + return pending; +} +function complementError(rule) { + return function (oe) { + if (oe && oe.message) { + oe.field = oe.field || rule.fullField; + return oe; + } + + return { + message: typeof oe === 'function' ? oe() : oe, + field: oe.field || rule.fullField + }; + }; +} +function deepMerge(target, source) { + if (source) { + for (var s in source) { + if (source.hasOwnProperty(s)) { + var value = source[s]; + + if (typeof value === 'object' && typeof target[s] === 'object') { + target[s] = _extends({}, target[s], value); + } else { + target[s] = value; + } + } + } + } + + return target; +} + +/** + * Rule for validating required fields. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param source The source object being validated. + * @param errors An array of errors that this rule may add + * validation errors to. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function required(rule, value, source, errors, options, type) { + if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) { + errors.push(format(options.messages.required, rule.fullField)); + } +} + +/** + * Rule for validating whitespace. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param source The source object being validated. + * @param errors An array of errors that this rule may add + * validation errors to. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function whitespace(rule, value, source, errors, options) { + if (/^\s+$/.test(value) || value === '') { + errors.push(format(options.messages.whitespace, rule.fullField)); + } +} + +/* eslint max-len:0 */ + +var pattern = { + // http://emailregex.com/ + email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, + url: new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", 'i'), + hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i +}; +var types = { + integer: function integer(value) { + return types.number(value) && parseInt(value, 10) === value; + }, + "float": function float(value) { + return types.number(value) && !types.integer(value); + }, + array: function array(value) { + return Array.isArray(value); + }, + regexp: function regexp(value) { + if (value instanceof RegExp) { + return true; + } + + try { + return !!new RegExp(value); + } catch (e) { + return false; + } + }, + date: function date(value) { + return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function' && !isNaN(value.getTime()); + }, + number: function number(value) { + if (isNaN(value)) { + return false; + } + + return typeof value === 'number'; + }, + object: function object(value) { + return typeof value === 'object' && !types.array(value); + }, + method: function method(value) { + return typeof value === 'function'; + }, + email: function email(value) { + return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255; + }, + url: function url(value) { + return typeof value === 'string' && !!value.match(pattern.url); + }, + hex: function hex(value) { + return typeof value === 'string' && !!value.match(pattern.hex); + } +}; +/** + * Rule for validating the type of a value. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param source The source object being validated. + * @param errors An array of errors that this rule may add + * validation errors to. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function type(rule, value, source, errors, options) { + if (rule.required && value === undefined) { + required(rule, value, source, errors, options); + return; + } + + var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex']; + var ruleType = rule.type; + + if (custom.indexOf(ruleType) > -1) { + if (!types[ruleType](value)) { + errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type)); + } // straight typeof check + + } else if (ruleType && typeof value !== rule.type) { + errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type)); + } +} + +/** + * Rule for validating minimum and maximum allowed values. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param source The source object being validated. + * @param errors An array of errors that this rule may add + * validation errors to. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function range(rule, value, source, errors, options) { + var len = typeof rule.len === 'number'; + var min = typeof rule.min === 'number'; + var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane) + + var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; + var val = value; + var key = null; + var num = typeof value === 'number'; + var str = typeof value === 'string'; + var arr = Array.isArray(value); + + if (num) { + key = 'number'; + } else if (str) { + key = 'string'; + } else if (arr) { + key = 'array'; + } // if the value is not of a supported type for range validation + // the validation rule rule should use the + // type property to also test for a particular type + + + if (!key) { + return false; + } + + if (arr) { + val = value.length; + } + + if (str) { + // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".lenght !== 3 + val = value.replace(spRegexp, '_').length; + } + + if (len) { + if (val !== rule.len) { + errors.push(format(options.messages[key].len, rule.fullField, rule.len)); + } + } else if (min && !max && val < rule.min) { + errors.push(format(options.messages[key].min, rule.fullField, rule.min)); + } else if (max && !min && val > rule.max) { + errors.push(format(options.messages[key].max, rule.fullField, rule.max)); + } else if (min && max && (val < rule.min || val > rule.max)) { + errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max)); + } +} + +var ENUM = 'enum'; +/** + * Rule for validating a value exists in an enumerable list. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param source The source object being validated. + * @param errors An array of errors that this rule may add + * validation errors to. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function enumerable(rule, value, source, errors, options) { + rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : []; + + if (rule[ENUM].indexOf(value) === -1) { + errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', '))); + } +} + +/** + * Rule for validating a regular expression pattern. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param source The source object being validated. + * @param errors An array of errors that this rule may add + * validation errors to. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function pattern$1(rule, value, source, errors, options) { + if (rule.pattern) { + if (rule.pattern instanceof RegExp) { + // if a RegExp instance is passed, reset `lastIndex` in case its `global` + // flag is accidentally set to `true`, which in a validation scenario + // is not necessary and the result might be misleading + rule.pattern.lastIndex = 0; + + if (!rule.pattern.test(value)) { + errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern)); + } + } else if (typeof rule.pattern === 'string') { + var _pattern = new RegExp(rule.pattern); + + if (!_pattern.test(value)) { + errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern)); + } + } + } +} + +var rules = { + required: required, + whitespace: whitespace, + type: type, + range: range, + "enum": enumerable, + pattern: pattern$1 +}; + +/** + * Performs validation for string types. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function string(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value, 'string') && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options, 'string'); + + if (!isEmptyValue(value, 'string')) { + rules.type(rule, value, source, errors, options); + rules.range(rule, value, source, errors, options); + rules.pattern(rule, value, source, errors, options); + + if (rule.whitespace === true) { + rules.whitespace(rule, value, source, errors, options); + } + } + } + + callback(errors); +} + +/** + * Validates a function. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function method(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value) && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options); + + if (value !== undefined) { + rules.type(rule, value, source, errors, options); + } + } + + callback(errors); +} + +/** + * Validates a number. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function number(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (value === '') { + value = undefined; + } + + if (isEmptyValue(value) && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options); + + if (value !== undefined) { + rules.type(rule, value, source, errors, options); + rules.range(rule, value, source, errors, options); + } + } + + callback(errors); +} + +/** + * Validates a boolean. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function _boolean(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value) && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options); + + if (value !== undefined) { + rules.type(rule, value, source, errors, options); + } + } + + callback(errors); +} + +/** + * Validates the regular expression type. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function regexp(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value) && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options); + + if (!isEmptyValue(value)) { + rules.type(rule, value, source, errors, options); + } + } + + callback(errors); +} + +/** + * Validates a number is an integer. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function integer(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value) && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options); + + if (value !== undefined) { + rules.type(rule, value, source, errors, options); + rules.range(rule, value, source, errors, options); + } + } + + callback(errors); +} + +/** + * Validates a number is a floating point number. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function floatFn(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value) && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options); + + if (value !== undefined) { + rules.type(rule, value, source, errors, options); + rules.range(rule, value, source, errors, options); + } + } + + callback(errors); +} + +/** + * Validates an array. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function array(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if ((value === undefined || value === null) && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options, 'array'); + + if (value !== undefined && value !== null) { + rules.type(rule, value, source, errors, options); + rules.range(rule, value, source, errors, options); + } + } + + callback(errors); +} + +/** + * Validates an object. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function object(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value) && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options); + + if (value !== undefined) { + rules.type(rule, value, source, errors, options); + } + } + + callback(errors); +} + +var ENUM$1 = 'enum'; +/** + * Validates an enumerable list. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function enumerable$1(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value) && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options); + + if (value !== undefined) { + rules[ENUM$1](rule, value, source, errors, options); + } + } + + callback(errors); +} + +/** + * Validates a regular expression pattern. + * + * Performs validation when a rule only contains + * a pattern property but is not declared as a string type. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function pattern$2(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value, 'string') && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options); + + if (!isEmptyValue(value, 'string')) { + rules.pattern(rule, value, source, errors, options); + } + } + + callback(errors); +} + +function date(rule, value, callback, source, options) { + // console.log('integer rule called %j', rule); + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); // console.log('validate on %s value', value); + + if (validate) { + if (isEmptyValue(value, 'date') && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options); + + if (!isEmptyValue(value, 'date')) { + var dateObject; + + if (value instanceof Date) { + dateObject = value; + } else { + dateObject = new Date(value); + } + + rules.type(rule, dateObject, source, errors, options); + + if (dateObject) { + rules.range(rule, dateObject.getTime(), source, errors, options); + } + } + } + + callback(errors); +} + +function required$1(rule, value, callback, source, options) { + var errors = []; + var type = Array.isArray(value) ? 'array' : typeof value; + rules.required(rule, value, source, errors, options, type); + callback(errors); +} + +function type$1(rule, value, callback, source, options) { + var ruleType = rule.type; + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value, ruleType) && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options, ruleType); + + if (!isEmptyValue(value, ruleType)) { + rules.type(rule, value, source, errors, options); + } + } + + callback(errors); +} + +/** + * Performs validation for any type. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function any(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value) && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options); + } + + callback(errors); +} + +var validators = { + string: string, + method: method, + number: number, + "boolean": _boolean, + regexp: regexp, + integer: integer, + "float": floatFn, + array: array, + object: object, + "enum": enumerable$1, + pattern: pattern$2, + date: date, + url: type$1, + hex: type$1, + email: type$1, + required: required$1, + any: any +}; + +function newMessages() { + return { + "default": 'Validation error on field %s', + required: '%s is required', + "enum": '%s must be one of %s', + whitespace: '%s cannot be empty', + date: { + format: '%s date %s is invalid for format %s', + parse: '%s date could not be parsed, %s is invalid ', + invalid: '%s date %s is invalid' + }, + types: { + string: '%s is not a %s', + method: '%s is not a %s (function)', + array: '%s is not an %s', + object: '%s is not an %s', + number: '%s is not a %s', + date: '%s is not a %s', + "boolean": '%s is not a %s', + integer: '%s is not an %s', + "float": '%s is not a %s', + regexp: '%s is not a valid %s', + email: '%s is not a valid %s', + url: '%s is not a valid %s', + hex: '%s is not a valid %s' + }, + string: { + len: '%s must be exactly %s characters', + min: '%s must be at least %s characters', + max: '%s cannot be longer than %s characters', + range: '%s must be between %s and %s characters' + }, + number: { + len: '%s must equal %s', + min: '%s cannot be less than %s', + max: '%s cannot be greater than %s', + range: '%s must be between %s and %s' + }, + array: { + len: '%s must be exactly %s in length', + min: '%s cannot be less than %s in length', + max: '%s cannot be greater than %s in length', + range: '%s must be between %s and %s in length' + }, + pattern: { + mismatch: '%s value %s does not match pattern %s' + }, + clone: function clone() { + var cloned = JSON.parse(JSON.stringify(this)); + cloned.clone = this.clone; + return cloned; + } + }; +} +var messages = newMessages(); + +/** + * Encapsulates a validation schema. + * + * @param descriptor An object declaring validation rules + * for this schema. + */ + +function Schema(descriptor) { + this.rules = null; + this._messages = messages; + this.define(descriptor); +} + +Schema.prototype = { + messages: function messages(_messages) { + if (_messages) { + this._messages = deepMerge(newMessages(), _messages); + } + + return this._messages; + }, + define: function define(rules) { + if (!rules) { + throw new Error('Cannot configure a schema with no rules'); + } + + if (typeof rules !== 'object' || Array.isArray(rules)) { + throw new Error('Rules must be an object'); + } + + this.rules = {}; + var z; + var item; + + for (z in rules) { + if (rules.hasOwnProperty(z)) { + item = rules[z]; + this.rules[z] = Array.isArray(item) ? item : [item]; + } + } + }, + validate: function validate(source_, o, oc) { + var _this = this; + + if (o === void 0) { + o = {}; + } + + if (oc === void 0) { + oc = function oc() {}; + } + + var source = source_; + var options = o; + var callback = oc; + + if (typeof options === 'function') { + callback = options; + options = {}; + } + + if (!this.rules || Object.keys(this.rules).length === 0) { + if (callback) { + callback(); + } + + return Promise.resolve(); + } + + function complete(results) { + var i; + var errors = []; + var fields = {}; + + function add(e) { + if (Array.isArray(e)) { + var _errors; + + errors = (_errors = errors).concat.apply(_errors, e); + } else { + errors.push(e); + } + } + + for (i = 0; i < results.length; i++) { + add(results[i]); + } + + if (!errors.length) { + errors = null; + fields = null; + } else { + fields = convertFieldsError(errors); + } + + callback(errors, fields); + } + + if (options.messages) { + var messages$1 = this.messages(); + + if (messages$1 === messages) { + messages$1 = newMessages(); + } + + deepMerge(messages$1, options.messages); + options.messages = messages$1; + } else { + options.messages = this.messages(); + } + + var arr; + var value; + var series = {}; + var keys = options.keys || Object.keys(this.rules); + keys.forEach(function (z) { + arr = _this.rules[z]; + value = source[z]; + arr.forEach(function (r) { + var rule = r; + + if (typeof rule.transform === 'function') { + if (source === source_) { + source = _extends({}, source); + } + + value = source[z] = rule.transform(value); + } + + if (typeof rule === 'function') { + rule = { + validator: rule + }; + } else { + rule = _extends({}, rule); + } + + rule.validator = _this.getValidationMethod(rule); + rule.field = z; + rule.fullField = rule.fullField || z; + rule.type = _this.getType(rule); + + if (!rule.validator) { + return; + } + + series[z] = series[z] || []; + series[z].push({ + rule: rule, + value: value, + source: source, + field: z + }); + }); + }); + var errorFields = {}; + return asyncMap(series, options, function (data, doIt) { + var rule = data.rule; + var deep = (rule.type === 'object' || rule.type === 'array') && (typeof rule.fields === 'object' || typeof rule.defaultField === 'object'); + deep = deep && (rule.required || !rule.required && data.value); + rule.field = data.field; + + function addFullfield(key, schema) { + return _extends({}, schema, { + fullField: rule.fullField + "." + key + }); + } + + function cb(e) { + if (e === void 0) { + e = []; + } + + var errors = e; + + if (!Array.isArray(errors)) { + errors = [errors]; + } + + if (!options.suppressWarning && errors.length) { + Schema.warning('async-validator:', errors); + } + + if (errors.length && rule.message !== undefined) { + errors = [].concat(rule.message); + } + + errors = errors.map(complementError(rule)); + + if (options.first && errors.length) { + errorFields[rule.field] = 1; + return doIt(errors); + } + + if (!deep) { + doIt(errors); + } else { + // if rule is required but the target object + // does not exist fail at the rule level and don't + // go deeper + if (rule.required && !data.value) { + if (rule.message !== undefined) { + errors = [].concat(rule.message).map(complementError(rule)); + } else if (options.error) { + errors = [options.error(rule, format(options.messages.required, rule.field))]; + } + + return doIt(errors); + } + + var fieldsSchema = {}; + + if (rule.defaultField) { + for (var k in data.value) { + if (data.value.hasOwnProperty(k)) { + fieldsSchema[k] = rule.defaultField; + } + } + } + + fieldsSchema = _extends({}, fieldsSchema, data.rule.fields); + + for (var f in fieldsSchema) { + if (fieldsSchema.hasOwnProperty(f)) { + var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]]; + fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f)); + } + } + + var schema = new Schema(fieldsSchema); + schema.messages(options.messages); + + if (data.rule.options) { + data.rule.options.messages = options.messages; + data.rule.options.error = options.error; + } + + schema.validate(data.value, data.rule.options || options, function (errs) { + var finalErrors = []; + + if (errors && errors.length) { + finalErrors.push.apply(finalErrors, errors); + } + + if (errs && errs.length) { + finalErrors.push.apply(finalErrors, errs); + } + + doIt(finalErrors.length ? finalErrors : null); + }); + } + } + + var res; + + if (rule.asyncValidator) { + res = rule.asyncValidator(rule, data.value, cb, data.source, options); + } else if (rule.validator) { + res = rule.validator(rule, data.value, cb, data.source, options); + + if (res === true) { + cb(); + } else if (res === false) { + cb(rule.message || rule.field + " fails"); + } else if (res instanceof Array) { + cb(res); + } else if (res instanceof Error) { + cb(res.message); + } + } + + if (res && res.then) { + res.then(function () { + return cb(); + }, function (e) { + return cb(e); + }); + } + }, function (results) { + complete(results); + }); + }, + getType: function getType(rule) { + if (rule.type === undefined && rule.pattern instanceof RegExp) { + rule.type = 'pattern'; + } + + if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) { + throw new Error(format('Unknown rule type %s', rule.type)); + } + + return rule.type || 'string'; + }, + getValidationMethod: function getValidationMethod(rule) { + if (typeof rule.validator === 'function') { + return rule.validator; + } + + var keys = Object.keys(rule); + var messageIndex = keys.indexOf('message'); + + if (messageIndex !== -1) { + keys.splice(messageIndex, 1); + } + + if (keys.length === 1 && keys[0] === 'required') { + return validators.required; + } + + return validators[this.getType(rule)] || false; + } +}; + +Schema.register = function register(type, validator) { + if (typeof validator !== 'function') { + throw new Error('Cannot register a validator by type, validator is not a function'); + } + + validators[type] = validator; +}; + +Schema.warning = warning; +Schema.messages = messages; +Schema.validators = validators; + +/* harmony default export */ __webpack_exports__["a"] = (Schema); +//# sourceMappingURL=index.js.map + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node-libs-browser/mock/process.js */ "Q2Ig"))) + +/***/ }), + +/***/ "Kqna": +/*!************************************!*\ + !*** ./node_modules/gopd/index.js ***! + \************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "AM7I"); + +var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); + +if ($gOPD) { + try { + $gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + $gOPD = null; + } +} + +module.exports = $gOPD; + + +/***/ }), + +/***/ "KrxN": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.math.degrees.js ***! + \*************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); + +var RAD_PER_DEG = 180 / Math.PI; + +// `Math.degrees` method +// https://rwaldron.github.io/proposal-math-extensions/ +$({ target: 'Math', stat: true }, { + degrees: function degrees(radians) { + return radians * RAD_PER_DEG; + } +}); + + +/***/ }), + +/***/ "KtWR": +/*!************************************************************************!*\ + !*** ./node_modules/@ant-design/icons/lib/icons/InfoCircleOutlined.js ***! + \************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt"); +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9")); +var React = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI")); +var _InfoCircleOutlined = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons-svg/lib/asn/InfoCircleOutlined */ "EAZv")); +var _AntdIcon = _interopRequireDefault(__webpack_require__(/*! ../components/AntdIcon */ "KQxl")); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +// GENERATE BY ./scripts/generate.ts +// DON NOT EDIT IT MANUALLY + +var InfoCircleOutlined = function InfoCircleOutlined(props, ref) { + return /*#__PURE__*/React.createElement(_AntdIcon.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, { + ref: ref, + icon: _InfoCircleOutlined.default + })); +}; +var RefIcon = /*#__PURE__*/React.forwardRef(InfoCircleOutlined); +if (false) {} +var _default = exports.default = RefIcon; + +/***/ }), + +/***/ "KvGi": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/es.math.sign.js ***! + \******************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var sign = __webpack_require__(/*! ../internals/math-sign */ "90hW"); + +// `Math.sign` method +// https://tc39.github.io/ecma262/#sec-math.sign +$({ target: 'Math', stat: true }, { + sign: sign +}); + + +/***/ }), + +/***/ "Kwbf": +/*!********************************************!*\ + !*** ./node_modules/rc-util/es/warning.js ***! + \********************************************/ +/*! exports provided: preMessage, warning, note, resetWarned, call, warningOnce, noteOnce, default */ +/*! exports used: default, noteOnce */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* unused harmony export preMessage */ +/* unused harmony export warning */ +/* unused harmony export note */ +/* unused harmony export resetWarned */ +/* unused harmony export call */ +/* unused harmony export warningOnce */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return noteOnce; }); +/* eslint-disable no-console */ +var warned = {}; +var preWarningFns = []; + +/** + * Pre warning enable you to parse content before console.error. + * Modify to null will prevent warning. + */ +var preMessage = function preMessage(fn) { + preWarningFns.push(fn); +}; + +/** + * Warning if condition not match. + * @param valid Condition + * @param message Warning message + * @example + * ```js + * warning(false, 'some error'); // print some error + * warning(true, 'some error'); // print nothing + * warning(1 === 2, 'some error'); // print some error + * ``` + */ +function warning(valid, message) { + if (false) { var finalMessage; } +} + +/** @see Similar to {@link warning} */ +function note(valid, message) { + if (false) { var finalMessage; } +} +function resetWarned() { + warned = {}; +} +function call(method, valid, message) { + if (!valid && !warned[message]) { + method(false, message); + warned[message] = true; + } +} + +/** @see Same as {@link warning}, but only warn once for the same message */ +function warningOnce(valid, message) { + call(warning, valid, message); +} + +/** @see Same as {@link warning}, but only warn once for the same message */ +function noteOnce(valid, message) { + call(note, valid, message); +} +warningOnce.preMessage = preMessage; +warningOnce.resetWarned = resetWarned; +warningOnce.noteOnce = noteOnce; +/* harmony default export */ __webpack_exports__["a"] = (warningOnce); + +/***/ }), + +/***/ "KxBF": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_baseSlice.js ***! + \*******************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +module.exports = baseSlice; + + +/***/ }), + +/***/ "Kxld": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/es.object.is.js ***! + \******************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var is = __webpack_require__(/*! ../internals/same-value */ "Ep9I"); + +// `Object.is` method +// https://tc39.github.io/ecma262/#sec-object.is +$({ target: 'Object', stat: true }, { + is: is +}); + + +/***/ }), + +/***/ "Kz25": +/*!*************************************************!*\ + !*** ./node_modules/core-js/modules/web.url.js ***! + \*************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env` +__webpack_require__(/*! ../modules/es.string.iterator */ "PKPk"); +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/"); +var USE_NATIVE_URL = __webpack_require__(/*! ../internals/native-url */ "DTth"); +var global = __webpack_require__(/*! ../internals/global */ "2oRo"); +var defineProperties = __webpack_require__(/*! ../internals/object-define-properties */ "N+g0"); +var redefine = __webpack_require__(/*! ../internals/redefine */ "busE"); +var anInstance = __webpack_require__(/*! ../internals/an-instance */ "GarU"); +var has = __webpack_require__(/*! ../internals/has */ "UTVS"); +var assign = __webpack_require__(/*! ../internals/object-assign */ "YNrV"); +var arrayFrom = __webpack_require__(/*! ../internals/array-from */ "TfTi"); +var codeAt = __webpack_require__(/*! ../internals/string-multibyte */ "ZUd8").codeAt; +var toASCII = __webpack_require__(/*! ../internals/string-punycode-to-ascii */ "X7LM"); +var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "1E5z"); +var URLSearchParamsModule = __webpack_require__(/*! ../modules/web.url-search-params */ "mGGf"); +var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "afO8"); + +var NativeURL = global.URL; +var URLSearchParams = URLSearchParamsModule.URLSearchParams; +var getInternalSearchParamsState = URLSearchParamsModule.getState; +var setInternalState = InternalStateModule.set; +var getInternalURLState = InternalStateModule.getterFor('URL'); +var floor = Math.floor; +var pow = Math.pow; + +var INVALID_AUTHORITY = 'Invalid authority'; +var INVALID_SCHEME = 'Invalid scheme'; +var INVALID_HOST = 'Invalid host'; +var INVALID_PORT = 'Invalid port'; + +var ALPHA = /[A-Za-z]/; +var ALPHANUMERIC = /[\d+-.A-Za-z]/; +var DIGIT = /\d/; +var HEX_START = /^(0x|0X)/; +var OCT = /^[0-7]+$/; +var DEC = /^\d+$/; +var HEX = /^[\dA-Fa-f]+$/; +// eslint-disable-next-line no-control-regex +var FORBIDDEN_HOST_CODE_POINT = /[\u0000\u0009\u000A\u000D #%/:?@[\\]]/; +// eslint-disable-next-line no-control-regex +var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\u0000\u0009\u000A\u000D #/:?@[\\]]/; +// eslint-disable-next-line no-control-regex +var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g; +// eslint-disable-next-line no-control-regex +var TAB_AND_NEW_LINE = /[\u0009\u000A\u000D]/g; +var EOF; + +var parseHost = function (url, input) { + var result, codePoints, index; + if (input.charAt(0) == '[') { + if (input.charAt(input.length - 1) != ']') return INVALID_HOST; + result = parseIPv6(input.slice(1, -1)); + if (!result) return INVALID_HOST; + url.host = result; + // opaque host + } else if (!isSpecial(url)) { + if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST; + result = ''; + codePoints = arrayFrom(input); + for (index = 0; index < codePoints.length; index++) { + result += percentEncode(codePoints[index], C0ControlPercentEncodeSet); + } + url.host = result; + } else { + input = toASCII(input); + if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST; + result = parseIPv4(input); + if (result === null) return INVALID_HOST; + url.host = result; + } +}; + +var parseIPv4 = function (input) { + var parts = input.split('.'); + var partsLength, numbers, index, part, radix, number, ipv4; + if (parts.length && parts[parts.length - 1] == '') { + parts.pop(); + } + partsLength = parts.length; + if (partsLength > 4) return input; + numbers = []; + for (index = 0; index < partsLength; index++) { + part = parts[index]; + if (part == '') return input; + radix = 10; + if (part.length > 1 && part.charAt(0) == '0') { + radix = HEX_START.test(part) ? 16 : 8; + part = part.slice(radix == 8 ? 1 : 2); + } + if (part === '') { + number = 0; + } else { + if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input; + number = parseInt(part, radix); + } + numbers.push(number); + } + for (index = 0; index < partsLength; index++) { + number = numbers[index]; + if (index == partsLength - 1) { + if (number >= pow(256, 5 - partsLength)) return null; + } else if (number > 255) return null; + } + ipv4 = numbers.pop(); + for (index = 0; index < numbers.length; index++) { + ipv4 += numbers[index] * pow(256, 3 - index); + } + return ipv4; +}; + +// eslint-disable-next-line max-statements +var parseIPv6 = function (input) { + var address = [0, 0, 0, 0, 0, 0, 0, 0]; + var pieceIndex = 0; + var compress = null; + var pointer = 0; + var value, length, numbersSeen, ipv4Piece, number, swaps, swap; + + var char = function () { + return input.charAt(pointer); + }; + + if (char() == ':') { + if (input.charAt(1) != ':') return; + pointer += 2; + pieceIndex++; + compress = pieceIndex; + } + while (char()) { + if (pieceIndex == 8) return; + if (char() == ':') { + if (compress !== null) return; + pointer++; + pieceIndex++; + compress = pieceIndex; + continue; + } + value = length = 0; + while (length < 4 && HEX.test(char())) { + value = value * 16 + parseInt(char(), 16); + pointer++; + length++; + } + if (char() == '.') { + if (length == 0) return; + pointer -= length; + if (pieceIndex > 6) return; + numbersSeen = 0; + while (char()) { + ipv4Piece = null; + if (numbersSeen > 0) { + if (char() == '.' && numbersSeen < 4) pointer++; + else return; + } + if (!DIGIT.test(char())) return; + while (DIGIT.test(char())) { + number = parseInt(char(), 10); + if (ipv4Piece === null) ipv4Piece = number; + else if (ipv4Piece == 0) return; + else ipv4Piece = ipv4Piece * 10 + number; + if (ipv4Piece > 255) return; + pointer++; + } + address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece; + numbersSeen++; + if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++; + } + if (numbersSeen != 4) return; + break; + } else if (char() == ':') { + pointer++; + if (!char()) return; + } else if (char()) return; + address[pieceIndex++] = value; + } + if (compress !== null) { + swaps = pieceIndex - compress; + pieceIndex = 7; + while (pieceIndex != 0 && swaps > 0) { + swap = address[pieceIndex]; + address[pieceIndex--] = address[compress + swaps - 1]; + address[compress + --swaps] = swap; + } + } else if (pieceIndex != 8) return; + return address; +}; + +var findLongestZeroSequence = function (ipv6) { + var maxIndex = null; + var maxLength = 1; + var currStart = null; + var currLength = 0; + var index = 0; + for (; index < 8; index++) { + if (ipv6[index] !== 0) { + if (currLength > maxLength) { + maxIndex = currStart; + maxLength = currLength; + } + currStart = null; + currLength = 0; + } else { + if (currStart === null) currStart = index; + ++currLength; + } + } + if (currLength > maxLength) { + maxIndex = currStart; + maxLength = currLength; + } + return maxIndex; +}; + +var serializeHost = function (host) { + var result, index, compress, ignore0; + // ipv4 + if (typeof host == 'number') { + result = []; + for (index = 0; index < 4; index++) { + result.unshift(host % 256); + host = floor(host / 256); + } return result.join('.'); + // ipv6 + } else if (typeof host == 'object') { + result = ''; + compress = findLongestZeroSequence(host); + for (index = 0; index < 8; index++) { + if (ignore0 && host[index] === 0) continue; + if (ignore0) ignore0 = false; + if (compress === index) { + result += index ? ':' : '::'; + ignore0 = true; + } else { + result += host[index].toString(16); + if (index < 7) result += ':'; + } + } + return '[' + result + ']'; + } return host; +}; + +var C0ControlPercentEncodeSet = {}; +var fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, { + ' ': 1, '"': 1, '<': 1, '>': 1, '`': 1 +}); +var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, { + '#': 1, '?': 1, '{': 1, '}': 1 +}); +var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, { + '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1 +}); + +var percentEncode = function (char, set) { + var code = codeAt(char, 0); + return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char); +}; + +var specialSchemes = { + ftp: 21, + file: null, + http: 80, + https: 443, + ws: 80, + wss: 443 +}; + +var isSpecial = function (url) { + return has(specialSchemes, url.scheme); +}; + +var includesCredentials = function (url) { + return url.username != '' || url.password != ''; +}; + +var cannotHaveUsernamePasswordPort = function (url) { + return !url.host || url.cannotBeABaseURL || url.scheme == 'file'; +}; + +var isWindowsDriveLetter = function (string, normalized) { + var second; + return string.length == 2 && ALPHA.test(string.charAt(0)) + && ((second = string.charAt(1)) == ':' || (!normalized && second == '|')); +}; + +var startsWithWindowsDriveLetter = function (string) { + var third; + return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && ( + string.length == 2 || + ((third = string.charAt(2)) === '/' || third === '\\' || third === '?' || third === '#') + ); +}; + +var shortenURLsPath = function (url) { + var path = url.path; + var pathSize = path.length; + if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) { + path.pop(); + } +}; + +var isSingleDot = function (segment) { + return segment === '.' || segment.toLowerCase() === '%2e'; +}; + +var isDoubleDot = function (segment) { + segment = segment.toLowerCase(); + return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e'; +}; + +// States: +var SCHEME_START = {}; +var SCHEME = {}; +var NO_SCHEME = {}; +var SPECIAL_RELATIVE_OR_AUTHORITY = {}; +var PATH_OR_AUTHORITY = {}; +var RELATIVE = {}; +var RELATIVE_SLASH = {}; +var SPECIAL_AUTHORITY_SLASHES = {}; +var SPECIAL_AUTHORITY_IGNORE_SLASHES = {}; +var AUTHORITY = {}; +var HOST = {}; +var HOSTNAME = {}; +var PORT = {}; +var FILE = {}; +var FILE_SLASH = {}; +var FILE_HOST = {}; +var PATH_START = {}; +var PATH = {}; +var CANNOT_BE_A_BASE_URL_PATH = {}; +var QUERY = {}; +var FRAGMENT = {}; + +// eslint-disable-next-line max-statements +var parseURL = function (url, input, stateOverride, base) { + var state = stateOverride || SCHEME_START; + var pointer = 0; + var buffer = ''; + var seenAt = false; + var seenBracket = false; + var seenPasswordToken = false; + var codePoints, char, bufferCodePoints, failure; + + if (!stateOverride) { + url.scheme = ''; + url.username = ''; + url.password = ''; + url.host = null; + url.port = null; + url.path = []; + url.query = null; + url.fragment = null; + url.cannotBeABaseURL = false; + input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, ''); + } + + input = input.replace(TAB_AND_NEW_LINE, ''); + + codePoints = arrayFrom(input); + + while (pointer <= codePoints.length) { + char = codePoints[pointer]; + switch (state) { + case SCHEME_START: + if (char && ALPHA.test(char)) { + buffer += char.toLowerCase(); + state = SCHEME; + } else if (!stateOverride) { + state = NO_SCHEME; + continue; + } else return INVALID_SCHEME; + break; + + case SCHEME: + if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) { + buffer += char.toLowerCase(); + } else if (char == ':') { + if (stateOverride && ( + (isSpecial(url) != has(specialSchemes, buffer)) || + (buffer == 'file' && (includesCredentials(url) || url.port !== null)) || + (url.scheme == 'file' && !url.host) + )) return; + url.scheme = buffer; + if (stateOverride) { + if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null; + return; + } + buffer = ''; + if (url.scheme == 'file') { + state = FILE; + } else if (isSpecial(url) && base && base.scheme == url.scheme) { + state = SPECIAL_RELATIVE_OR_AUTHORITY; + } else if (isSpecial(url)) { + state = SPECIAL_AUTHORITY_SLASHES; + } else if (codePoints[pointer + 1] == '/') { + state = PATH_OR_AUTHORITY; + pointer++; + } else { + url.cannotBeABaseURL = true; + url.path.push(''); + state = CANNOT_BE_A_BASE_URL_PATH; + } + } else if (!stateOverride) { + buffer = ''; + state = NO_SCHEME; + pointer = 0; + continue; + } else return INVALID_SCHEME; + break; + + case NO_SCHEME: + if (!base || (base.cannotBeABaseURL && char != '#')) return INVALID_SCHEME; + if (base.cannotBeABaseURL && char == '#') { + url.scheme = base.scheme; + url.path = base.path.slice(); + url.query = base.query; + url.fragment = ''; + url.cannotBeABaseURL = true; + state = FRAGMENT; + break; + } + state = base.scheme == 'file' ? FILE : RELATIVE; + continue; + + case SPECIAL_RELATIVE_OR_AUTHORITY: + if (char == '/' && codePoints[pointer + 1] == '/') { + state = SPECIAL_AUTHORITY_IGNORE_SLASHES; + pointer++; + } else { + state = RELATIVE; + continue; + } break; + + case PATH_OR_AUTHORITY: + if (char == '/') { + state = AUTHORITY; + break; + } else { + state = PATH; + continue; + } + + case RELATIVE: + url.scheme = base.scheme; + if (char == EOF) { + url.username = base.username; + url.password = base.password; + url.host = base.host; + url.port = base.port; + url.path = base.path.slice(); + url.query = base.query; + } else if (char == '/' || (char == '\\' && isSpecial(url))) { + state = RELATIVE_SLASH; + } else if (char == '?') { + url.username = base.username; + url.password = base.password; + url.host = base.host; + url.port = base.port; + url.path = base.path.slice(); + url.query = ''; + state = QUERY; + } else if (char == '#') { + url.username = base.username; + url.password = base.password; + url.host = base.host; + url.port = base.port; + url.path = base.path.slice(); + url.query = base.query; + url.fragment = ''; + state = FRAGMENT; + } else { + url.username = base.username; + url.password = base.password; + url.host = base.host; + url.port = base.port; + url.path = base.path.slice(); + url.path.pop(); + state = PATH; + continue; + } break; + + case RELATIVE_SLASH: + if (isSpecial(url) && (char == '/' || char == '\\')) { + state = SPECIAL_AUTHORITY_IGNORE_SLASHES; + } else if (char == '/') { + state = AUTHORITY; + } else { + url.username = base.username; + url.password = base.password; + url.host = base.host; + url.port = base.port; + state = PATH; + continue; + } break; + + case SPECIAL_AUTHORITY_SLASHES: + state = SPECIAL_AUTHORITY_IGNORE_SLASHES; + if (char != '/' || buffer.charAt(pointer + 1) != '/') continue; + pointer++; + break; + + case SPECIAL_AUTHORITY_IGNORE_SLASHES: + if (char != '/' && char != '\\') { + state = AUTHORITY; + continue; + } break; + + case AUTHORITY: + if (char == '@') { + if (seenAt) buffer = '%40' + buffer; + seenAt = true; + bufferCodePoints = arrayFrom(buffer); + for (var i = 0; i < bufferCodePoints.length; i++) { + var codePoint = bufferCodePoints[i]; + if (codePoint == ':' && !seenPasswordToken) { + seenPasswordToken = true; + continue; + } + var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet); + if (seenPasswordToken) url.password += encodedCodePoints; + else url.username += encodedCodePoints; + } + buffer = ''; + } else if ( + char == EOF || char == '/' || char == '?' || char == '#' || + (char == '\\' && isSpecial(url)) + ) { + if (seenAt && buffer == '') return INVALID_AUTHORITY; + pointer -= arrayFrom(buffer).length + 1; + buffer = ''; + state = HOST; + } else buffer += char; + break; + + case HOST: + case HOSTNAME: + if (stateOverride && url.scheme == 'file') { + state = FILE_HOST; + continue; + } else if (char == ':' && !seenBracket) { + if (buffer == '') return INVALID_HOST; + failure = parseHost(url, buffer); + if (failure) return failure; + buffer = ''; + state = PORT; + if (stateOverride == HOSTNAME) return; + } else if ( + char == EOF || char == '/' || char == '?' || char == '#' || + (char == '\\' && isSpecial(url)) + ) { + if (isSpecial(url) && buffer == '') return INVALID_HOST; + if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return; + failure = parseHost(url, buffer); + if (failure) return failure; + buffer = ''; + state = PATH_START; + if (stateOverride) return; + continue; + } else { + if (char == '[') seenBracket = true; + else if (char == ']') seenBracket = false; + buffer += char; + } break; + + case PORT: + if (DIGIT.test(char)) { + buffer += char; + } else if ( + char == EOF || char == '/' || char == '?' || char == '#' || + (char == '\\' && isSpecial(url)) || + stateOverride + ) { + if (buffer != '') { + var port = parseInt(buffer, 10); + if (port > 0xFFFF) return INVALID_PORT; + url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port; + buffer = ''; + } + if (stateOverride) return; + state = PATH_START; + continue; + } else return INVALID_PORT; + break; + + case FILE: + url.scheme = 'file'; + if (char == '/' || char == '\\') state = FILE_SLASH; + else if (base && base.scheme == 'file') { + if (char == EOF) { + url.host = base.host; + url.path = base.path.slice(); + url.query = base.query; + } else if (char == '?') { + url.host = base.host; + url.path = base.path.slice(); + url.query = ''; + state = QUERY; + } else if (char == '#') { + url.host = base.host; + url.path = base.path.slice(); + url.query = base.query; + url.fragment = ''; + state = FRAGMENT; + } else { + if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) { + url.host = base.host; + url.path = base.path.slice(); + shortenURLsPath(url); + } + state = PATH; + continue; + } + } else { + state = PATH; + continue; + } break; + + case FILE_SLASH: + if (char == '/' || char == '\\') { + state = FILE_HOST; + break; + } + if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) { + if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]); + else url.host = base.host; + } + state = PATH; + continue; + + case FILE_HOST: + if (char == EOF || char == '/' || char == '\\' || char == '?' || char == '#') { + if (!stateOverride && isWindowsDriveLetter(buffer)) { + state = PATH; + } else if (buffer == '') { + url.host = ''; + if (stateOverride) return; + state = PATH_START; + } else { + failure = parseHost(url, buffer); + if (failure) return failure; + if (url.host == 'localhost') url.host = ''; + if (stateOverride) return; + buffer = ''; + state = PATH_START; + } continue; + } else buffer += char; + break; + + case PATH_START: + if (isSpecial(url)) { + state = PATH; + if (char != '/' && char != '\\') continue; + } else if (!stateOverride && char == '?') { + url.query = ''; + state = QUERY; + } else if (!stateOverride && char == '#') { + url.fragment = ''; + state = FRAGMENT; + } else if (char != EOF) { + state = PATH; + if (char != '/') continue; + } break; + + case PATH: + if ( + char == EOF || char == '/' || + (char == '\\' && isSpecial(url)) || + (!stateOverride && (char == '?' || char == '#')) + ) { + if (isDoubleDot(buffer)) { + shortenURLsPath(url); + if (char != '/' && !(char == '\\' && isSpecial(url))) { + url.path.push(''); + } + } else if (isSingleDot(buffer)) { + if (char != '/' && !(char == '\\' && isSpecial(url))) { + url.path.push(''); + } + } else { + if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) { + if (url.host) url.host = ''; + buffer = buffer.charAt(0) + ':'; // normalize windows drive letter + } + url.path.push(buffer); + } + buffer = ''; + if (url.scheme == 'file' && (char == EOF || char == '?' || char == '#')) { + while (url.path.length > 1 && url.path[0] === '') { + url.path.shift(); + } + } + if (char == '?') { + url.query = ''; + state = QUERY; + } else if (char == '#') { + url.fragment = ''; + state = FRAGMENT; + } + } else { + buffer += percentEncode(char, pathPercentEncodeSet); + } break; + + case CANNOT_BE_A_BASE_URL_PATH: + if (char == '?') { + url.query = ''; + state = QUERY; + } else if (char == '#') { + url.fragment = ''; + state = FRAGMENT; + } else if (char != EOF) { + url.path[0] += percentEncode(char, C0ControlPercentEncodeSet); + } break; + + case QUERY: + if (!stateOverride && char == '#') { + url.fragment = ''; + state = FRAGMENT; + } else if (char != EOF) { + if (char == "'" && isSpecial(url)) url.query += '%27'; + else if (char == '#') url.query += '%23'; + else url.query += percentEncode(char, C0ControlPercentEncodeSet); + } break; + + case FRAGMENT: + if (char != EOF) url.fragment += percentEncode(char, fragmentPercentEncodeSet); + break; + } + + pointer++; + } +}; + +// `URL` constructor +// https://url.spec.whatwg.org/#url-class +var URLConstructor = function URL(url /* , base */) { + var that = anInstance(this, URLConstructor, 'URL'); + var base = arguments.length > 1 ? arguments[1] : undefined; + var urlString = String(url); + var state = setInternalState(that, { type: 'URL' }); + var baseState, failure; + if (base !== undefined) { + if (base instanceof URLConstructor) baseState = getInternalURLState(base); + else { + failure = parseURL(baseState = {}, String(base)); + if (failure) throw TypeError(failure); + } + } + failure = parseURL(state, urlString, null, baseState); + if (failure) throw TypeError(failure); + var searchParams = state.searchParams = new URLSearchParams(); + var searchParamsState = getInternalSearchParamsState(searchParams); + searchParamsState.updateSearchParams(state.query); + searchParamsState.updateURL = function () { + state.query = String(searchParams) || null; + }; + if (!DESCRIPTORS) { + that.href = serializeURL.call(that); + that.origin = getOrigin.call(that); + that.protocol = getProtocol.call(that); + that.username = getUsername.call(that); + that.password = getPassword.call(that); + that.host = getHost.call(that); + that.hostname = getHostname.call(that); + that.port = getPort.call(that); + that.pathname = getPathname.call(that); + that.search = getSearch.call(that); + that.searchParams = getSearchParams.call(that); + that.hash = getHash.call(that); + } +}; + +var URLPrototype = URLConstructor.prototype; + +var serializeURL = function () { + var url = getInternalURLState(this); + var scheme = url.scheme; + var username = url.username; + var password = url.password; + var host = url.host; + var port = url.port; + var path = url.path; + var query = url.query; + var fragment = url.fragment; + var output = scheme + ':'; + if (host !== null) { + output += '//'; + if (includesCredentials(url)) { + output += username + (password ? ':' + password : '') + '@'; + } + output += serializeHost(host); + if (port !== null) output += ':' + port; + } else if (scheme == 'file') output += '//'; + output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : ''; + if (query !== null) output += '?' + query; + if (fragment !== null) output += '#' + fragment; + return output; +}; + +var getOrigin = function () { + var url = getInternalURLState(this); + var scheme = url.scheme; + var port = url.port; + if (scheme == 'blob') try { + return new URL(scheme.path[0]).origin; + } catch (error) { + return 'null'; + } + if (scheme == 'file' || !isSpecial(url)) return 'null'; + return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : ''); +}; + +var getProtocol = function () { + return getInternalURLState(this).scheme + ':'; +}; + +var getUsername = function () { + return getInternalURLState(this).username; +}; + +var getPassword = function () { + return getInternalURLState(this).password; +}; + +var getHost = function () { + var url = getInternalURLState(this); + var host = url.host; + var port = url.port; + return host === null ? '' + : port === null ? serializeHost(host) + : serializeHost(host) + ':' + port; +}; + +var getHostname = function () { + var host = getInternalURLState(this).host; + return host === null ? '' : serializeHost(host); +}; + +var getPort = function () { + var port = getInternalURLState(this).port; + return port === null ? '' : String(port); +}; + +var getPathname = function () { + var url = getInternalURLState(this); + var path = url.path; + return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : ''; +}; + +var getSearch = function () { + var query = getInternalURLState(this).query; + return query ? '?' + query : ''; +}; + +var getSearchParams = function () { + return getInternalURLState(this).searchParams; +}; + +var getHash = function () { + var fragment = getInternalURLState(this).fragment; + return fragment ? '#' + fragment : ''; +}; + +var accessorDescriptor = function (getter, setter) { + return { get: getter, set: setter, configurable: true, enumerable: true }; +}; + +if (DESCRIPTORS) { + defineProperties(URLPrototype, { + // `URL.prototype.href` accessors pair + // https://url.spec.whatwg.org/#dom-url-href + href: accessorDescriptor(serializeURL, function (href) { + var url = getInternalURLState(this); + var urlString = String(href); + var failure = parseURL(url, urlString); + if (failure) throw TypeError(failure); + getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query); + }), + // `URL.prototype.origin` getter + // https://url.spec.whatwg.org/#dom-url-origin + origin: accessorDescriptor(getOrigin), + // `URL.prototype.protocol` accessors pair + // https://url.spec.whatwg.org/#dom-url-protocol + protocol: accessorDescriptor(getProtocol, function (protocol) { + var url = getInternalURLState(this); + parseURL(url, String(protocol) + ':', SCHEME_START); + }), + // `URL.prototype.username` accessors pair + // https://url.spec.whatwg.org/#dom-url-username + username: accessorDescriptor(getUsername, function (username) { + var url = getInternalURLState(this); + var codePoints = arrayFrom(String(username)); + if (cannotHaveUsernamePasswordPort(url)) return; + url.username = ''; + for (var i = 0; i < codePoints.length; i++) { + url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet); + } + }), + // `URL.prototype.password` accessors pair + // https://url.spec.whatwg.org/#dom-url-password + password: accessorDescriptor(getPassword, function (password) { + var url = getInternalURLState(this); + var codePoints = arrayFrom(String(password)); + if (cannotHaveUsernamePasswordPort(url)) return; + url.password = ''; + for (var i = 0; i < codePoints.length; i++) { + url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet); + } + }), + // `URL.prototype.host` accessors pair + // https://url.spec.whatwg.org/#dom-url-host + host: accessorDescriptor(getHost, function (host) { + var url = getInternalURLState(this); + if (url.cannotBeABaseURL) return; + parseURL(url, String(host), HOST); + }), + // `URL.prototype.hostname` accessors pair + // https://url.spec.whatwg.org/#dom-url-hostname + hostname: accessorDescriptor(getHostname, function (hostname) { + var url = getInternalURLState(this); + if (url.cannotBeABaseURL) return; + parseURL(url, String(hostname), HOSTNAME); + }), + // `URL.prototype.port` accessors pair + // https://url.spec.whatwg.org/#dom-url-port + port: accessorDescriptor(getPort, function (port) { + var url = getInternalURLState(this); + if (cannotHaveUsernamePasswordPort(url)) return; + port = String(port); + if (port == '') url.port = null; + else parseURL(url, port, PORT); + }), + // `URL.prototype.pathname` accessors pair + // https://url.spec.whatwg.org/#dom-url-pathname + pathname: accessorDescriptor(getPathname, function (pathname) { + var url = getInternalURLState(this); + if (url.cannotBeABaseURL) return; + url.path = []; + parseURL(url, pathname + '', PATH_START); + }), + // `URL.prototype.search` accessors pair + // https://url.spec.whatwg.org/#dom-url-search + search: accessorDescriptor(getSearch, function (search) { + var url = getInternalURLState(this); + search = String(search); + if (search == '') { + url.query = null; + } else { + if ('?' == search.charAt(0)) search = search.slice(1); + url.query = ''; + parseURL(url, search, QUERY); + } + getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query); + }), + // `URL.prototype.searchParams` getter + // https://url.spec.whatwg.org/#dom-url-searchparams + searchParams: accessorDescriptor(getSearchParams), + // `URL.prototype.hash` accessors pair + // https://url.spec.whatwg.org/#dom-url-hash + hash: accessorDescriptor(getHash, function (hash) { + var url = getInternalURLState(this); + hash = String(hash); + if (hash == '') { + url.fragment = null; + return; + } + if ('#' == hash.charAt(0)) hash = hash.slice(1); + url.fragment = ''; + parseURL(url, hash, FRAGMENT); + }) + }); +} + +// `URL.prototype.toJSON` method +// https://url.spec.whatwg.org/#dom-url-tojson +redefine(URLPrototype, 'toJSON', function toJSON() { + return serializeURL.call(this); +}, { enumerable: true }); + +// `URL.prototype.toString` method +// https://url.spec.whatwg.org/#URL-stringification-behavior +redefine(URLPrototype, 'toString', function toString() { + return serializeURL.call(this); +}, { enumerable: true }); + +if (NativeURL) { + var nativeCreateObjectURL = NativeURL.createObjectURL; + var nativeRevokeObjectURL = NativeURL.revokeObjectURL; + // `URL.createObjectURL` method + // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL + // eslint-disable-next-line no-unused-vars + if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) { + return nativeCreateObjectURL.apply(NativeURL, arguments); + }); + // `URL.revokeObjectURL` method + // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL + // eslint-disable-next-line no-unused-vars + if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) { + return nativeRevokeObjectURL.apply(NativeURL, arguments); + }); +} + +setToStringTag(URLConstructor, 'URL'); + +$({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, { + URL: URLConstructor +}); + + +/***/ }), + +/***/ "Kz5y": +/*!**************************************!*\ + !*** ./node_modules/lodash/_root.js ***! + \**************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "WFqU"); + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +module.exports = root; + + +/***/ }), + +/***/ "L8im": +/*!*****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/renderer-react/node_modules/use-subscription/cjs/use-subscription.production.min.js ***! + \*****************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** @license React v1.4.1 + * use-subscription.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +var e=__webpack_require__(/*! object-assign */ "MgzW"),g=__webpack_require__(/*! react */ "q1tI"); +exports.useSubscription=function(a){var c=a.getCurrentValue,d=a.subscribe,b=g.useState(function(){return{getCurrentValue:c,subscribe:d,value:c()}});a=b[0];var f=b[1];b=a.value;if(a.getCurrentValue!==c||a.subscribe!==d)b=c(),f({getCurrentValue:c,subscribe:d,value:b});g.useDebugValue(b);g.useEffect(function(){function b(){if(!a){var b=c();f(function(a){return a.getCurrentValue!==c||a.subscribe!==d||a.value===b?a:e({},a,{value:b})})}}var a=!1,h=d(b);b();return function(){a=!0;h()}},[c,d]);return b}; + + +/***/ }), + +/***/ "LK+K": +/*!****************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules ***! + \****************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js because of ./src/pages/metting/information/detail.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js because of ./src/pages/metting/information/detail.jsx */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _createSuper; }); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +var getPrototypeOf = __webpack_require__("foSv"); + +// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +function _isNativeReflectConstruct() { + try { + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (t) {} + return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { + return !!t; + })(); +} +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +var possibleConstructorReturn = __webpack_require__("md7G"); + +// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + + + +function _createSuper(Derived) { + var hasNativeReflectConstruct = _isNativeReflectConstruct(); + return function _createSuperInternal() { + var Super = Object(getPrototypeOf["a" /* default */])(Derived), + result; + if (hasNativeReflectConstruct) { + var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + return Object(possibleConstructorReturn["a" /* default */])(this, result); + }; +} + +/***/ }), + +/***/ "LKBx": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.starts-with.js ***! + \***************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(/*! ../internals/export */ "I+eb"); +var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V").f; +var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ"); +var notARegExp = __webpack_require__(/*! ../internals/not-a-regexp */ "WjRb"); +var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF"); +var correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ "qxPZ"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR"); + +var nativeStartsWith = ''.startsWith; +var min = Math.min; + +var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith'); +// https://github.com/zloirock/core-js/pull/702 +var MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () { + var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith'); + return descriptor && !descriptor.writable; +}(); + +// `String.prototype.startsWith` method +// https://tc39.github.io/ecma262/#sec-string.prototype.startswith +$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, { + startsWith: function startsWith(searchString /* , position = 0 */) { + var that = String(requireObjectCoercible(this)); + notARegExp(searchString); + var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length)); + var search = String(searchString); + return nativeStartsWith + ? nativeStartsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + } +}); + + +/***/ }), + +/***/ "LPSS": +/*!************************************************!*\ + !*** ./node_modules/core-js/internals/task.js ***! + \************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(/*! ../internals/global */ "2oRo"); +var fails = __webpack_require__(/*! ../internals/fails */ "0Dky"); +var classof = __webpack_require__(/*! ../internals/classof-raw */ "xrYK"); +var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE"); +var html = __webpack_require__(/*! ../internals/html */ "G+Rx"); +var createElement = __webpack_require__(/*! ../internals/document-create-element */ "zBJ4"); +var IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ "HNyW"); + +var location = global.location; +var set = global.setImmediate; +var clear = global.clearImmediate; +var process = global.process; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; + +var run = function (id) { + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; + +var runner = function (id) { + return function () { + run(id); + }; +}; + +var listener = function (event) { + run(event.data); +}; + +var post = function (id) { + // old engines have not location.origin + global.postMessage(id + '', location.protocol + '//' + location.host); +}; + +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if (!set || !clear) { + set = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args); + }; + defer(counter); + return counter; + }; + clear = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (classof(process) == 'process') { + defer = function (id) { + process.nextTick(runner(id)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(runner(id)); + }; + // Browsers with MessageChannel, includes WebWorkers + // except iOS - https://github.com/zloirock/core-js/issues/624 + } else if (MessageChannel && !IS_IOS) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = bind(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if ( + global.addEventListener && + typeof postMessage == 'function' && + !global.importScripts && + !fails(post) && + location.protocol !== 'file:' + ) { + defer = post; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in createElement('script')) { + defer = function (id) { + html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(runner(id), 0); + }; + } +} + +module.exports = { + set: set, + clear: clear +}; + + +/***/ }), + +/***/ "LQ03": +/*!************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/createSuper.js ***! + \************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "Nsbk"); +var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ "b48C"); +var possibleConstructorReturn = __webpack_require__(/*! ./possibleConstructorReturn.js */ "a1gu"); +function _createSuper(Derived) { + var hasNativeReflectConstruct = isNativeReflectConstruct(); + return function _createSuperInternal() { + var Super = getPrototypeOf(Derived), + result; + if (hasNativeReflectConstruct) { + var NewTarget = getPrototypeOf(this).constructor; + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + return possibleConstructorReturn(this, result); + }; +} +module.exports = _createSuper, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "LQDL": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/internals/engine-v8-version.js ***! + \*************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(/*! ../internals/global */ "2oRo"); +var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "NC/Y"); + +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8; +var match, version; + +if (v8) { + match = v8.split('.'); + version = match[0] + match[1]; +} else if (userAgent) { + match = userAgent.match(/Edge\/(\d+)/); + if (!match || match[1] >= 74) { + match = userAgent.match(/Chrome\/(\d+)/); + if (match) version = match[1]; + } +} + +module.exports = version && +version; + + +/***/ }), + +/***/ "Lj8O": +/*!***********************************************!*\ + !*** ./src/pages/metting/api.js + 39 modules ***! + \***********************************************/ +/*! exports provided: getBaseInfo, getDocList, getSubAgenda, gethomePageDocList, getMemberList, getPartnerList, getOrganization, getDocDetail, getDirList */ +/*! exports used: getBaseInfo, getDirList, getDocDetail, getDocList, getOrganization, getPartnerList, gethomePageDocList */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/metting/info.js because of ./src/pages/metting/information/detail.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js because of ./src/pages/Competitions/Detail/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/axios/lib/core/AxiosError.js because of ./node_modules/axios/lib/helpers/toFormData.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/axios/lib/helpers/bind.js because of ./node_modules/axios/lib/utils.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/axios/lib/helpers/null.js because of ./node_modules/axios/lib/helpers/toFormData.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/axios/lib/helpers/toFormData.js (<- Module uses injected variables (Buffer)) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/axios/lib/utils.js (<- Module uses injected variables (global)) */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ getBaseInfo; }); +__webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ getDocList; }); +__webpack_require__.d(__webpack_exports__, "g", function() { return /* binding */ gethomePageDocList; }); +__webpack_require__.d(__webpack_exports__, "f", function() { return /* binding */ getPartnerList; }); +__webpack_require__.d(__webpack_exports__, "e", function() { return /* binding */ getOrganization; }); +__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ getDocDetail; }); +__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ getDirList; }); + +// UNUSED EXPORTS: getSubAgenda, getMemberList + +// NAMESPACE OBJECT: ./node_modules/axios/lib/platform/common/utils.js +var utils_namespaceObject = {}; +__webpack_require__.r(utils_namespaceObject); +__webpack_require__.d(utils_namespaceObject, "hasBrowserEnv", function() { return hasBrowserEnv; }); +__webpack_require__.d(utils_namespaceObject, "hasStandardBrowserWebWorkerEnv", function() { return hasStandardBrowserWebWorkerEnv; }); +__webpack_require__.d(utils_namespaceObject, "hasStandardBrowserEnv", function() { return hasStandardBrowserEnv; }); + +// EXTERNAL MODULE: ./node_modules/antd/es/message/style/index.js +var style = __webpack_require__("miYZ"); + +// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 1 modules +var es_message = __webpack_require__("tsqr"); + +// EXTERNAL MODULE: ./node_modules/axios/lib/utils.js +var utils = __webpack_require__("xTJ+"); + +// EXTERNAL MODULE: ./node_modules/axios/lib/helpers/bind.js +var bind = __webpack_require__("HSsa"); + +// EXTERNAL MODULE: ./node_modules/axios/lib/helpers/toFormData.js +var toFormData = __webpack_require__("5GeT"); + +// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/AxiosURLSearchParams.js + + + + +/** + * It encodes a string by replacing all characters that are not in the unreserved set with + * their percent-encoded equivalents + * + * @param {string} str - The string to encode. + * + * @returns {string} The encoded string. + */ +function encode(str) { + const charMap = { + '!': '%21', + "'": '%27', + '(': '%28', + ')': '%29', + '~': '%7E', + '%20': '+', + '%00': '\x00' + }; + return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) { + return charMap[match]; + }); +} + +/** + * It takes a params object and converts it to a FormData object + * + * @param {Object} params - The parameters to be converted to a FormData object. + * @param {Object} options - The options object passed to the Axios constructor. + * + * @returns {void} + */ +function AxiosURLSearchParams(params, options) { + this._pairs = []; + + params && Object(toFormData["a" /* default */])(params, this, options); +} + +const AxiosURLSearchParams_prototype = AxiosURLSearchParams.prototype; + +AxiosURLSearchParams_prototype.append = function append(name, value) { + this._pairs.push([name, value]); +}; + +AxiosURLSearchParams_prototype.toString = function toString(encoder) { + const _encode = encoder ? function(value) { + return encoder.call(this, value, encode); + } : encode; + + return this._pairs.map(function each(pair) { + return _encode(pair[0]) + '=' + _encode(pair[1]); + }, '').join('&'); +}; + +/* harmony default export */ var helpers_AxiosURLSearchParams = (AxiosURLSearchParams); + +// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/buildURL.js + + + + + +/** + * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their + * URI encoded counterparts + * + * @param {string} val The value to be encoded. + * + * @returns {string} The encoded value. + */ +function buildURL_encode(val) { + return encodeURIComponent(val). + replace(/%3A/gi, ':'). + replace(/%24/g, '$'). + replace(/%2C/gi, ','). + replace(/%20/g, '+'). + replace(/%5B/gi, '['). + replace(/%5D/gi, ']'); +} + +/** + * Build a URL by appending params to the end + * + * @param {string} url The base of the url (e.g., http://www.google.com) + * @param {object} [params] The params to be appended + * @param {?object} options + * + * @returns {string} The formatted url + */ +function buildURL(url, params, options) { + /*eslint no-param-reassign:0*/ + if (!params) { + return url; + } + + const _encode = options && options.encode || buildURL_encode; + + const serializeFn = options && options.serialize; + + let serializedParams; + + if (serializeFn) { + serializedParams = serializeFn(params, options); + } else { + serializedParams = utils["a" /* default */].isURLSearchParams(params) ? + params.toString() : + new helpers_AxiosURLSearchParams(params, options).toString(_encode); + } + + if (serializedParams) { + const hashmarkIndex = url.indexOf("#"); + + if (hashmarkIndex !== -1) { + url = url.slice(0, hashmarkIndex); + } + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; + } + + return url; +} + +// CONCATENATED MODULE: ./node_modules/axios/lib/core/InterceptorManager.js + + + + +class InterceptorManager_InterceptorManager { + constructor() { + this.handlers = []; + } + + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * + * @return {Number} An ID used to remove interceptor later + */ + use(fulfilled, rejected, options) { + this.handlers.push({ + fulfilled, + rejected, + synchronous: options ? options.synchronous : false, + runWhen: options ? options.runWhen : null + }); + return this.handlers.length - 1; + } + + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + * + * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise + */ + eject(id) { + if (this.handlers[id]) { + this.handlers[id] = null; + } + } + + /** + * Clear all interceptors from the stack + * + * @returns {void} + */ + clear() { + if (this.handlers) { + this.handlers = []; + } + } + + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + * + * @returns {void} + */ + forEach(fn) { + utils["a" /* default */].forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); + } +} + +/* harmony default export */ var core_InterceptorManager = (InterceptorManager_InterceptorManager); + +// EXTERNAL MODULE: ./node_modules/axios/lib/core/AxiosError.js +var AxiosError = __webpack_require__("eRe6"); + +// CONCATENATED MODULE: ./node_modules/axios/lib/defaults/transitional.js + + +/* harmony default export */ var defaults_transitional = ({ + silentJSONParsing: true, + forcedJSONParsing: true, + clarifyTimeoutError: false +}); + +// CONCATENATED MODULE: ./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js + + + +/* harmony default export */ var classes_URLSearchParams = (typeof URLSearchParams !== 'undefined' ? URLSearchParams : helpers_AxiosURLSearchParams); + +// CONCATENATED MODULE: ./node_modules/axios/lib/platform/browser/classes/FormData.js + + +/* harmony default export */ var classes_FormData = (typeof FormData !== 'undefined' ? FormData : null); + +// CONCATENATED MODULE: ./node_modules/axios/lib/platform/browser/classes/Blob.js + + +/* harmony default export */ var classes_Blob = (typeof Blob !== 'undefined' ? Blob : null); + +// CONCATENATED MODULE: ./node_modules/axios/lib/platform/browser/index.js + + + + +/* harmony default export */ var browser = ({ + isBrowser: true, + classes: { + URLSearchParams: classes_URLSearchParams, + FormData: classes_FormData, + Blob: classes_Blob + }, + protocols: ['http', 'https', 'file', 'blob', 'url', 'data'] +}); + +// CONCATENATED MODULE: ./node_modules/axios/lib/platform/common/utils.js +const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined'; + +/** + * Determine if we're running in a standard browser environment + * + * This allows axios to run in a web worker, and react-native. + * Both environments support XMLHttpRequest, but not fully standard globals. + * + * web workers: + * typeof window -> undefined + * typeof document -> undefined + * + * react-native: + * navigator.product -> 'ReactNative' + * nativescript + * navigator.product -> 'NativeScript' or 'NS' + * + * @returns {boolean} + */ +const hasStandardBrowserEnv = ( + (product) => { + return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0 + })(typeof navigator !== 'undefined' && navigator.product); + +/** + * Determine if we're running in a standard browser webWorker environment + * + * Although the `isStandardBrowserEnv` method indicates that + * `allows axios to run in a web worker`, the WebWorker will still be + * filtered out due to its judgment standard + * `typeof window !== 'undefined' && typeof document !== 'undefined'`. + * This leads to a problem when axios post `FormData` in webWorker + */ +const hasStandardBrowserWebWorkerEnv = (() => { + return ( + typeof WorkerGlobalScope !== 'undefined' && + // eslint-disable-next-line no-undef + self instanceof WorkerGlobalScope && + typeof self.importScripts === 'function' + ); +})(); + + + +// CONCATENATED MODULE: ./node_modules/axios/lib/platform/index.js + + + +/* harmony default export */ var platform = ({ + ...utils_namespaceObject, + ...browser +}); + +// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/toURLEncodedForm.js + + + + + + +function toURLEncodedForm(data, options) { + return Object(toFormData["a" /* default */])(data, new platform.classes.URLSearchParams(), Object.assign({ + visitor: function(value, key, path, helpers) { + if (platform.isNode && utils["a" /* default */].isBuffer(value)) { + this.append(key, value.toString('base64')); + return false; + } + + return helpers.defaultVisitor.apply(this, arguments); + } + }, options)); +} + +// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/formDataToJSON.js + + + + +/** + * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z'] + * + * @param {string} name - The name of the property to get. + * + * @returns An array of strings. + */ +function parsePropPath(name) { + // foo[x][y][z] + // foo.x.y.z + // foo-x-y-z + // foo x y z + return utils["a" /* default */].matchAll(/\w+|\[(\w*)]/g, name).map(match => { + return match[0] === '[]' ? '' : match[1] || match[0]; + }); +} + +/** + * Convert an array to an object. + * + * @param {Array} arr - The array to convert to an object. + * + * @returns An object with the same keys and values as the array. + */ +function arrayToObject(arr) { + const obj = {}; + const keys = Object.keys(arr); + let i; + const len = keys.length; + let key; + for (i = 0; i < len; i++) { + key = keys[i]; + obj[key] = arr[key]; + } + return obj; +} + +/** + * It takes a FormData object and returns a JavaScript object + * + * @param {string} formData The FormData object to convert to JSON. + * + * @returns {Object | null} The converted object. + */ +function formDataToJSON(formData) { + function buildPath(path, value, target, index) { + let name = path[index++]; + + if (name === '__proto__') return true; + + const isNumericKey = Number.isFinite(+name); + const isLast = index >= path.length; + name = !name && utils["a" /* default */].isArray(target) ? target.length : name; + + if (isLast) { + if (utils["a" /* default */].hasOwnProp(target, name)) { + target[name] = [target[name], value]; + } else { + target[name] = value; + } + + return !isNumericKey; + } + + if (!target[name] || !utils["a" /* default */].isObject(target[name])) { + target[name] = []; + } + + const result = buildPath(path, value, target[name], index); + + if (result && utils["a" /* default */].isArray(target[name])) { + target[name] = arrayToObject(target[name]); + } + + return !isNumericKey; + } + + if (utils["a" /* default */].isFormData(formData) && utils["a" /* default */].isFunction(formData.entries)) { + const obj = {}; + + utils["a" /* default */].forEachEntry(formData, (name, value) => { + buildPath(parsePropPath(name), value, obj, 0); + }); + + return obj; + } + + return null; +} + +/* harmony default export */ var helpers_formDataToJSON = (formDataToJSON); + +// CONCATENATED MODULE: ./node_modules/axios/lib/defaults/index.js + + + + + + + + + + +/** + * It takes a string, tries to parse it, and if it fails, it returns the stringified version + * of the input + * + * @param {any} rawValue - The value to be stringified. + * @param {Function} parser - A function that parses a string into a JavaScript object. + * @param {Function} encoder - A function that takes a value and returns a string. + * + * @returns {string} A stringified version of the rawValue. + */ +function stringifySafely(rawValue, parser, encoder) { + if (utils["a" /* default */].isString(rawValue)) { + try { + (parser || JSON.parse)(rawValue); + return utils["a" /* default */].trim(rawValue); + } catch (e) { + if (e.name !== 'SyntaxError') { + throw e; + } + } + } + + return (encoder || JSON.stringify)(rawValue); +} + +const defaults = { + + transitional: defaults_transitional, + + adapter: ['xhr', 'http'], + + transformRequest: [function transformRequest(data, headers) { + const contentType = headers.getContentType() || ''; + const hasJSONContentType = contentType.indexOf('application/json') > -1; + const isObjectPayload = utils["a" /* default */].isObject(data); + + if (isObjectPayload && utils["a" /* default */].isHTMLForm(data)) { + data = new FormData(data); + } + + const isFormData = utils["a" /* default */].isFormData(data); + + if (isFormData) { + return hasJSONContentType ? JSON.stringify(helpers_formDataToJSON(data)) : data; + } + + if (utils["a" /* default */].isArrayBuffer(data) || + utils["a" /* default */].isBuffer(data) || + utils["a" /* default */].isStream(data) || + utils["a" /* default */].isFile(data) || + utils["a" /* default */].isBlob(data) + ) { + return data; + } + if (utils["a" /* default */].isArrayBufferView(data)) { + return data.buffer; + } + if (utils["a" /* default */].isURLSearchParams(data)) { + headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); + return data.toString(); + } + + let isFileList; + + if (isObjectPayload) { + if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { + return toURLEncodedForm(data, this.formSerializer).toString(); + } + + if ((isFileList = utils["a" /* default */].isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) { + const _FormData = this.env && this.env.FormData; + + return Object(toFormData["a" /* default */])( + isFileList ? {'files[]': data} : data, + _FormData && new _FormData(), + this.formSerializer + ); + } + } + + if (isObjectPayload || hasJSONContentType ) { + headers.setContentType('application/json', false); + return stringifySafely(data); + } + + return data; + }], + + transformResponse: [function transformResponse(data) { + const transitional = this.transitional || defaults.transitional; + const forcedJSONParsing = transitional && transitional.forcedJSONParsing; + const JSONRequested = this.responseType === 'json'; + + if (data && utils["a" /* default */].isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) { + const silentJSONParsing = transitional && transitional.silentJSONParsing; + const strictJSONParsing = !silentJSONParsing && JSONRequested; + + try { + return JSON.parse(data); + } catch (e) { + if (strictJSONParsing) { + if (e.name === 'SyntaxError') { + throw AxiosError["a" /* default */].from(e, AxiosError["a" /* default */].ERR_BAD_RESPONSE, this, null, this.response); + } + throw e; + } + } + } + + return data; + }], + + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ + timeout: 0, + + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', + + maxContentLength: -1, + maxBodyLength: -1, + + env: { + FormData: platform.classes.FormData, + Blob: platform.classes.Blob + }, + + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + }, + + headers: { + common: { + 'Accept': 'application/json, text/plain, */*', + 'Content-Type': undefined + } + } +}; + +utils["a" /* default */].forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => { + defaults.headers[method] = {}; +}); + +/* harmony default export */ var lib_defaults = (defaults); + +// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/parseHeaders.js + + + + +// RawAxiosHeaders whose duplicates are ignored by node +// c.f. https://nodejs.org/api/http.html#http_message_headers +const ignoreDuplicateOf = utils["a" /* default */].toObjectSet([ + 'age', 'authorization', 'content-length', 'content-type', 'etag', + 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', + 'last-modified', 'location', 'max-forwards', 'proxy-authorization', + 'referer', 'retry-after', 'user-agent' +]); + +/** + * Parse headers into an object + * + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` + * + * @param {String} rawHeaders Headers needing to be parsed + * + * @returns {Object} Headers parsed into an object + */ +/* harmony default export */ var parseHeaders = (rawHeaders => { + const parsed = {}; + let key; + let val; + let i; + + rawHeaders && rawHeaders.split('\n').forEach(function parser(line) { + i = line.indexOf(':'); + key = line.substring(0, i).trim().toLowerCase(); + val = line.substring(i + 1).trim(); + + if (!key || (parsed[key] && ignoreDuplicateOf[key])) { + return; + } + + if (key === 'set-cookie') { + if (parsed[key]) { + parsed[key].push(val); + } else { + parsed[key] = [val]; + } + } else { + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; + } + }); + + return parsed; +}); + +// CONCATENATED MODULE: ./node_modules/axios/lib/core/AxiosHeaders.js + + + + + +const $internals = Symbol('internals'); + +function normalizeHeader(header) { + return header && String(header).trim().toLowerCase(); +} + +function normalizeValue(value) { + if (value === false || value == null) { + return value; + } + + return utils["a" /* default */].isArray(value) ? value.map(normalizeValue) : String(value); +} + +function parseTokens(str) { + const tokens = Object.create(null); + const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; + let match; + + while ((match = tokensRE.exec(str))) { + tokens[match[1]] = match[2]; + } + + return tokens; +} + +const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); + +function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { + if (utils["a" /* default */].isFunction(filter)) { + return filter.call(this, value, header); + } + + if (isHeaderNameFilter) { + value = header; + } + + if (!utils["a" /* default */].isString(value)) return; + + if (utils["a" /* default */].isString(filter)) { + return value.indexOf(filter) !== -1; + } + + if (utils["a" /* default */].isRegExp(filter)) { + return filter.test(value); + } +} + +function formatHeader(header) { + return header.trim() + .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { + return char.toUpperCase() + str; + }); +} + +function buildAccessors(obj, header) { + const accessorName = utils["a" /* default */].toCamelCase(' ' + header); + + ['get', 'set', 'has'].forEach(methodName => { + Object.defineProperty(obj, methodName + accessorName, { + value: function(arg1, arg2, arg3) { + return this[methodName].call(this, header, arg1, arg2, arg3); + }, + configurable: true + }); + }); +} + +class AxiosHeaders_AxiosHeaders { + constructor(headers) { + headers && this.set(headers); + } + + set(header, valueOrRewrite, rewrite) { + const self = this; + + function setHeader(_value, _header, _rewrite) { + const lHeader = normalizeHeader(_header); + + if (!lHeader) { + throw new Error('header name must be a non-empty string'); + } + + const key = utils["a" /* default */].findKey(self, lHeader); + + if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) { + self[key || _header] = normalizeValue(_value); + } + } + + const setHeaders = (headers, _rewrite) => + utils["a" /* default */].forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); + + if (utils["a" /* default */].isPlainObject(header) || header instanceof this.constructor) { + setHeaders(header, valueOrRewrite) + } else if(utils["a" /* default */].isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { + setHeaders(parseHeaders(header), valueOrRewrite); + } else { + header != null && setHeader(valueOrRewrite, header, rewrite); + } + + return this; + } + + get(header, parser) { + header = normalizeHeader(header); + + if (header) { + const key = utils["a" /* default */].findKey(this, header); + + if (key) { + const value = this[key]; + + if (!parser) { + return value; + } + + if (parser === true) { + return parseTokens(value); + } + + if (utils["a" /* default */].isFunction(parser)) { + return parser.call(this, value, key); + } + + if (utils["a" /* default */].isRegExp(parser)) { + return parser.exec(value); + } + + throw new TypeError('parser must be boolean|regexp|function'); + } + } + } + + has(header, matcher) { + header = normalizeHeader(header); + + if (header) { + const key = utils["a" /* default */].findKey(this, header); + + return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher))); + } + + return false; + } + + delete(header, matcher) { + const self = this; + let deleted = false; + + function deleteHeader(_header) { + _header = normalizeHeader(_header); + + if (_header) { + const key = utils["a" /* default */].findKey(self, _header); + + if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) { + delete self[key]; + + deleted = true; + } + } + } + + if (utils["a" /* default */].isArray(header)) { + header.forEach(deleteHeader); + } else { + deleteHeader(header); + } + + return deleted; + } + + clear(matcher) { + const keys = Object.keys(this); + let i = keys.length; + let deleted = false; + + while (i--) { + const key = keys[i]; + if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { + delete this[key]; + deleted = true; + } + } + + return deleted; + } + + normalize(format) { + const self = this; + const headers = {}; + + utils["a" /* default */].forEach(this, (value, header) => { + const key = utils["a" /* default */].findKey(headers, header); + + if (key) { + self[key] = normalizeValue(value); + delete self[header]; + return; + } + + const normalized = format ? formatHeader(header) : String(header).trim(); + + if (normalized !== header) { + delete self[header]; + } + + self[normalized] = normalizeValue(value); + + headers[normalized] = true; + }); + + return this; + } + + concat(...targets) { + return this.constructor.concat(this, ...targets); + } + + toJSON(asStrings) { + const obj = Object.create(null); + + utils["a" /* default */].forEach(this, (value, header) => { + value != null && value !== false && (obj[header] = asStrings && utils["a" /* default */].isArray(value) ? value.join(', ') : value); + }); + + return obj; + } + + [Symbol.iterator]() { + return Object.entries(this.toJSON())[Symbol.iterator](); + } + + toString() { + return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n'); + } + + get [Symbol.toStringTag]() { + return 'AxiosHeaders'; + } + + static from(thing) { + return thing instanceof this ? thing : new this(thing); + } + + static concat(first, ...targets) { + const computed = new this(first); + + targets.forEach((target) => computed.set(target)); + + return computed; + } + + static accessor(header) { + const internals = this[$internals] = (this[$internals] = { + accessors: {} + }); + + const accessors = internals.accessors; + const prototype = this.prototype; + + function defineAccessor(_header) { + const lHeader = normalizeHeader(_header); + + if (!accessors[lHeader]) { + buildAccessors(prototype, _header); + accessors[lHeader] = true; + } + } + + utils["a" /* default */].isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); + + return this; + } +} + +AxiosHeaders_AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']); + +// reserved names hotfix +utils["a" /* default */].reduceDescriptors(AxiosHeaders_AxiosHeaders.prototype, ({value}, key) => { + let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` + return { + get: () => value, + set(headerValue) { + this[mapped] = headerValue; + } + } +}); + +utils["a" /* default */].freezeMethods(AxiosHeaders_AxiosHeaders); + +/* harmony default export */ var core_AxiosHeaders = (AxiosHeaders_AxiosHeaders); + +// CONCATENATED MODULE: ./node_modules/axios/lib/core/transformData.js + + + + + + +/** + * Transform the data for a request or a response + * + * @param {Array|Function} fns A single function or Array of functions + * @param {?Object} response The response object + * + * @returns {*} The resulting transformed data + */ +function transformData(fns, response) { + const config = this || lib_defaults; + const context = response || config; + const headers = core_AxiosHeaders.from(context.headers); + let data = context.data; + + utils["a" /* default */].forEach(fns, function transform(fn) { + data = fn.call(config, data, headers.normalize(), response ? response.status : undefined); + }); + + headers.normalize(); + + return data; +} + +// CONCATENATED MODULE: ./node_modules/axios/lib/cancel/isCancel.js + + +function isCancel(value) { + return !!(value && value.__CANCEL__); +} + +// CONCATENATED MODULE: ./node_modules/axios/lib/cancel/CanceledError.js + + + + + +/** + * A `CanceledError` is an object that is thrown when an operation is canceled. + * + * @param {string=} message The message. + * @param {Object=} config The config. + * @param {Object=} request The request. + * + * @returns {CanceledError} The created error. + */ +function CanceledError(message, config, request) { + // eslint-disable-next-line no-eq-null,eqeqeq + AxiosError["a" /* default */].call(this, message == null ? 'canceled' : message, AxiosError["a" /* default */].ERR_CANCELED, config, request); + this.name = 'CanceledError'; +} + +utils["a" /* default */].inherits(CanceledError, AxiosError["a" /* default */], { + __CANCEL__: true +}); + +/* harmony default export */ var cancel_CanceledError = (CanceledError); + +// EXTERNAL MODULE: ./node_modules/axios/lib/helpers/null.js +var helpers_null = __webpack_require__("RYHr"); + +// CONCATENATED MODULE: ./node_modules/axios/lib/core/settle.js + + + + +/** + * Resolve or reject a Promise based on response status. + * + * @param {Function} resolve A function that resolves the promise. + * @param {Function} reject A function that rejects the promise. + * @param {object} response The response. + * + * @returns {object} The response. + */ +function settle(resolve, reject, response) { + const validateStatus = response.config.validateStatus; + if (!response.status || !validateStatus || validateStatus(response.status)) { + resolve(response); + } else { + reject(new AxiosError["a" /* default */]( + 'Request failed with status code ' + response.status, + [AxiosError["a" /* default */].ERR_BAD_REQUEST, AxiosError["a" /* default */].ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], + response.config, + response.request, + response + )); + } +} + +// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/cookies.js + + + +/* harmony default export */ var cookies = (platform.hasStandardBrowserEnv ? + + // Standard browser envs support document.cookie + { + write(name, value, expires, path, domain, secure) { + const cookie = [name + '=' + encodeURIComponent(value)]; + + utils["a" /* default */].isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString()); + + utils["a" /* default */].isString(path) && cookie.push('path=' + path); + + utils["a" /* default */].isString(domain) && cookie.push('domain=' + domain); + + secure === true && cookie.push('secure'); + + document.cookie = cookie.join('; '); + }, + + read(name) { + const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return (match ? decodeURIComponent(match[3]) : null); + }, + + remove(name) { + this.write(name, '', Date.now() - 86400000); + } + } + + : + + // Non-standard browser env (web workers, react-native) lack needed support. + { + write() {}, + read() { + return null; + }, + remove() {} + }); + + +// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/isAbsoluteURL.js + + +/** + * Determines whether the specified URL is absolute + * + * @param {string} url The URL to test + * + * @returns {boolean} True if the specified URL is absolute, otherwise false + */ +function isAbsoluteURL(url) { + // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed + // by any combination of letters, digits, plus, period, or hyphen. + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); +} + +// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/combineURLs.js + + +/** + * Creates a new URL by combining the specified URLs + * + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL + * + * @returns {string} The combined URL + */ +function combineURLs(baseURL, relativeURL) { + return relativeURL + ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '') + : baseURL; +} + +// CONCATENATED MODULE: ./node_modules/axios/lib/core/buildFullPath.js + + + + + +/** + * Creates a new URL by combining the baseURL with the requestedURL, + * only when the requestedURL is not already an absolute URL. + * If the requestURL is absolute, this function returns the requestedURL untouched. + * + * @param {string} baseURL The base URL + * @param {string} requestedURL Absolute or relative URL to combine + * + * @returns {string} The combined full path + */ +function buildFullPath(baseURL, requestedURL) { + if (baseURL && !isAbsoluteURL(requestedURL)) { + return combineURLs(baseURL, requestedURL); + } + return requestedURL; +} + +// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/isURLSameOrigin.js + + + + + +/* harmony default export */ var helpers_isURLSameOrigin = (platform.hasStandardBrowserEnv ? + +// Standard browser envs have full support of the APIs needed to test +// whether the request URL is of the same origin as current location. + (function standardBrowserEnv() { + const msie = /(msie|trident)/i.test(navigator.userAgent); + const urlParsingNode = document.createElement('a'); + let originURL; + + /** + * Parse a URL to discover its components + * + * @param {String} url The URL to be parsed + * @returns {Object} + */ + function resolveURL(url) { + let href = url; + + if (msie) { + // IE needs attribute set twice to normalize properties + urlParsingNode.setAttribute('href', href); + href = urlParsingNode.href; + } + + urlParsingNode.setAttribute('href', href); + + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', + host: urlParsingNode.host, + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: (urlParsingNode.pathname.charAt(0) === '/') ? + urlParsingNode.pathname : + '/' + urlParsingNode.pathname + }; + } + + originURL = resolveURL(window.location.href); + + /** + * Determine if a URL shares the same origin as the current location + * + * @param {String} requestURL The URL to test + * @returns {boolean} True if URL shares the same origin, otherwise false + */ + return function isURLSameOrigin(requestURL) { + const parsed = (utils["a" /* default */].isString(requestURL)) ? resolveURL(requestURL) : requestURL; + return (parsed.protocol === originURL.protocol && + parsed.host === originURL.host); + }; + })() : + + // Non standard browser envs (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return function isURLSameOrigin() { + return true; + }; + })()); + +// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/parseProtocol.js + + +function parseProtocol(url) { + const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); + return match && match[1] || ''; +} + +// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/speedometer.js + + +/** + * Calculate data maxRate + * @param {Number} [samplesCount= 10] + * @param {Number} [min= 1000] + * @returns {Function} + */ +function speedometer(samplesCount, min) { + samplesCount = samplesCount || 10; + const bytes = new Array(samplesCount); + const timestamps = new Array(samplesCount); + let head = 0; + let tail = 0; + let firstSampleTS; + + min = min !== undefined ? min : 1000; + + return function push(chunkLength) { + const now = Date.now(); + + const startedAt = timestamps[tail]; + + if (!firstSampleTS) { + firstSampleTS = now; + } + + bytes[head] = chunkLength; + timestamps[head] = now; + + let i = tail; + let bytesCount = 0; + + while (i !== head) { + bytesCount += bytes[i++]; + i = i % samplesCount; + } + + head = (head + 1) % samplesCount; + + if (head === tail) { + tail = (tail + 1) % samplesCount; + } + + if (now - firstSampleTS < min) { + return; + } + + const passed = startedAt && now - startedAt; + + return passed ? Math.round(bytesCount * 1000 / passed) : undefined; + }; +} + +/* harmony default export */ var helpers_speedometer = (speedometer); + +// CONCATENATED MODULE: ./node_modules/axios/lib/adapters/xhr.js + + + + + + + + + + + + + + + + +function progressEventReducer(listener, isDownloadStream) { + let bytesNotified = 0; + const _speedometer = helpers_speedometer(50, 250); + + return e => { + const loaded = e.loaded; + const total = e.lengthComputable ? e.total : undefined; + const progressBytes = loaded - bytesNotified; + const rate = _speedometer(progressBytes); + const inRange = loaded <= total; + + bytesNotified = loaded; + + const data = { + loaded, + total, + progress: total ? (loaded / total) : undefined, + bytes: progressBytes, + rate: rate ? rate : undefined, + estimated: rate && total && inRange ? (total - loaded) / rate : undefined, + event: e + }; + + data[isDownloadStream ? 'download' : 'upload'] = true; + + listener(data); + }; +} + +const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; + +/* harmony default export */ var xhr = (isXHRAdapterSupported && function (config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + let requestData = config.data; + const requestHeaders = core_AxiosHeaders.from(config.headers).normalize(); + let {responseType, withXSRFToken} = config; + let onCanceled; + function done() { + if (config.cancelToken) { + config.cancelToken.unsubscribe(onCanceled); + } + + if (config.signal) { + config.signal.removeEventListener('abort', onCanceled); + } + } + + let contentType; + + if (utils["a" /* default */].isFormData(requestData)) { + if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) { + requestHeaders.setContentType(false); // Let the browser set it + } else if ((contentType = requestHeaders.getContentType()) !== false) { + // fix semicolon duplication issue for ReactNative FormData implementation + const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : []; + requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; ')); + } + } + + let request = new XMLHttpRequest(); + + // HTTP basic authentication + if (config.auth) { + const username = config.auth.username || ''; + const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : ''; + requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password)); + } + + const fullPath = buildFullPath(config.baseURL, config.url); + + request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true); + + // Set the request timeout in MS + request.timeout = config.timeout; + + function onloadend() { + if (!request) { + return; + } + // Prepare the response + const responseHeaders = core_AxiosHeaders.from( + 'getAllResponseHeaders' in request && request.getAllResponseHeaders() + ); + const responseData = !responseType || responseType === 'text' || responseType === 'json' ? + request.responseText : request.response; + const response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config, + request + }; + + settle(function _resolve(value) { + resolve(value); + done(); + }, function _reject(err) { + reject(err); + done(); + }, response); + + // Clean up request + request = null; + } + + if ('onloadend' in request) { + // Use onloadend if available + request.onloadend = onloadend; + } else { + // Listen for ready state to emulate onloadend + request.onreadystatechange = function handleLoad() { + if (!request || request.readyState !== 4) { + return; + } + + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { + return; + } + // readystate handler is calling before onerror or ontimeout handlers, + // so we should call onloadend on the next 'tick' + setTimeout(onloadend); + }; + } + + // Handle browser request cancellation (as opposed to a manual cancellation) + request.onabort = function handleAbort() { + if (!request) { + return; + } + + reject(new AxiosError["a" /* default */]('Request aborted', AxiosError["a" /* default */].ECONNABORTED, config, request)); + + // Clean up request + request = null; + }; + + // Handle low level network errors + request.onerror = function handleError() { + // Real errors are hidden from us by the browser + // onerror should only fire if it's a network error + reject(new AxiosError["a" /* default */]('Network Error', AxiosError["a" /* default */].ERR_NETWORK, config, request)); + + // Clean up request + request = null; + }; + + // Handle timeout + request.ontimeout = function handleTimeout() { + let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded'; + const transitional = config.transitional || defaults_transitional; + if (config.timeoutErrorMessage) { + timeoutErrorMessage = config.timeoutErrorMessage; + } + reject(new AxiosError["a" /* default */]( + timeoutErrorMessage, + transitional.clarifyTimeoutError ? AxiosError["a" /* default */].ETIMEDOUT : AxiosError["a" /* default */].ECONNABORTED, + config, + request)); + + // Clean up request + request = null; + }; + + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + if(platform.hasStandardBrowserEnv) { + withXSRFToken && utils["a" /* default */].isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config)); + + if (withXSRFToken || (withXSRFToken !== false && helpers_isURLSameOrigin(fullPath))) { + // Add xsrf header + const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName); + + if (xsrfValue) { + requestHeaders.set(config.xsrfHeaderName, xsrfValue); + } + } + } + + // Remove Content-Type if data is undefined + requestData === undefined && requestHeaders.setContentType(null); + + // Add headers to the request + if ('setRequestHeader' in request) { + utils["a" /* default */].forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) { + request.setRequestHeader(key, val); + }); + } + + // Add withCredentials to request if needed + if (!utils["a" /* default */].isUndefined(config.withCredentials)) { + request.withCredentials = !!config.withCredentials; + } + + // Add responseType to request if needed + if (responseType && responseType !== 'json') { + request.responseType = config.responseType; + } + + // Handle progress if needed + if (typeof config.onDownloadProgress === 'function') { + request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true)); + } + + // Not all browsers support upload events + if (typeof config.onUploadProgress === 'function' && request.upload) { + request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress)); + } + + if (config.cancelToken || config.signal) { + // Handle cancellation + // eslint-disable-next-line func-names + onCanceled = cancel => { + if (!request) { + return; + } + reject(!cancel || cancel.type ? new cancel_CanceledError(null, config, request) : cancel); + request.abort(); + request = null; + }; + + config.cancelToken && config.cancelToken.subscribe(onCanceled); + if (config.signal) { + config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled); + } + } + + const protocol = parseProtocol(fullPath); + + if (protocol && platform.protocols.indexOf(protocol) === -1) { + reject(new AxiosError["a" /* default */]('Unsupported protocol ' + protocol + ':', AxiosError["a" /* default */].ERR_BAD_REQUEST, config)); + return; + } + + + // Send the request + request.send(requestData || null); + }); +}); + +// CONCATENATED MODULE: ./node_modules/axios/lib/adapters/adapters.js + + + + + +const knownAdapters = { + http: helpers_null["a" /* default */], + xhr: xhr +} + +utils["a" /* default */].forEach(knownAdapters, (fn, value) => { + if (fn) { + try { + Object.defineProperty(fn, 'name', {value}); + } catch (e) { + // eslint-disable-next-line no-empty + } + Object.defineProperty(fn, 'adapterName', {value}); + } +}); + +const renderReason = (reason) => `- ${reason}`; + +const isResolvedHandle = (adapter) => utils["a" /* default */].isFunction(adapter) || adapter === null || adapter === false; + +/* harmony default export */ var adapters_adapters = ({ + getAdapter: (adapters) => { + adapters = utils["a" /* default */].isArray(adapters) ? adapters : [adapters]; + + const {length} = adapters; + let nameOrAdapter; + let adapter; + + const rejectedReasons = {}; + + for (let i = 0; i < length; i++) { + nameOrAdapter = adapters[i]; + let id; + + adapter = nameOrAdapter; + + if (!isResolvedHandle(nameOrAdapter)) { + adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; + + if (adapter === undefined) { + throw new AxiosError["a" /* default */](`Unknown adapter '${id}'`); + } + } + + if (adapter) { + break; + } + + rejectedReasons[id || '#' + i] = adapter; + } + + if (!adapter) { + + const reasons = Object.entries(rejectedReasons) + .map(([id, state]) => `adapter ${id} ` + + (state === false ? 'is not supported by the environment' : 'is not available in the build') + ); + + let s = length ? + (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) : + 'as no adapter specified'; + + throw new AxiosError["a" /* default */]( + `There is no suitable adapter to dispatch the request ` + s, + 'ERR_NOT_SUPPORT' + ); + } + + return adapter; + }, + adapters: knownAdapters +}); + +// CONCATENATED MODULE: ./node_modules/axios/lib/core/dispatchRequest.js + + + + + + + + + +/** + * Throws a `CanceledError` if cancellation has been requested. + * + * @param {Object} config The config that is to be used for the request + * + * @returns {void} + */ +function throwIfCancellationRequested(config) { + if (config.cancelToken) { + config.cancelToken.throwIfRequested(); + } + + if (config.signal && config.signal.aborted) { + throw new cancel_CanceledError(null, config); + } +} + +/** + * Dispatch a request to the server using the configured adapter. + * + * @param {object} config The config that is to be used for the request + * + * @returns {Promise} The Promise to be fulfilled + */ +function dispatchRequest(config) { + throwIfCancellationRequested(config); + + config.headers = core_AxiosHeaders.from(config.headers); + + // Transform request data + config.data = transformData.call( + config, + config.transformRequest + ); + + if (['post', 'put', 'patch'].indexOf(config.method) !== -1) { + config.headers.setContentType('application/x-www-form-urlencoded', false); + } + + const adapter = adapters_adapters.getAdapter(config.adapter || lib_defaults.adapter); + + return adapter(config).then(function onAdapterResolution(response) { + throwIfCancellationRequested(config); + + // Transform response data + response.data = transformData.call( + config, + config.transformResponse, + response + ); + + response.headers = core_AxiosHeaders.from(response.headers); + + return response; + }, function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config); + + // Transform response data + if (reason && reason.response) { + reason.response.data = transformData.call( + config, + config.transformResponse, + reason.response + ); + reason.response.headers = core_AxiosHeaders.from(reason.response.headers); + } + } + + return Promise.reject(reason); + }); +} + +// CONCATENATED MODULE: ./node_modules/axios/lib/core/mergeConfig.js + + + + + +const headersToObject = (thing) => thing instanceof core_AxiosHeaders ? { ...thing } : thing; + +/** + * Config-specific merge-function which creates a new config-object + * by merging two configuration objects together. + * + * @param {Object} config1 + * @param {Object} config2 + * + * @returns {Object} New object resulting from merging config2 to config1 + */ +function mergeConfig(config1, config2) { + // eslint-disable-next-line no-param-reassign + config2 = config2 || {}; + const config = {}; + + function getMergedValue(target, source, caseless) { + if (utils["a" /* default */].isPlainObject(target) && utils["a" /* default */].isPlainObject(source)) { + return utils["a" /* default */].merge.call({caseless}, target, source); + } else if (utils["a" /* default */].isPlainObject(source)) { + return utils["a" /* default */].merge({}, source); + } else if (utils["a" /* default */].isArray(source)) { + return source.slice(); + } + return source; + } + + // eslint-disable-next-line consistent-return + function mergeDeepProperties(a, b, caseless) { + if (!utils["a" /* default */].isUndefined(b)) { + return getMergedValue(a, b, caseless); + } else if (!utils["a" /* default */].isUndefined(a)) { + return getMergedValue(undefined, a, caseless); + } + } + + // eslint-disable-next-line consistent-return + function valueFromConfig2(a, b) { + if (!utils["a" /* default */].isUndefined(b)) { + return getMergedValue(undefined, b); + } + } + + // eslint-disable-next-line consistent-return + function defaultToConfig2(a, b) { + if (!utils["a" /* default */].isUndefined(b)) { + return getMergedValue(undefined, b); + } else if (!utils["a" /* default */].isUndefined(a)) { + return getMergedValue(undefined, a); + } + } + + // eslint-disable-next-line consistent-return + function mergeDirectKeys(a, b, prop) { + if (prop in config2) { + return getMergedValue(a, b); + } else if (prop in config1) { + return getMergedValue(undefined, a); + } + } + + const mergeMap = { + url: valueFromConfig2, + method: valueFromConfig2, + data: valueFromConfig2, + baseURL: defaultToConfig2, + transformRequest: defaultToConfig2, + transformResponse: defaultToConfig2, + paramsSerializer: defaultToConfig2, + timeout: defaultToConfig2, + timeoutMessage: defaultToConfig2, + withCredentials: defaultToConfig2, + withXSRFToken: defaultToConfig2, + adapter: defaultToConfig2, + responseType: defaultToConfig2, + xsrfCookieName: defaultToConfig2, + xsrfHeaderName: defaultToConfig2, + onUploadProgress: defaultToConfig2, + onDownloadProgress: defaultToConfig2, + decompress: defaultToConfig2, + maxContentLength: defaultToConfig2, + maxBodyLength: defaultToConfig2, + beforeRedirect: defaultToConfig2, + transport: defaultToConfig2, + httpAgent: defaultToConfig2, + httpsAgent: defaultToConfig2, + cancelToken: defaultToConfig2, + socketPath: defaultToConfig2, + responseEncoding: defaultToConfig2, + validateStatus: mergeDirectKeys, + headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true) + }; + + utils["a" /* default */].forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) { + const merge = mergeMap[prop] || mergeDeepProperties; + const configValue = merge(config1[prop], config2[prop], prop); + (utils["a" /* default */].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); + }); + + return config; +} + +// CONCATENATED MODULE: ./node_modules/axios/lib/env/data.js +const VERSION = "1.6.8"; +// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/validator.js + + + + + +const validators = {}; + +// eslint-disable-next-line func-names +['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => { + validators[type] = function validator(thing) { + return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; + }; +}); + +const deprecatedWarnings = {}; + +/** + * Transitional option validator + * + * @param {function|boolean?} validator - set to false if the transitional option has been removed + * @param {string?} version - deprecated version / removed since version + * @param {string?} message - some message with additional info + * + * @returns {function} + */ +validators.transitional = function transitional(validator, version, message) { + function formatMessage(opt, desc) { + return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); + } + + // eslint-disable-next-line func-names + return (value, opt, opts) => { + if (validator === false) { + throw new AxiosError["a" /* default */]( + formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), + AxiosError["a" /* default */].ERR_DEPRECATED + ); + } + + if (version && !deprecatedWarnings[opt]) { + deprecatedWarnings[opt] = true; + // eslint-disable-next-line no-console + console.warn( + formatMessage( + opt, + ' has been deprecated since v' + version + ' and will be removed in the near future' + ) + ); + } + + return validator ? validator(value, opt, opts) : true; + }; +}; + +/** + * Assert object's properties type + * + * @param {object} options + * @param {object} schema + * @param {boolean?} allowUnknown + * + * @returns {object} + */ + +function assertOptions(options, schema, allowUnknown) { + if (typeof options !== 'object') { + throw new AxiosError["a" /* default */]('options must be an object', AxiosError["a" /* default */].ERR_BAD_OPTION_VALUE); + } + const keys = Object.keys(options); + let i = keys.length; + while (i-- > 0) { + const opt = keys[i]; + const validator = schema[opt]; + if (validator) { + const value = options[opt]; + const result = value === undefined || validator(value, opt, options); + if (result !== true) { + throw new AxiosError["a" /* default */]('option ' + opt + ' must be ' + result, AxiosError["a" /* default */].ERR_BAD_OPTION_VALUE); + } + continue; + } + if (allowUnknown !== true) { + throw new AxiosError["a" /* default */]('Unknown option ' + opt, AxiosError["a" /* default */].ERR_BAD_OPTION); + } + } +} + +/* harmony default export */ var helpers_validator = ({ + assertOptions, + validators +}); + +// CONCATENATED MODULE: ./node_modules/axios/lib/core/Axios.js + + + + + + + + + + + +const Axios_validators = helpers_validator.validators; + +/** + * Create a new instance of Axios + * + * @param {Object} instanceConfig The default config for the instance + * + * @return {Axios} A new instance of Axios + */ +class Axios_Axios { + constructor(instanceConfig) { + this.defaults = instanceConfig; + this.interceptors = { + request: new core_InterceptorManager(), + response: new core_InterceptorManager() + }; + } + + /** + * Dispatch a request + * + * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) + * @param {?Object} config + * + * @returns {Promise} The Promise to be fulfilled + */ + async request(configOrUrl, config) { + try { + return await this._request(configOrUrl, config); + } catch (err) { + if (err instanceof Error) { + let dummy; + + Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error()); + + // slice off the Error: ... line + const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : ''; + + if (!err.stack) { + err.stack = stack; + // match without the 2 top stack lines + } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) { + err.stack += '\n' + stack + } + } + + throw err; + } + } + + _request(configOrUrl, config) { + /*eslint no-param-reassign:0*/ + // Allow for axios('example/url'[, config]) a la fetch API + if (typeof configOrUrl === 'string') { + config = config || {}; + config.url = configOrUrl; + } else { + config = configOrUrl || {}; + } + + config = mergeConfig(this.defaults, config); + + const {transitional, paramsSerializer, headers} = config; + + if (transitional !== undefined) { + helpers_validator.assertOptions(transitional, { + silentJSONParsing: Axios_validators.transitional(Axios_validators.boolean), + forcedJSONParsing: Axios_validators.transitional(Axios_validators.boolean), + clarifyTimeoutError: Axios_validators.transitional(Axios_validators.boolean) + }, false); + } + + if (paramsSerializer != null) { + if (utils["a" /* default */].isFunction(paramsSerializer)) { + config.paramsSerializer = { + serialize: paramsSerializer + } + } else { + helpers_validator.assertOptions(paramsSerializer, { + encode: Axios_validators.function, + serialize: Axios_validators.function + }, true); + } + } + + // Set config.method + config.method = (config.method || this.defaults.method || 'get').toLowerCase(); + + // Flatten headers + let contextHeaders = headers && utils["a" /* default */].merge( + headers.common, + headers[config.method] + ); + + headers && utils["a" /* default */].forEach( + ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], + (method) => { + delete headers[method]; + } + ); + + config.headers = core_AxiosHeaders.concat(contextHeaders, headers); + + // filter out skipped interceptors + const requestInterceptorChain = []; + let synchronousRequestInterceptors = true; + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { + if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { + return; + } + + synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; + + requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + }); + + const responseInterceptorChain = []; + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { + responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + }); + + let promise; + let i = 0; + let len; + + if (!synchronousRequestInterceptors) { + const chain = [dispatchRequest.bind(this), undefined]; + chain.unshift.apply(chain, requestInterceptorChain); + chain.push.apply(chain, responseInterceptorChain); + len = chain.length; + + promise = Promise.resolve(config); + + while (i < len) { + promise = promise.then(chain[i++], chain[i++]); + } + + return promise; + } + + len = requestInterceptorChain.length; + + let newConfig = config; + + i = 0; + + while (i < len) { + const onFulfilled = requestInterceptorChain[i++]; + const onRejected = requestInterceptorChain[i++]; + try { + newConfig = onFulfilled(newConfig); + } catch (error) { + onRejected.call(this, error); + break; + } + } + + try { + promise = dispatchRequest.call(this, newConfig); + } catch (error) { + return Promise.reject(error); + } + + i = 0; + len = responseInterceptorChain.length; + + while (i < len) { + promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); + } + + return promise; + } + + getUri(config) { + config = mergeConfig(this.defaults, config); + const fullPath = buildFullPath(config.baseURL, config.url); + return buildURL(fullPath, config.params, config.paramsSerializer); + } +} + +// Provide aliases for supported request methods +utils["a" /* default */].forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { + /*eslint func-names:0*/ + Axios_Axios.prototype[method] = function(url, config) { + return this.request(mergeConfig(config || {}, { + method, + url, + data: (config || {}).data + })); + }; +}); + +utils["a" /* default */].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + /*eslint func-names:0*/ + + function generateHTTPMethod(isForm) { + return function httpMethod(url, data, config) { + return this.request(mergeConfig(config || {}, { + method, + headers: isForm ? { + 'Content-Type': 'multipart/form-data' + } : {}, + url, + data + })); + }; + } + + Axios_Axios.prototype[method] = generateHTTPMethod(); + + Axios_Axios.prototype[method + 'Form'] = generateHTTPMethod(true); +}); + +/* harmony default export */ var core_Axios = (Axios_Axios); + +// CONCATENATED MODULE: ./node_modules/axios/lib/cancel/CancelToken.js + + + + +/** + * A `CancelToken` is an object that can be used to request cancellation of an operation. + * + * @param {Function} executor The executor function. + * + * @returns {CancelToken} + */ +class CancelToken_CancelToken { + constructor(executor) { + if (typeof executor !== 'function') { + throw new TypeError('executor must be a function.'); + } + + let resolvePromise; + + this.promise = new Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; + }); + + const token = this; + + // eslint-disable-next-line func-names + this.promise.then(cancel => { + if (!token._listeners) return; + + let i = token._listeners.length; + + while (i-- > 0) { + token._listeners[i](cancel); + } + token._listeners = null; + }); + + // eslint-disable-next-line func-names + this.promise.then = onfulfilled => { + let _resolve; + // eslint-disable-next-line func-names + const promise = new Promise(resolve => { + token.subscribe(resolve); + _resolve = resolve; + }).then(onfulfilled); + + promise.cancel = function reject() { + token.unsubscribe(_resolve); + }; + + return promise; + }; + + executor(function cancel(message, config, request) { + if (token.reason) { + // Cancellation has already been requested + return; + } + + token.reason = new cancel_CanceledError(message, config, request); + resolvePromise(token.reason); + }); + } + + /** + * Throws a `CanceledError` if cancellation has been requested. + */ + throwIfRequested() { + if (this.reason) { + throw this.reason; + } + } + + /** + * Subscribe to the cancel signal + */ + + subscribe(listener) { + if (this.reason) { + listener(this.reason); + return; + } + + if (this._listeners) { + this._listeners.push(listener); + } else { + this._listeners = [listener]; + } + } + + /** + * Unsubscribe from the cancel signal + */ + + unsubscribe(listener) { + if (!this._listeners) { + return; + } + const index = this._listeners.indexOf(listener); + if (index !== -1) { + this._listeners.splice(index, 1); + } + } + + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ + static source() { + let cancel; + const token = new CancelToken_CancelToken(function executor(c) { + cancel = c; + }); + return { + token, + cancel + }; + } +} + +/* harmony default export */ var cancel_CancelToken = (CancelToken_CancelToken); + +// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/spread.js + + +/** + * Syntactic sugar for invoking a function and expanding an array for arguments. + * + * Common use case would be to use `Function.prototype.apply`. + * + * ```js + * function f(x, y, z) {} + * var args = [1, 2, 3]; + * f.apply(null, args); + * ``` + * + * With `spread` this example can be re-written. + * + * ```js + * spread(function(x, y, z) {})([1, 2, 3]); + * ``` + * + * @param {Function} callback + * + * @returns {Function} + */ +function spread(callback) { + return function wrap(arr) { + return callback.apply(null, arr); + }; +} + +// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/isAxiosError.js + + + + +/** + * Determines whether the payload is an error thrown by Axios + * + * @param {*} payload The value to test + * + * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false + */ +function isAxiosError(payload) { + return utils["a" /* default */].isObject(payload) && (payload.isAxiosError === true); +} + +// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/HttpStatusCode.js +const HttpStatusCode = { + Continue: 100, + SwitchingProtocols: 101, + Processing: 102, + EarlyHints: 103, + Ok: 200, + Created: 201, + Accepted: 202, + NonAuthoritativeInformation: 203, + NoContent: 204, + ResetContent: 205, + PartialContent: 206, + MultiStatus: 207, + AlreadyReported: 208, + ImUsed: 226, + MultipleChoices: 300, + MovedPermanently: 301, + Found: 302, + SeeOther: 303, + NotModified: 304, + UseProxy: 305, + Unused: 306, + TemporaryRedirect: 307, + PermanentRedirect: 308, + BadRequest: 400, + Unauthorized: 401, + PaymentRequired: 402, + Forbidden: 403, + NotFound: 404, + MethodNotAllowed: 405, + NotAcceptable: 406, + ProxyAuthenticationRequired: 407, + RequestTimeout: 408, + Conflict: 409, + Gone: 410, + LengthRequired: 411, + PreconditionFailed: 412, + PayloadTooLarge: 413, + UriTooLong: 414, + UnsupportedMediaType: 415, + RangeNotSatisfiable: 416, + ExpectationFailed: 417, + ImATeapot: 418, + MisdirectedRequest: 421, + UnprocessableEntity: 422, + Locked: 423, + FailedDependency: 424, + TooEarly: 425, + UpgradeRequired: 426, + PreconditionRequired: 428, + TooManyRequests: 429, + RequestHeaderFieldsTooLarge: 431, + UnavailableForLegalReasons: 451, + InternalServerError: 500, + NotImplemented: 501, + BadGateway: 502, + ServiceUnavailable: 503, + GatewayTimeout: 504, + HttpVersionNotSupported: 505, + VariantAlsoNegotiates: 506, + InsufficientStorage: 507, + LoopDetected: 508, + NotExtended: 510, + NetworkAuthenticationRequired: 511, +}; + +Object.entries(HttpStatusCode).forEach(([key, value]) => { + HttpStatusCode[value] = key; +}); + +/* harmony default export */ var helpers_HttpStatusCode = (HttpStatusCode); + +// CONCATENATED MODULE: ./node_modules/axios/lib/axios.js + + + + + + + + + + + + + + + + + + + + +/** + * Create an instance of Axios + * + * @param {Object} defaultConfig The default config for the instance + * + * @returns {Axios} A new instance of Axios + */ +function createInstance(defaultConfig) { + const context = new core_Axios(defaultConfig); + const instance = Object(bind["a" /* default */])(core_Axios.prototype.request, context); + + // Copy axios.prototype to instance + utils["a" /* default */].extend(instance, core_Axios.prototype, context, {allOwnKeys: true}); + + // Copy context to instance + utils["a" /* default */].extend(instance, context, null, {allOwnKeys: true}); + + // Factory for creating new instances + instance.create = function create(instanceConfig) { + return createInstance(mergeConfig(defaultConfig, instanceConfig)); + }; + + return instance; +} + +// Create the default instance to be exported +const axios = createInstance(lib_defaults); + +// Expose Axios class to allow class inheritance +axios.Axios = core_Axios; + +// Expose Cancel & CancelToken +axios.CanceledError = cancel_CanceledError; +axios.CancelToken = cancel_CancelToken; +axios.isCancel = isCancel; +axios.VERSION = VERSION; +axios.toFormData = toFormData["a" /* default */]; + +// Expose AxiosError class +axios.AxiosError = AxiosError["a" /* default */]; + +// alias for CanceledError for backward compatibility +axios.Cancel = axios.CanceledError; + +// Expose all/spread +axios.all = function all(promises) { + return Promise.all(promises); +}; + +axios.spread = spread; + +// Expose isAxiosError +axios.isAxiosError = isAxiosError; + +// Expose mergeConfig +axios.mergeConfig = mergeConfig; + +axios.AxiosHeaders = core_AxiosHeaders; + +axios.formToJSON = thing => helpers_formDataToJSON(utils["a" /* default */].isHTMLForm(thing) ? new FormData(thing) : thing); + +axios.getAdapter = adapters_adapters.getAdapter; + +axios.HttpStatusCode = helpers_HttpStatusCode; + +axios.default = axios; + +// this module should only have a default export +/* harmony default export */ var lib_axios = (axios); + +// CONCATENATED MODULE: ./src/pages/metting/index.js + + + +function beforeFetch() { + if (window.location.href.indexOf('localhost') < 0) { + lib_axios.defaults.withCredentials = true; + } + var service = lib_axios.create({ + baseURL: 'https://gateway.gitlink.org.cn', + timeout: 1800000 // 请求超时时间 + }); + service.interceptors.response.use(function (response) { + var res = response || {}; + if (res && res.data && res.data.code === 404) { + es_message["b" /* default */].error("错误链接!"); + window.location.href = '/nopage'; + return Promise.reject('error'); + } else if (res && res.data && res.data.code === 500) { + es_message["b" /* default */].error(res.data.msg); + return Promise.reject('error'); + } else { + return response.data; + } + }, function (error) { + console.log(error); + // notification.open({ + // message: "提示", + // description: error.message, + // }); + // return Promise.reject(error); + }); + return service; +} +var metting_service = beforeFetch(); +/* harmony default export */ var metting = (metting_service); +// EXTERNAL MODULE: ./src/pages/metting/info.js +var info = __webpack_require__("PZZE"); + +// CONCATENATED MODULE: ./src/pages/metting/api.js + + + +/** + * 获取基础信息 + * @param {*} params + * @returns + */ +function getBaseInfo(params) { + return metting({ + url: "/api/zone/open/zoneKey/".concat(info["a" /* config */].zoneKey), + method: 'get', + params: params + }); +} + +/** + * 获取会议议程主会场(指定新闻列表) + * @param {*} cateId 指定专栏id + * @param {*} params + * @returns + */ +function getDocList(cateId, params) { + return metting({ + url: "/api/cms/doc/open/dir/".concat(cateId, "/docList"), + method: 'get', + params: params + }); +} + +/** + * 获取会议议程分会场(指定新闻列表内容) + * @param {*} cateId 指定专栏id + * @param {*} params + * @returns + */ +function getSubAgenda(cateId, params) { + return metting({ + url: "/api/cms/doc/open/dir/".concat(cateId, "/docContentList"), + method: 'get', + params: params + }); +} + +/** + * 获取会议指南(专区首页文章列表 + * @returns + */ +function gethomePageDocList() { + return metting({ + url: "/api/cms/doc/open/zone/".concat(info["a" /* config */].zoneId, "/homePageDocList"), + method: 'get' + }); +} + +/** + * 获取与会嘉宾 + * @returns + */ +function getMemberList() { + return metting({ + url: "/api/zone/open/".concat(info["a" /* config */].zoneId, "/member/homePageList"), + method: 'get' + }); +} + +/** + * 合作伙伴 + * @returns + */ +function getPartnerList() { + return metting({ + url: "/api/zone/open/".concat(info["a" /* config */].zoneId, "/partners/list"), + method: 'get' + }); +} + +/** + * 获取组织机构 + * @returns + */ +function getOrganization() { + return metting({ + url: "/api/zone/open/".concat(info["a" /* config */].zoneId, "/member/overviewList"), + method: 'get' + }); +} + +/** + * 获取文章详情 + * @param {*} id 文章id + * @returns + */ +function getDocDetail(id) { + return metting({ + url: "/api/cms/doc/open/".concat(id), + method: 'get' + }); +} + +/** + * 获取所有栏目列表 + * @returns + */ +function getDirList() { + return metting({ + url: "/api/cms/doc/open/zone/".concat(info["a" /* config */].zoneId, "/dirList"), + method: 'get' + }); +} + +/***/ }), + +/***/ "LpSC": +/*!***************************************************************!*\ + !*** ./node_modules/isomorphic-fetch/fetch-npm-browserify.js ***! + \***************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +// the whatwg-fetch polyfill installs the fetch() function +// on the global object (window or self) +// +// Return that as the export for use in Webpack, Browserify etc. +__webpack_require__(/*! whatwg-fetch */ "bZMm"); +module.exports = self.fetch.bind(self); + + +/***/ }), + +/***/ "LvDl": +/*!***************************************!*\ + !*** ./node_modules/lodash/lodash.js ***! + \***************************************/ +/*! no static exports found */ +/*! exports used: cloneDeep, default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.21'; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Error message constants. */ + var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', + FUNC_ERROR_TEXT = 'Expected a function', + INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`'; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + + /** Used as default options for `_.truncate`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; + + /** Used to detect hot functions by number of calls within a span of milliseconds. */ + var HOT_COUNT = 800, + HOT_SPAN = 16; + + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2, + LAZY_WHILE_FLAG = 3; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, + MAX_INTEGER = 1.7976931348623157e+308, + NAN = 0 / 0; + + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] + ]; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + domExcTag = '[object DOMException]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]', + weakSetTag = '[object WeakSet]'; + + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, + reUnescapedHtml = /[&<>"']/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + + /** Used to match leading whitespace. */ + var reTrimStart = /^\s+/; + + /** Used to match a single whitespace character. */ + var reWhitespace = /\s/; + + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + + /** + * Used to validate the `validate` option in `_.template` variable. + * + * Forbids characters which could potentially change the meaning of the function argument definition: + * - "()," (modification of function parameters) + * - "=" (default value) + * - "[]{}" (destructuring of function parameters) + * - "/" (beginning of a comment) + * - whitespace + */ + var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). + */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; + + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + + /** Used to compose unicode character classes. */ + var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + + /** Used to compose unicode capture groups. */ + var rsApos = "['\u2019]", + rsAstral = '[' + rsAstralRange + ']', + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + + /** Used to compose unicode regexes. */ + var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + + /** Used to match apostrophes. */ + var reApos = RegExp(rsApos, 'g'); + + /** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ + var reComboMark = RegExp(rsCombo, 'g'); + + /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + + /** Used to match complex or compound words. */ + var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji + ].join('|'), 'g'); + + /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ + var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + + /** Used to detect strings that need a more robust regexp to match words. */ + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + + /** Used to assign default `context` object properties. */ + var contextProps = [ + 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', + 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', + 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', + 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', + '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' + ]; + + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = + typedArrayTags[errorTag] = typedArrayTags[funcTag] = + typedArrayTags[mapTag] = typedArrayTags[numberTag] = + typedArrayTags[objectTag] = typedArrayTags[regexpTag] = + typedArrayTags[setTag] = typedArrayTags[stringTag] = + typedArrayTags[weakMapTag] = false; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = + cloneableTags[boolTag] = cloneableTags[dateTag] = + cloneableTags[float32Tag] = cloneableTags[float64Tag] = + cloneableTags[int8Tag] = cloneableTags[int16Tag] = + cloneableTags[int32Tag] = cloneableTags[mapTag] = + cloneableTags[numberTag] = cloneableTags[objectTag] = + cloneableTags[regexpTag] = cloneableTags[setTag] = + cloneableTags[stringTag] = cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[weakMapTag] = false; + + /** Used to map Latin Unicode letters to basic Latin letters. */ + var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' + }; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" + }; + + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Built-in method references without a dependency on `root`. */ + var freeParseFloat = parseFloat, + freeParseInt = parseInt; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = true && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; + + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }()); + + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + + /*--------------------------------------------------------------------------*/ + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + + /** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } + + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + /** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + var asciiSize = baseProperty('length'); + + /** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function asciiToArray(string) { + return string.split(''); + } + + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + + /** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); + } + + /** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + function baseIsNaN(value) { + return value !== value; + } + + /** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ + function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? (baseSum(array, iteratee) / length) : NAN; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + /** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); + } + } + return result; + } + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ + function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); + } + + /** + * The base implementation of `_.trim`. + * + * @private + * @param {string} string The string to trim. + * @returns {string} Returns the trimmed string. + */ + function baseTrim(string) { + return string + ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') + : string; + } + + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } + + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } + + /** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ + function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ + function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; + } + + /** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + var deburrLetter = basePropertyOf(deburredLetters); + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + + /** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ + function hasUnicode(string) { + return reHasUnicode.test(string); + } + + /** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } + + /** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ + function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } + + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; + } + + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + + /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; + } + + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } + + /** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ + function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); + } + + /** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); + } + + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ + function trimmedEndIndex(string) { + var index = string.length; + + while (index-- && reWhitespace.test(string.charAt(index))) {} + return index; + } + + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + + /** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; + } + + /** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new pristine `lodash` function using the `context` object. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Util + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // Create a suped-up `defer` in Node.js. + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + var runInContext = (function runInContext(context) { + context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); + + /** Built-in constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** Built-in value references. */ + var Buffer = moduleExports ? context.Buffer : undefined, + Symbol = context.Symbol, + Uint8Array = context.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, + symIterator = Symbol ? Symbol.iterator : undefined, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); + + /** Mocked built-ins. */ + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, + ctxNow = Date && Date.now !== root.Date.now && Date.now, + ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeIsFinite = context.isFinite, + nativeJoin = arrayProto.join, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = Date.now, + nativeParseInt = context.parseInt, + nativeRandom = Math.random, + nativeReverse = arrayProto.reverse; + + /* Built-in method references that are verified to be native. */ + var DataView = getNative(context, 'DataView'), + Map = getNative(context, 'Map'), + Promise = getNative(context, 'Promise'), + Set = getNative(context, 'Set'), + WeakMap = getNative(context, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap; + + /** Used to lookup unminified function names. */ + var realNames = {}; + + /** Used to detect maps, sets, and weakmaps. */ + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + + /** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; + } + + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB) as well as ES2015 template strings. Change the + * following template settings to use alternative delimiters. + * + * @static + * @memberOf _ + * @type {Object} + */ + lodash.templateSettings = { + + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'escape': reEscape, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'evaluate': reEvaluate, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'interpolate': reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + 'variable': '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + 'imports': { + + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + '_': lodash + } + }; + + // Ensure wrappers are instances of `baseLodash`. + lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; + + LodashWrapper.prototype = baseCreate(baseLodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; + } + + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; + } + + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } + + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; + } + + // Ensure `LazyWrapper` is an instance of `baseLodash`. + LazyWrapper.prototype = baseCreate(baseLodash.prototype); + LazyWrapper.prototype.constructor = LazyWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); + } + + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; + } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; + } + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } + } + + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + function setCacheHas(value) { + return this.__data__.has(value); + } + + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new ListCache; + this.size = 0; + } + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; + } + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; + } + + /** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; + } + + /** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); + } + + /** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); + } + + /** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + /** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + + /** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } + } + + /** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ + function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; + } + + /** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ + function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; + } + + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; + } + + /** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ + function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; + } + + /** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseForRight = createBaseFor(true); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); + } + + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; + } + + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } + + /** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + + /** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ + function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); + } + + /** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ + function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? cacheHas(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? cacheHas(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ + function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; + } + + /** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + + /** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; + } + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + + /** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; + } + + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); + } + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + + /** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + stack || (stack = new Stack); + if (isObject(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); + } + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); + } + + /** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ + function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; + } + + /** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = arrayMap(iteratees, function(iteratee) { + if (isArray(iteratee)) { + return function(value) { + return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity]; + } + + var index = -1; + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); + } + + /** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ + function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; + } + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } + + /** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ + function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; + } + + /** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; + } + + /** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ + function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); + } + + /** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ + function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; + } + + /** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ + function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ + function baseSample(collection) { + return arraySample(values(collection)); + } + + /** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } + + /** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } + + /** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; + }; + + /** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); + }; + + /** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); + } + + /** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndexBy(array, value, iteratee, retHighest) { + var low = 0, + high = array == null ? 0 : array.length; + if (high === 0) { + return 0; + } + + value = iteratee(value); + var valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + + /** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; + } + + /** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ + function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; + } + + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ + function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; + } + + /** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); + } + + /** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && + predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); + } + + /** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ + function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); + } + + /** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ + function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; + } + + /** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ + function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; + } + + /** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ + function castFunction(value) { + return typeof value == 'function' ? value : identity; + } + + /** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); + } + + /** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + var castRest = baseRest; + + /** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ + function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); + } + + /** + * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). + * + * @private + * @param {number|Object} id The timer id or timeout object of the timer to clear. + */ + var clearTimeout = ctxClearTimeout || function(id) { + return root.clearTimeout(id); + }; + + /** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; + } + + /** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; + } + + /** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + + /** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + + /** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + + /** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; + } + + /** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + /** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; + } + + /** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + + /** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + + /** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + + /** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, getIteratee(iteratee, 2), accumulator); + }; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; + } + + /** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ + function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; + } + + /** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, + args, holders, undefined, undefined, arity - length); + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) + ? wrapper[funcName]() + : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); + } + + /** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, + args, newHolders, argPos, ary, arity - length + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + + /** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ + function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; + } + + /** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ + function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; + } + + /** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ + function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); + } + + /** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ + function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); + } + + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ + function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; + } + + /** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ + function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; + } + + /** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, + newHoldersRight, argPos, ary, arity + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); + } + + /** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ + function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision && nativeIsFinite(number)) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; + } + + /** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ + var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); + }; + + /** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ + function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } + + /** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, + argPos, ary, arity + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined + ? (isBindKey ? 0 : func.length) + : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); + } + + /** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; + } + + /** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ + function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; + } + + /** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ + function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + + /** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + + /** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); + }; + + /** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ + function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; + } + + /** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; + } + + /** + * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, + * this function returns the custom method, otherwise it returns `baseIteratee`. + * If arguments are provided, the chosen function is invoked with them and + * its result is returned. + * + * @private + * @param {*} [value] The value to convert to an iteratee. + * @param {number} [arity] The arity of the created iteratee. + * @returns {Function} Returns the chosen function or its result. + */ + function getIteratee() { + var result = lodash.iteratee || iteratee; + result = result === iteratee ? baseIteratee : result; + return arguments.length ? result(arguments[0], arguments[1]) : result; + } + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } + + /** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + + /** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; + }; + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + var getTag = baseGetTag; + + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; + } + + /** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; + } + + /** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } + + /** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); + } + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; + } + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return cloneSymbol(object); + } + } + + /** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; + } + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); + } + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); + } + + /** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ + function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); + } + + /** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ + var isMaskable = coreJsData ? isFunction : stubFalse; + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + return value === value && !isObject(value); + } + + /** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; + } + + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; + } + + /** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } + + /** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ + function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); + } + + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; + } + + /** + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + + if (key == '__proto__') { + return; + } + + return object[key]; + } + + /** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var setData = shortOut(baseSetData); + + /** + * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @returns {number|Object} Returns the timer id or timeout object. + */ + var setTimeout = ctxSetTimeout || function(func, wait) { + return root.setTimeout(func, wait); + }; + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = shortOut(baseSetToString); + + /** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ + function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); + } + + /** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ + function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; + } + + /** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ + function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; + } + + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; + }); + + /** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; + } + + /** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + + /** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ + function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; + } + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ + var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var differenceBy = baseRest(function(array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ + var differenceWith = baseRest(function(array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) + : []; + }); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true, true) + : []; + } + + /** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true) + : []; + } + + /** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ + function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); + } + + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + + /** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ + function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); + } + + /** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ + function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return (array && array.length) ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); + } + + /** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ + function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; + } + + /** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ + var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ + var intersectionBy = baseRest(function(arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ + var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, undefined, comparator) + : []; + }); + + /** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ + function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); + } + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } + + /** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); + } + + /** + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. + * + * @static + * @memberOf _ + * @since 4.11.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=0] The index of the element to return. + * @returns {*} Returns the nth element of `array`. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * + * _.nth(array, 1); + * // => 'b' + * + * _.nth(array, -2); + * // => 'c'; + */ + function nth(array, n) { + return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; + } + + /** + * Removes all given values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` + * to remove elements from an array by predicate. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pull(array, 'a', 'c'); + * console.log(array); + * // => ['b', 'b'] + */ + var pull = baseRest(pullAll); + + /** + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pullAll(array, ['a', 'c']); + * console.log(array); + * // => ['b', 'b'] + */ + function pullAll(array, values) { + return (array && array.length && values && values.length) + ? basePullAll(array, values) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + function pullAllBy(array, values, iteratee) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, getIteratee(iteratee, 2)) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + */ + function pullAllWith(array, values, comparator) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, undefined, comparator) + : array; + } + + /** + * Removes elements from `array` corresponding to `indexes` and returns an + * array of removed elements. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); + * + * console.log(array); + * // => ['a', 'c'] + * + * console.log(pulled); + * // => ['b', 'd'] + */ + var pullAt = flatRest(function(array, indexes) { + var length = array == null ? 0 : array.length, + result = baseAt(array, indexes); + + basePullAt(array, arrayMap(indexes, function(index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending)); + + return result; + }); + + /** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is invoked + * with three arguments: (value, index, array). + * + * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` + * to pull elements from an array by value. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ + function remove(array, predicate) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; + } + + /** + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function reverse(array) { + return array == null ? array : nativeReverse.call(array); + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } + else { + start = start == null ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + } + return baseSlice(array, start, end); + } + + /** + * Uses a binary search to determine the lowest index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + */ + function sortedIndex(array, value) { + return baseSortedIndex(array, value); + } + + /** + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); + * // => 0 + */ + function sortedIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); + } + + /** + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 + */ + function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value); + if (index < length && eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 + */ + function sortedLastIndex(array, value) { + return baseSortedIndex(array, value, true); + } + + /** + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * + * // The `_.property` iteratee shorthand. + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); + * // => 1 + */ + function sortedLastIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); + } + + /** + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); + * // => 3 + */ + function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value, true) - 1; + if (eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] + */ + function sortedUniq(array) { + return (array && array.length) + ? baseSortedUniq(array) + : []; + } + + /** + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.3] + */ + function sortedUniqBy(array, iteratee) { + return (array && array.length) + ? baseSortedUniq(array, getIteratee(iteratee, 2)) + : []; + } + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.tail([1, 2, 3]); + * // => [2, 3] + */ + function tail(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; + } + + /** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ + function take(array, n, guard) { + if (!(array && array.length)) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ + function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.takeRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeRightWhile(users, ['active', false]); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.takeRightWhile(users, 'active'); + * // => [] + */ + function takeRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), false, true) + : []; + } + + /** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.takeWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matches` iteratee shorthand. + * _.takeWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeWhile(users, ['active', false]); + * // => objects for ['barney', 'fred'] + * + * // The `_.property` iteratee shorthand. + * _.takeWhile(users, 'active'); + * // => [] + */ + function takeWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3)) + : []; + } + + /** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ + var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); + + /** + * This method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + var unionBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var unionWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); + }); + + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ + function uniq(array) { + return (array && array.length) ? baseUniq(array) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniqBy(array, iteratee) { + return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + */ + function uniqWith(array, comparator) { + comparator = typeof comparator == 'function' ? comparator : undefined; + return (array && array.length) ? baseUniq(array, undefined, comparator) : []; + } + + /** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @since 1.2.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + * + * _.unzip(zipped); + * // => [['a', 'b'], [1, 2], [true, false]] + */ + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = arrayFilter(array, function(group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function(index) { + return arrayMap(array, baseProperty(index)); + }); + } + + /** + * This method is like `_.unzip` except that it accepts `iteratee` to specify + * how regrouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee=_.identity] The function to combine + * regrouped values. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ + function unzipWith(array, iteratee) { + if (!(array && array.length)) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + return arrayMap(result, function(group) { + return apply(iteratee, undefined, group); + }); + } + + /** + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.pull`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor + * @example + * + * _.without([2, 1, 2, 3], 1, 2); + * // => [3] + */ + var without = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, values) + : []; + }); + + /** + * Creates an array of unique values that is the + * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without + * @example + * + * _.xor([2, 1], [2, 3]); + * // => [1, 3] + */ + var xor = baseRest(function(arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); + }); + + /** + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] + * + * // The `_.property` iteratee shorthand. + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var xorBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var xorWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); + }); + + /** + * Creates an array of grouped elements, the first of which contains the + * first elements of the given arrays, the second of which contains the + * second elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ + var zip = baseRest(unzip); + + /** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ + function zipObject(props, values) { + return baseZipObject(props || [], values || [], assignValue); + } + + /** + * This method is like `_.zipObject` except that it supports property paths. + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); + * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } + */ + function zipObjectDeep(props, values) { + return baseZipObject(props || [], values || [], baseSet); + } + + /** + * This method is like `_.zip` except that it accepts `iteratee` to specify + * how grouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { + * return a + b + c; + * }); + * // => [111, 222] + */ + var zipWith = baseRest(function(arrays) { + var length = arrays.length, + iteratee = length > 1 ? arrays[length - 1] : undefined; + + iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; + return unzipWith(arrays, iteratee); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * This method is the wrapper version of `_.at`. + * + * @name at + * @memberOf _ + * @since 1.0.0 + * @category Seq + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _(object).at(['a[0].b.c', 'a[1]']).value(); + * // => [3, 4] + */ + var wrapperAt = flatRest(function(paths) { + var length = paths.length, + start = length ? paths[0] : 0, + value = this.__wrapped__, + interceptor = function(object) { return baseAt(object, paths); }; + + if (length > 1 || this.__actions__.length || + !(value instanceof LazyWrapper) || !isIndex(start)) { + return this.thru(interceptor); + } + value = value.slice(start, +start + (length ? 1 : 0)); + value.__actions__.push({ + 'func': thru, + 'args': [interceptor], + 'thisArg': undefined + }); + return new LodashWrapper(value, this.__chain__).thru(function(array) { + if (length && !array.length) { + array.push(undefined); + } + return array; + }); + }); + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + + /** + * Gets the next value on a wrapped object following the + * [iterator protocol](https://mdn.io/iteration_protocols#iterator). + * + * @name next + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the next iterator value. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped.next(); + * // => { 'done': false, 'value': 1 } + * + * wrapped.next(); + * // => { 'done': false, 'value': 2 } + * + * wrapped.next(); + * // => { 'done': true, 'value': undefined } + */ + function wrapperNext() { + if (this.__values__ === undefined) { + this.__values__ = toArray(this.value()); + } + var done = this.__index__ >= this.__values__.length, + value = done ? undefined : this.__values__[this.__index__++]; + + return { 'done': done, 'value': value }; + } + + /** + * Enables the wrapper to be iterable. + * + * @name Symbol.iterator + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the wrapper object. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped[Symbol.iterator]() === wrapped; + * // => true + * + * Array.from(wrapped); + * // => [1, 2] + */ + function wrapperToIterator() { + return this; + } + + /** + * Creates a clone of the chain sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @param {*} value The value to plant. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2]).map(square); + * var other = wrapped.plant([3, 4]); + * + * other.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ + function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + clone.__index__ = 0; + clone.__values__ = undefined; + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; + } + + /** + * This method is the wrapper version of `_.reverse`. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + 'func': thru, + 'args': [reverse], + 'thisArg': undefined + }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(reverse); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } + }); + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] + */ + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(findLastIndex); + + /** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ + function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); + } + + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ + function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } + }); + + /** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); + } + + /** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + var invokeMap = baseRest(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ + var keyBy = createAggregator(function(result, value, key) { + baseAssignValue(result, key, value); + }); + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] + * The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // Sort by `user` in ascending order and by `age` in descending order. + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + */ + function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); + } + + /** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, the second of which + * contains elements `predicate` returns falsey for. The predicate is + * invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * _.partition(users, function(o) { return o.active; }); + * // => objects for [['fred'], ['barney', 'pebbles']] + * + * // The `_.matches` iteratee shorthand. + * _.partition(users, { 'age': 1, 'active': false }); + * // => objects for [['pebbles'], ['barney', 'fred']] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.partition(users, ['active', false]); + * // => objects for [['barney', 'pebbles'], ['fred']] + * + * // The `_.property` iteratee shorthand. + * _.partition(users, 'active'); + * // => objects for [['fred'], ['barney', 'pebbles']] + */ + var partition = createAggregator(function(result, value, key) { + result[key ? 0 : 1].push(value); + }, function() { return [[], []]; }); + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); + } + + /** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduce + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduceRight : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); + } + + /** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.filter + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * _.reject(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.reject(users, { 'age': 40, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.reject(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.reject(users, 'active'); + * // => objects for ['barney'] + */ + function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(getIteratee(predicate, 3))); + } + + /** + * Gets a random element from `collection`. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + */ + function sample(collection) { + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); + } + + /** + * Gets `n` random elements at unique keys from `collection` up to the + * size of `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @param {number} [n=1] The number of elements to sample. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the random elements. + * @example + * + * _.sampleSize([1, 2, 3], 2); + * // => [3, 1] + * + * _.sampleSize([1, 2, 3], 4); + * // => [2, 3, 1] + */ + function sampleSize(collection, n, guard) { + if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); + } + + /** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ + function shuffle(collection) { + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 30 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] + */ + var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ + var now = ctxNow || function() { + return root.Date.now(); + }; + + /*------------------------------------------------------------------------*/ + + /** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ + function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ + function ary(func, n, guard) { + n = guard ? undefined : n; + n = (func && n == null) ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); + } + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); + }); + + /** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ + var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); + }); + + /** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ + function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curry.placeholder; + return result; + } + + /** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ + function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryRight.placeholder; + return result; + } + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ + function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); + } + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; + } + + // Expose `MapCache`. + memoize.Cache = MapCache; + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /** + * Creates a function that invokes `func` with its arguments transformed. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var func = _.overArgs(function(x, y) { + * return [x, y]; + * }, [square, doubled]); + * + * func(9, 3); + * // => [81, 6] + * + * func(10, 5); + * // => [100, 10] + */ + var overArgs = castRest(function(func, transforms) { + transforms = (transforms.length == 1 && isArray(transforms[0])) + ? arrayMap(transforms[0], baseUnary(getIteratee())) + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); + + var funcsLength = transforms.length; + return baseRest(function(args) { + var index = -1, + length = nativeMin(args.length, funcsLength); + + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return apply(func, this, args); + }); + }); + + /** + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 0.2.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // Partially applied with placeholders. + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ + var partial = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); + }); + + /** + * This method is like `_.partial` except that partially applied arguments + * are appended to the arguments it receives. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // Partially applied with placeholders. + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ + var partialRight = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); + }); + + /** + * Creates a function that invokes `func` with arguments arranged according + * to the specified `indexes` where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, [2, 0, 1]); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + */ + var rearg = flatRest(function(func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); + }); + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as + * an array. + * + * **Note:** This method is based on the + * [rest parameter](https://mdn.io/rest_parameters). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); + } + + /** + * Creates a function that invokes `func` with the `this` binding of the + * create function and an array of arguments much like + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). + * + * **Note:** This method is based on the + * [spread operator](https://mdn.io/spread_operator). + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Function + * @param {Function} func The function to spread arguments over. + * @param {number} [start=0] The start position of the spread. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ + function spread(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start == null ? 0 : nativeMax(toInteger(start), 0); + return baseRest(function(args) { + var array = args[start], + otherArgs = castSlice(args, 0, start); + + if (array) { + arrayPush(otherArgs, array); + } + return apply(func, this, otherArgs); + }); + } + + /** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing + }); + } + + /** + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] + */ + function unary(func) { + return ary(func, 1); + } + + /** + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {*} value The value to wrap. + * @param {Function} [wrapper=identity] The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

' + func(text) + '

'; + * }); + * + * p('fred, barney, & pebbles'); + * // => '

fred, barney, & pebbles

' + */ + function wrap(value, wrapper) { + return partial(castFunction(wrapper), value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ + function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; + } + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ + function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ + function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ + var gt = createRelationalOperation(baseGt); + + /** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ + var gte = createRelationalOperation(function(value, other) { + return value >= other; + }); + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); + } + + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + var isBuffer = nativeIsBuffer || stubFalse; + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + + /** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement(''); + * // => false + */ + function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); + } + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } + + /** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ + function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; + } + + /** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ + function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + /** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ + function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + + /** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ + function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); + } + + /** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ + function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ + function isNil(value) { + return value == null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); + } + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + + /** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ + function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); + } + + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); + } + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + + /** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ + function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; + } + + /** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ + function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; + } + + /** + * Checks if `value` is less than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + * @see _.gt + * @example + * + * _.lt(1, 3); + * // => true + * + * _.lt(3, 3); + * // => false + * + * _.lt(3, 1); + * // => false + */ + var lt = createRelationalOperation(baseLt); + + /** + * Checks if `value` is less than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to + * `other`, else `false`. + * @see _.gte + * @example + * + * _.lte(1, 3); + * // => true + * + * _.lte(3, 3); + * // => true + * + * _.lte(3, 1); + * // => false + */ + var lte = createRelationalOperation(function(value, other) { + return value <= other; + }); + + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!value) { + return []; + } + if (isArrayLike(value)) { + return isString(value) ? stringToArray(value) : copyArray(value); + } + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); + } + var tag = getTag(value), + func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); + + return func(value); + } + + /** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; + } + + /** + * Converts `value` to an integer suitable for use as the length of an + * array-like object. + * + * **Note:** This method is based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toLength(3.2); + * // => 3 + * + * _.toLength(Number.MIN_VALUE); + * // => 0 + * + * _.toLength(Infinity); + * // => 4294967295 + * + * _.toLength('3.2'); + * // => 3 + */ + function toLength(value) { + return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; + } + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = baseTrim(value); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); + } + + /** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ + function toPlainObject(value) { + return copyObject(value, keysIn(value)); + } + + /** + * Converts `value` to a safe integer. A safe integer can be compared and + * represented correctly. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toSafeInteger(3.2); + * // => 3 + * + * _.toSafeInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toSafeInteger(Infinity); + * // => 9007199254740991 + * + * _.toSafeInteger('3.2'); + * // => 3 + */ + function toSafeInteger(value) { + return value + ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) + : (value === 0 ? value : 0); + } + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + return value == null ? '' : baseToString(value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } + }); + + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function(object, source) { + copyObject(source, keysIn(source), object); + }); + + /** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + + /** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); + }); + + /** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ + var at = flatRest(baseAt); + + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); + } + + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; + }); + + /** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ + var defaultsDeep = baseRest(function(args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); + }); + + /** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ + function findKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); + } + + /** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ + function findLastKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); + } + + /** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ + function forIn(object, iteratee) { + return object == null + ? object + : baseFor(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ + function forInRight(object, iteratee) { + return object == null + ? object + : baseForRight(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forOwn(object, iteratee) { + return object && baseForOwn(object, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ + function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, getIteratee(iteratee, 3)); + } + + /** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ + function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); + } + + /** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ + function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); + } + + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; + } + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasPath(object, path, baseHas); + } + + /** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + + /** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ + var invert = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + result[value] = key; + }, constant(identity)); + + /** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ + var invertBy = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + }, getIteratee); + + /** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ + var invoke = baseRest(baseInvoke); + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + + /** + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * string keyed property of `object` thru `iteratee`. The iteratee is invoked + * with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapValues + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ + function mapKeys(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, iteratee(value, key, object), value); + }); + return result; + } + + /** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ + function mapValues(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, key, iteratee(value, key, object)); + }); + return result; + } + + /** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ + var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); + }); + + /** + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined`, merging is handled by the + * method instead. The `customizer` is invoked with six arguments: + * (objValue, srcValue, key, object, source, stack). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } + * + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; + * + * _.mergeWith(object, other, customizer); + * // => { 'a': [1, 3], 'b': [2, 4] } + */ + var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { + baseMerge(object, source, srcIndex, customizer); + }); + + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable property paths of `object` that are not omitted. + * + * **Note:** This method is considerably slower than `_.pick`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to omit. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } + */ + var omit = flatRest(function(object, paths) { + var result = {}; + if (object == null) { + return result; + } + var isDeep = false; + paths = arrayMap(paths, function(path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result); + if (isDeep) { + result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); + } + var length = paths.length; + while (length--) { + baseUnset(result, paths[length]); + } + return result; + }); + + /** + * The opposite of `_.pickBy`; this method creates an object composed of + * the own and inherited enumerable string keyed properties of `object` that + * `predicate` doesn't return truthy for. The predicate is invoked with two + * arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } + */ + function omitBy(object, predicate) { + return pickBy(object, negate(getIteratee(predicate))); + } + + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); + }); + + /** + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with two arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } + */ + function pickBy(object, predicate) { + if (object == null) { + return {}; + } + var props = arrayMap(getAllKeysIn(object), function(prop) { + return [prop]; + }); + predicate = getIteratee(predicate); + return basePickBy(object, props, function(value, path) { + return predicate(value, path[0]); + }); + } + + /** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + path = castPath(path, object); + + var index = -1, + length = path.length; + + // Ensure the loop is entered when path is empty. + if (!length) { + length = 1; + object = undefined; + } + while (++index < length) { + var value = object == null ? undefined : object[toKey(path[index])]; + if (value === undefined) { + index = length; + value = defaultValue; + } + object = isFunction(value) ? value.call(object) : value; + } + return object; + } + + /** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); + } + + /** + * This method is like `_.set` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.setWith(object, '[0][1]', 'a', Object); + * // => { '0': { '1': 'a' } } + */ + function setWith(object, path, value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseSet(object, path, value, customizer); + } + + /** + * Creates an array of own enumerable string keyed-value pairs for `object` + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entries + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairs(new Foo); + * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) + */ + var toPairs = createToPairs(keys); + + /** + * Creates an array of own and inherited enumerable string keyed-value pairs + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entriesIn + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairsIn(new Foo); + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) + */ + var toPairsIn = createToPairs(keysIn); + + /** + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable string keyed properties thru `iteratee`, with each invocation + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @returns {*} Returns the accumulated value. + * @example + * + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }, []); + * // => [4, 9] + * + * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ + function transform(object, iteratee, accumulator) { + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); + + iteratee = getIteratee(iteratee, 4); + if (accumulator == null) { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor : []; + } + else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } + else { + accumulator = {}; + } + } + (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; + } + + /** + * Removes the property at `path` of `object`. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 7 } }] }; + * _.unset(object, 'a[0].b.c'); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + * + * _.unset(object, ['a', '0', 'b', 'c']); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + */ + function unset(object, path) { + return object == null ? true : baseUnset(object, path); + } + + /** + * This method is like `_.set` except that accepts `updater` to produce the + * value to set. Use `_.updateWith` to customize `path` creation. The `updater` + * is invoked with one argument: (value). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.update(object, 'a[0].b.c', function(n) { return n * n; }); + * console.log(object.a[0].b.c); + * // => 9 + * + * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); + * console.log(object.x[0].y.z); + * // => 0 + */ + function update(object, path, updater) { + return object == null ? object : baseUpdate(object, path, castFunction(updater)); + } + + /** + * This method is like `_.update` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.updateWith(object, '[0][1]', _.constant('a'), Object); + * // => { '0': { '1': 'a' } } + */ + function updateWith(object, path, updater, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); + } + + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + + /** + * Creates an array of the own and inherited enumerable string keyed property + * values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) + */ + function valuesIn(object) { + return object == null ? [] : baseValues(object, keysIn(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ + function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); + } + + /** + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ + function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); + } + + /** + * Produces a random number between the inclusive `lower` and `upper` bounds. + * If only one argument is provided a number between `0` and the given number + * is returned. If `floating` is `true`, or either `lower` or `upper` are + * floats, a floating-point number is returned instead of an integer. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Number + * @param {number} [lower=0] The lower bound. + * @param {number} [upper=1] The upper bound. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(lower, upper, floating) { + if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { + upper = floating = undefined; + } + if (floating === undefined) { + if (typeof upper == 'boolean') { + floating = upper; + upper = undefined; + } + else if (typeof lower == 'boolean') { + floating = lower; + lower = undefined; + } + } + if (lower === undefined && upper === undefined) { + lower = 0; + upper = 1; + } + else { + lower = toFinite(lower); + if (upper === undefined) { + upper = lower; + lower = 0; + } else { + upper = toFinite(upper); + } + } + if (lower > upper) { + var temp = lower; + lower = upper; + upper = temp; + } + if (floating || lower % 1 || upper % 1) { + var rand = nativeRandom(); + return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); + } + return baseRandom(lower, upper); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ + var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); + }); + + /** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ + function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); + } + + /** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ + function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); + } + + /** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ + function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined + ? length + : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; + } + + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ + function escapeRegExp(string) { + string = toString(string); + return (string && reHasRegExpChar.test(string)) + ? string.replace(reRegExpChar, '\\$&') + : string; + } + + /** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ + var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); + }); + + /** + * Converts `string`, as space separated words, to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.lowerCase('--Foo-Bar--'); + * // => 'foo bar' + * + * _.lowerCase('fooBar'); + * // => 'foo bar' + * + * _.lowerCase('__FOO_BAR__'); + * // => 'foo bar' + */ + var lowerCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + word.toLowerCase(); + }); + + /** + * Converts the first character of `string` to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.lowerFirst('Fred'); + * // => 'fred' + * + * _.lowerFirst('FRED'); + * // => 'fRED' + */ + var lowerFirst = createCaseFirst('toLowerCase'); + + /** + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ + function pad(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + if (!length || strLength >= length) { + return string; + } + var mid = (length - strLength) / 2; + return ( + createPadding(nativeFloor(mid), chars) + + string + + createPadding(nativeCeil(mid), chars) + ); + } + + /** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padEnd('abc', 6); + * // => 'abc ' + * + * _.padEnd('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padEnd('abc', 3); + * // => 'abc' + */ + function padEnd(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (string + createPadding(length - strLength, chars)) + : string; + } + + /** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padStart('abc', 6); + * // => ' abc' + * + * _.padStart('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padStart('abc', 3); + * // => 'abc' + */ + function padStart(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (createPadding(length - strLength, chars) + string) + : string; + } + + /** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a + * hexadecimal, in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the + * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category String + * @param {string} string The string to convert. + * @param {number} [radix=10] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ + function parseInt(string, radix, guard) { + if (guard || radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); + } + + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=1] The number of times to repeat the string. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n, guard) { + if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString(string), n); + } + + /** + * Replaces matches for `pattern` in `string` with `replacement`. + * + * **Note:** This method is based on + * [`String#replace`](https://mdn.io/String/replace). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to modify. + * @param {RegExp|string} pattern The pattern to replace. + * @param {Function|string} replacement The match replacement. + * @returns {string} Returns the modified string. + * @example + * + * _.replace('Hi Fred', 'Fred', 'Barney'); + * // => 'Hi Barney' + */ + function replace() { + var args = arguments, + string = toString(args[0]); + + return args.length < 3 ? string : string.replace(args[1], args[2]); + } + + /** + * Converts `string` to + * [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--FOO-BAR--'); + * // => 'foo_bar' + */ + var snakeCase = createCompounder(function(result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); + }); + + /** + * Splits `string` by `separator`. + * + * **Note:** This method is based on + * [`String#split`](https://mdn.io/String/split). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to split. + * @param {RegExp|string} separator The separator pattern to split by. + * @param {number} [limit] The length to truncate results to. + * @returns {Array} Returns the string segments. + * @example + * + * _.split('a-b-c', '-', 2); + * // => ['a', 'b'] + */ + function split(string, separator, limit) { + if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { + separator = limit = undefined; + } + limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; + if (!limit) { + return []; + } + string = toString(string); + if (string && ( + typeof separator == 'string' || + (separator != null && !isRegExp(separator)) + )) { + separator = baseToString(separator); + if (!separator && hasUnicode(string)) { + return castSlice(stringToArray(string), 0, limit); + } + } + return string.split(separator, limit); + } + + /** + * Converts `string` to + * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @since 3.1.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar--'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__FOO_BAR__'); + * // => 'FOO BAR' + */ + var startCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + upperFirst(word); + }); + + /** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, + * else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ + function startsWith(string, target, position) { + string = toString(string); + position = position == null + ? 0 + : baseClamp(toInteger(position), 0, string.length); + + target = baseToString(target); + return string.slice(position, position + target.length) == target; + } + + /** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is given, it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options={}] The options object. + * @param {RegExp} [options.escape=_.templateSettings.escape] + * The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] + * The "evaluate" delimiter. + * @param {Object} [options.imports=_.templateSettings.imports] + * An object to import into the template as free variables. + * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] + * The "interpolate" delimiter. + * @param {string} [options.sourceURL='lodash.templateSources[n]'] + * The sourceURL of the compiled template. + * @param {string} [options.variable='obj'] + * The data object variable name. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the compiled template function. + * @example + * + * // Use the "interpolate" delimiter to create a compiled template. + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // Use the HTML "escape" delimiter to escape data property values. + * var compiled = _.template('<%- value %>'); + * compiled({ 'value': '