├── .gitignore
├── LICENSE
├── README.md
└── package
├── portal
├── .babelrc
├── LICENSE
├── README.md
├── package-lock.json
├── package.json
├── public
│ ├── index.html
│ ├── project1
│ │ ├── assets
│ │ │ └── a.text
│ │ └── js
│ │ │ ├── main.js
│ │ │ └── main.js.LICENSE.txt
│ └── project2
│ │ ├── main.js
│ │ ├── main.js.LICENSE.txt
│ │ └── main.js.map
├── single-spa-config
│ ├── build-single-spa.config.js
│ ├── dev-single-spa.config.js
│ └── index.js
├── src
│ ├── Layout
│ │ ├── index.js
│ │ └── index.less
│ ├── index.css
│ └── index.js
└── webpack.config.js
├── project1
├── .babelrc
├── README.md
├── entry.js
├── package-lock.json
├── package.json
├── public
│ └── index.html
├── src
│ ├── app.js
│ ├── assets
│ │ └── a.text
│ ├── models
│ │ ├── global
│ │ │ └── index.js
│ │ └── store.js
│ ├── pages
│ │ └── home.js
│ └── routes.js
└── webpack
│ ├── webpack.config.base.js
│ ├── webpack.config.dev.js
│ └── webpack.config.pro.js
└── project2
├── README.md
├── entry.js
├── package-lock.json
├── package.json
├── public
└── index.html
├── src
├── app.js
├── models
│ ├── global
│ │ └── index.js
│ └── store.js
├── pages
│ └── home.js
└── routes.js
└── webpack.config.js
/.gitignore:
--------------------------------------------------------------------------------
1 | # Build and Release Folders
2 | bin-debug/
3 | bin-release/
4 | [Oo]bj/
5 | [Bb]in/
6 |
7 | node_modules
8 | dist
9 |
10 | # Other files and folders
11 | .settings/
12 |
13 | # Executables
14 | *.swf
15 | *.air
16 | *.ipa
17 | *.apk
18 |
19 | # Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties`
20 | # should NOT be excluded as they contain compiler settings and other important
21 | # information for Eclipse / Flash Builder.
22 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 微前端研究院
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
single-spa-react-redux-toolkit
2 |
3 |
4 |
5 | single-spa-react-redux-toolkit:
6 | react+single-spa-react+@reduxjs/toolkit 🚀🚀🚀, single-spa-react微前端结合状态管理库reduxjs/toolkit!并且增加了基座,每个应用都将变成一个单独子应用并单独开发。
7 |
8 | [](https://github.com/single-spa-react/single-spa-react-redux-toolkit#readme) [](https://github.com/single-spa-react/single-spa-react-redux-toolkit/graphs/commit-activity) [](https://github.com/single-spa-react/single-spa-react-redux-toolkit/blob/master/LICENSE)
9 |
10 |
11 |
12 | ## ⌨️ 本地开发
13 |
14 | ```bash
15 | $ git clone git@github.com:single-spa-react/single-spa-react-redux-toolkit.git
16 | $ cd single-spa-react-redux-toolkit
17 | $ npm install
18 | $ npm start
19 | ```
20 |
21 | 打开浏览器访问 http://127.0.0.1:8080/project1/。
22 |
23 | ## 相关资料:
24 | 1,项目依赖包梳理:https://segmentfault.com/a/1190000019006667
25 |
26 | ## 相关推广
27 |
28 | 1. https://github.com/xlei1123/daymanage
29 | > 这是一个使用 umi 开发的项目,想学习 umi 的新手可以学习一下
30 | 2. https://github.com/xlei1123/dtext
31 | > 前端文案默认值处理利器,统一定制修改,同时支持使用时特殊指定
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/package/portal/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["@babel/preset-env", {
4 | "targets": {
5 | "browsers": ["last 2 versions"]
6 | }
7 | }],
8 | ["@babel/preset-react"]
9 | ],
10 | "plugins": [
11 | "@babel/plugin-syntax-dynamic-import",
12 | "@babel/plugin-proposal-object-rest-spread",
13 | "@babel/plugin-syntax-jsx"
14 | ]
15 | }
--------------------------------------------------------------------------------
/package/portal/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 微前端研究院
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/package/portal/README.md:
--------------------------------------------------------------------------------
1 | single-spa-react-redux-toolkit
2 |
3 |
4 |
5 | single-spa-react-redux-toolkit:
6 | react+single-spa-react+@reduxjs/toolkit 🚀🚀🚀, 这是基座项目,此处决定拉取对应的子应用
7 |
8 | [](https://github.com/single-spa-react/single-spa-react-redux-toolkit#readme) [](https://github.com/single-spa-react/single-spa-react-redux-toolkit/graphs/commit-activity) [](https://github.com/single-spa-react/single-spa-react-redux-toolkit/blob/master/LICENSE)
9 |
10 |
11 |
12 | ## ⌨️ 基座本地开发
13 |
14 | ```bash
15 | $ git clone git@github.com:single-spa-react/single-spa-react-redux-toolkit.git
16 | $ cd single-spa-react-redux-toolkit
17 | $ cd portal
18 | $ npm install
19 | $ npm start
20 | ```
21 |
22 | **建议:**
23 | ```js
24 | ```single-spa-config/index.js```
25 |
26 | if(process.env.NODE_ENV === 'dev') {
27 | import('./dev-single-spa.config')
28 | } else {
29 | import('./build-single-spa.config')
30 | }
31 |
32 | ```
33 | 修改为直接导出```import('./build-single-spa.config')``` 无需再单独编译子应用
34 |
35 |
36 |
37 | 打开浏览器访问 http://127.0.0.1:8080/project1/。
38 |
39 | ## 相关资料:
40 | 1,项目依赖包梳理:https://segmentfault.com/a/1190000019006667
41 |
42 | ## 相关推广
43 |
44 | 1. https://github.com/xlei1123/daymanage
45 | > 这是一个使用 umi 开发的项目,想学习 umi 的新手可以学习一下
46 | 2. https://github.com/xlei1123/dtext
47 | > 前端文案默认值处理利器,统一定制修改,同时支持使用时特殊指定
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/package/portal/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "single-spa-app",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "cross-env NODE_ENV=dev webpack-dev-server --open",
8 | "build": "cross-env NODE_ENV=production webpack --config webpack.config.js"
9 | },
10 | "keywords": [],
11 | "author": "",
12 | "license": "ISC",
13 | "dependencies": {
14 | "@babel/runtime": "^7.16.7",
15 | "@reduxjs/toolkit": "^1.7.1",
16 | "antd": "^4.18.2",
17 | "clean-webpack-plugin": "^4.0.0",
18 | "css-loader": "^6.5.1",
19 | "dva": "^2.6.0-beta.20",
20 | "html-webpack-plugin": "^5.5.0",
21 | "less": "^4.1.2",
22 | "less-loader": "^10.2.0",
23 | "react": "^17.0.2",
24 | "react-dom": "^17.0.2",
25 | "react-redux": "^7.2.6",
26 | "react-router-dom": "^6.2.1",
27 | "single-spa": "^5.9.3",
28 | "single-spa-react": "^4.6.0",
29 | "style-loader": "^3.3.1",
30 | "webpack": "^5.65.0",
31 | "webpack-cli": "^4.9.1",
32 | "webpack-dev-server": "^4.7.2"
33 | },
34 | "devDependencies": {
35 | "@babel/core": "^7.16.7",
36 | "@babel/plugin-proposal-object-rest-spread": "^7.16.7",
37 | "@babel/plugin-syntax-dynamic-import": "^7.8.3",
38 | "@babel/preset-env": "^7.16.7",
39 | "@babel/preset-react": "^7.16.7",
40 | "babel-loader": "^8.2.3"
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/package/portal/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
14 |
15 |
16 |
21 |
22 |
--------------------------------------------------------------------------------
/package/portal/public/project1/assets/a.text:
--------------------------------------------------------------------------------
1 | 111
--------------------------------------------------------------------------------
/package/portal/public/project1/js/main.js.LICENSE.txt:
--------------------------------------------------------------------------------
1 | /*!
2 | Copyright (c) 2018 Jed Watson.
3 | Licensed under the MIT License (MIT), see
4 | http://jedwatson.github.io/classnames
5 | */
6 |
7 | /**
8 | * React Router v6.2.1
9 | *
10 | * Copyright (c) Remix Software Inc.
11 | *
12 | * This source code is licensed under the MIT license found in the
13 | * LICENSE.md file in the root directory of this source tree.
14 | *
15 | * @license MIT
16 | */
17 |
18 | /** @license React v16.13.1
19 | * react-is.production.min.js
20 | *
21 | * Copyright (c) Facebook, Inc. and its affiliates.
22 | *
23 | * This source code is licensed under the MIT license found in the
24 | * LICENSE file in the root directory of this source tree.
25 | */
26 |
27 | /** @license React v17.0.2
28 | * react-is.production.min.js
29 | *
30 | * Copyright (c) Facebook, Inc. and its affiliates.
31 | *
32 | * This source code is licensed under the MIT license found in the
33 | * LICENSE file in the root directory of this source tree.
34 | */
35 |
--------------------------------------------------------------------------------
/package/portal/public/project2/main.js:
--------------------------------------------------------------------------------
1 | /*! For license information please see main.js.LICENSE.txt */
2 | System.register(["react","react-dom"],(function(e,t){var n={},r={};return{setters:[function(e){n.Children=e.Children,n.Component=e.Component,n.Fragment=e.Fragment,n.cloneElement=e.cloneElement,n.createContext=e.createContext,n.createElement=e.createElement,n.default=e.default,n.forwardRef=e.forwardRef,n.isValidElement=e.isValidElement,n.useCallback=e.useCallback,n.useContext=e.useContext,n.useDebugValue=e.useDebugValue,n.useEffect=e.useEffect,n.useImperativeHandle=e.useImperativeHandle,n.useLayoutEffect=e.useLayoutEffect,n.useMemo=e.useMemo,n.useReducer=e.useReducer,n.useRef=e.useRef,n.useState=e.useState},function(e){r.default=e.default,r.unstable_batchedUpdates=e.unstable_batchedUpdates}],execute:function(){e((()=>{var e,t,o={154:e=>{function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},757:(e,t,n)=>{e.exports=n(666)},37:(e,t,n)=>{"use strict";var r=n(318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(584)).default;t.default=o},584:(e,t,n)=>{"use strict";var r=n(318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(154)),a=r(n(369)),i=r(n(704)),c={lang:(0,o.default)({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeWeekPlaceholder:["开始周","结束周"]},a.default),timePickerLocale:(0,o.default)({},i.default)};c.lang.ok="确定";var u=c;t.default=u},754:(e,t,n)=>{"use strict";var r=n(318);t.Z=void 0;var o=r(n(925)).default;t.Z=o},925:(e,t,n)=>{"use strict";var r=n(318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(219)),a=r(n(584)),i=r(n(704)),c=r(n(37)),u="${label}不是一个有效的${type}",l={locale:"zh-cn",Pagination:o.default,DatePicker:a.default,TimePicker:i.default,Calendar:c.default,global:{placeholder:"请选择"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",filterEmptyText:"无筛选项",filterCheckall:"全选",filterSearchPlaceholder:"在筛选项中搜索",selectAll:"全选当页",selectInvert:"反选当页",selectNone:"清空所有",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:u,method:u,array:u,object:u,number:u,date:u,boolean:u,integer:u,float:u,regexp:u,email:u,url:u,hex:u},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}"}}},Image:{preview:"预览"}};t.default=l},704:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]}},210:(e,t,n)=>{"use strict";n.r(t),n.d(t,{bootstrap:()=>Vc,mount:()=>Dc,unmount:()=>Lc});var r=n(954),o=n(493);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=g(e,t,(function(){n(this)})),a=s(e,t)(),i=function(e){var t=e.opts,n=e.elementToRender,r=e.domElement,o="function"==typeof t.renderType?t.renderType():t.renderType;if(["createRoot","unstable_createRoot","createBlockingRoot","unstable_createBlockingRoot"].indexOf(o)>=0){var a=t.ReactDOM[o](r);return a.render(n),a}return"hydrate"===o?t.ReactDOM.hydrate(n,r):t.ReactDOM.render(n,r),null}({elementToRender:o,domElement:a,opts:e});e.domElements[t.name]=a,e.renderResults[t.name]=i}))}function v(e,t){return new Promise((function(n){e.unmountFinished=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():e.ReactDOM.unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]}))}function m(e,t){return new Promise((function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=g(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var a=s(e,t)();e.ReactDOM.render(r,a)}}))}function g(e,t,n){var r=e.React.createElement(e.rootComponent,t),o=f?e.React.createElement(f.Provider,{value:t},r):r;function a(e){a.displayName="SingleSpaRoot(".concat(e.name,")")}return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),o=e.React.createElement(a,i(i({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach((function(e){return e()})),delete e.updateResolves[t.name])},unmountFinished:function(){setTimeout(e.unmountFinished)}}),o),a.prototype=Object.create(e.React.Component.prototype),a.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},a.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},a.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},o}function y(){return y=Object.assign||function(e){for(var t=1;t({basename:u,navigator:i,static:c})),[u,i,c]);"string"==typeof o&&(o=C(o));let{pathname:s="/",search:f="",hash:d="",state:p=null,key:h="default"}=o,v=(0,r.useMemo)((()=>{let e=q(s,u);return null==e?null:{pathname:e,search:f,hash:d,state:p,key:h}}),[u,s,f,d,p,h]);return null==v?null:(0,r.createElement)(k.Provider,{value:l},(0,r.createElement)(O.Provider,{children:n,value:{location:v,navigationType:a}}))}function A(e){let{children:t,location:n}=e;return function(e,t){N()||P(!1);let{matches:n}=(0,r.useContext)(F),o=n[n.length-1],a=o?o.params:{},i=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let c,u=(N()||P(!1),(0,r.useContext)(O).location);if(t){var l;let e="string"==typeof t?C(t):t;"/"===i||(null==(l=e.pathname)?void 0:l.startsWith(i))||P(!1),c=e}else c=u;let s=c.pathname||"/",f=function(e,t,n){void 0===n&&(n="/");let r=q(("string"==typeof t?C(t):t).pathname||"/",n);if(null==r)return null;let o=T(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let a=null;for(let e=0;null==a&&e(0,r.createElement)(F.Provider,{children:void 0!==o.route.element?o.route.element:(0,r.createElement)(S,null),value:{outlet:n,matches:t.concat(e.slice(0,a+1))}})),null)}(f&&f.map((e=>Object.assign({},e,{params:Object.assign({},a,e.params),pathname:H([i,e.pathname]),pathnameBase:"/"===e.pathnameBase?i:H([i,e.pathnameBase])}))),n)}(_(t),n)}function N(){return null!=(0,r.useContext)(O)}const R=(0,r.createContext)(null);function _(e){let t=[];return r.Children.forEach(e,(e=>{if(!(0,r.isValidElement)(e))return;if(e.type===r.Fragment)return void t.push.apply(t,_(e.props.children));e.type!==j&&P(!1);let n={caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path};e.props.children&&(n.children=_(e.props.children)),t.push(n)})),t}function T(e,t,n,r){return void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r=""),e.forEach(((e,o)=>{let a={relativePath:e.path||"",caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};a.relativePath.startsWith("/")&&(a.relativePath.startsWith(r)||P(!1),a.relativePath=a.relativePath.slice(r.length));let i=H([r,a.relativePath]),c=n.concat(a);e.children&&e.children.length>0&&(!0===e.index&&P(!1),T(e.children,t,c,i)),(null!=e.path||e.index)&&t.push({path:i,score:V(i,e.index),routesMeta:c})})),t}const I=/^:\w+$/,$=e=>"*"===e;function V(e,t){let n=e.split("/"),r=n.length;return n.some($)&&(r+=-2),t&&(r+=2),n.filter((e=>!$(e))).reduce(((e,t)=>e+(I.test(t)?3:""===t?1:10)),r)}function D(e,t){let{routesMeta:n}=e,r={},o="/",a=[];for(let e=0;e(r.push(t),"([^\\/]+)")));return e.endsWith("*")?(r.push("*"),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):o+=n?"\\/*$":"(?:\\b|\\/|$)",[new RegExp(o,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),c=o.slice(1);return{params:r.reduce(((e,t,n)=>{if("*"===t){let e=c[n]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(t){return e}}(c[n]||""),e}),{}),pathname:a,pathnameBase:i,pattern:e}}function q(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=e.charAt(t.length);return n&&"/"!==n?null:e.slice(t.length)||"/"}const H=e=>e.join("/").replace(/\/\/+/g,"/"),U=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function z(e){let{basename:t,children:n,window:o}=e,a=(0,r.useRef)();null==a.current&&(a.current=function(e){function t(){var e=i.location,t=c.state||{};return[t.idx,{pathname:e.pathname,search:e.search,hash:e.hash,state:t.usr||null,key:t.key||"default"}]}function n(e){return"string"==typeof e?e:function(e){var t=e.pathname;t=void 0===t?"/":t;var n=e.search;return n=void 0===n?"":n,e=void 0===(e=e.hash)?"":e,n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),e&&"#"!==e&&(t+="#"===e.charAt(0)?e:"#"+e),t}(e)}function r(e,t){return void 0===t&&(t=null),y({pathname:f.pathname,hash:"",search:""},"string"==typeof e?C(e):e,{state:t,key:Math.random().toString(36).substr(2,8)})}function o(e){l=e,e=t(),s=e[0],f=e[1],d.call({action:l,location:f})}function a(e){c.go(e)}void 0===e&&(e={});var i=void 0===(e=e.window)?document.defaultView:e,c=i.history,u=null;i.addEventListener("popstate",(function(){if(u)p.call(u),u=null;else{var e=b.Pop,n=t(),r=n[0];if(n=n[1],p.length){if(null!=r){var i=s-r;i&&(u={action:e,location:n,retry:function(){a(-1*i)}},a(i))}}else o(e)}}));var l=b.Pop,s=(e=t())[0],f=e[1],d=x(),p=x();return null==s&&(s=0,c.replaceState(y({},c.state,{idx:s}),"")),{get action(){return l},get location(){return f},createHref:n,push:function e(t,a){var u=b.Push,l=r(t,a);if(!p.length||(p.call({action:u,location:l,retry:function(){e(t,a)}}),0)){var f=[{usr:l.state,key:l.key,idx:s+1},n(l)];l=f[0],f=f[1];try{c.pushState(l,"",f)}catch(e){i.location.assign(f)}o(u)}},replace:function e(t,a){var i=b.Replace,u=r(t,a);p.length&&(p.call({action:i,location:u,retry:function(){e(t,a)}}),1)||(u=[{usr:u.state,key:u.key,idx:s},n(u)],c.replaceState(u[0],"",u[1]),o(i))},go:a,back:function(){a(-1)},forward:function(){a(1)},listen:function(e){return d.push(e)},block:function(e){var t=p.push(e);return 1===p.length&&i.addEventListener("beforeunload",E),function(){t(),p.length||i.removeEventListener("beforeunload",E)}}}}({window:o}));let i=a.current,[c,u]=(0,r.useState)({action:i.action,location:i.location});return(0,r.useLayoutEffect)((()=>i.listen(u)),[i]),(0,r.createElement)(M,{basename:t,children:n,location:c.location,navigationType:c.action,navigator:i})}var B=r.default.createContext(null),W=function(e){e()},Y=function(){return W},K={notify:function(){},get:function(){return[]}};function G(e,t){var n,r=K;function o(){i.onStateChange&&i.onStateChange()}function a(){n||(n=t?t.addNestedSub(o):e.subscribe(o),r=function(){var e=Y(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,o=n={callback:e,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){r&&null!==t&&(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())}var i={addNestedSub:function(e){return a(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:o,isSubscribed:function(){return Boolean(n)},trySubscribe:a,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=K)},getListeners:function(){return r}};return i}var X="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect;const J=function(e){var t=e.store,n=e.context,o=e.children,a=(0,r.useMemo)((function(){var e=G(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),i=(0,r.useMemo)((function(){return t.getState()}),[t]);X((function(){var e=a.subscription;return e.trySubscribe(),i!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[a,i]);var c=n||B;return r.default.createElement(c.Provider,{value:a},o)};n(679);var Z=n(864);function Q(){return(0,r.useContext)(B)}var ee=function(e,t){return e===t};function te(e){void 0===e&&(e=B);var t=e===B?Q:function(){return(0,r.useContext)(e)};return function(e,n){void 0===n&&(n=ee);var o=t(),a=function(e,t,n,o){var a,i=(0,r.useReducer)((function(e){return e+1}),0),c=i[1],u=(0,r.useMemo)((function(){return G(n,o)}),[n,o]),l=(0,r.useRef)(),s=(0,r.useRef)(),f=(0,r.useRef)(),d=(0,r.useRef)(),p=n.getState();try{if(e!==s.current||p!==f.current||l.current){var h=e(p);a=void 0!==d.current&&t(h,d.current)?d.current:h}else a=d.current}catch(e){throw l.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+l.current.stack+"\n\n"),e}return X((function(){s.current=e,f.current=p,d.current=a,l.current=void 0})),X((function(){function e(){try{var e=n.getState();if(e===f.current)return;var r=s.current(e);if(t(r,d.current))return;d.current=r,f.current=e}catch(e){l.current=e}c()}return u.onStateChange=e,u.trySubscribe(),e(),function(){return u.tryUnsubscribe()}}),[n,u]),a}(e,n,o.store,o.subscription);return(0,r.useDebugValue)(a),a}}var ne,re=te();ne=o.unstable_batchedUpdates,W=ne;const oe=(0,r.createContext)({});function ae(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ie(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ue(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{},n=[];return r.default.Children.forEach(e,(function(e){(null!=e||t.keepEmpty)&&(Array.isArray(e)?n=n.concat(Ce(e)):(0,Z.isFragment)(e)&&e.props?n=n.concat(Ce(e.props.children,t)):n.push(e))})),n}var Pe={};function ke(e,t){}const Oe=function(e,t){!function(e,t,n){t||Pe[n]||(e(!1,n),Pe[n]=!0)}(ke,e,t)};var Fe="RC_FORM_INTERNAL_HOOKS",Se=function(){Oe(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")};const je=r.createContext({getFieldValue:Se,getFieldsValue:Se,getFieldError:Se,getFieldWarning:Se,getFieldsError:Se,isFieldsTouched:Se,isFieldTouched:Se,isFieldValidating:Se,isFieldsValidating:Se,resetFields:Se,setFields:Se,setFieldsValue:Se,validateFields:Se,submit:Se,getInternalHooks:function(){return Se(),{dispatch:Se,initEntityValue:Se,registerField:Se,useSubscribe:Se,setInitialValues:Se,setCallbacks:Se,getFields:Se,setValidateMessages:Se,setPreserve:Se,getInitialValue:Se}}});function Me(e){return null==e?[]:Array.isArray(e)?e:[e]}var Ae=n(757),Ne=n.n(Ae);function Re(e,t,n,r,o,a,i){try{var c=e[a](i),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function _e(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){Re(a,r,o,i,c,"next",e)}function c(e){Re(a,r,o,i,c,"throw",e)}i(void 0)}))}}function Te(){return Te=Object.assign||function(e){for(var t=1;t1?t-1:0),r=1;r=a)return e;switch(e){case"%s":return String(n[o++]);case"%d":return Number(n[o++]);case"%j":try{return JSON.stringify(n[o++])}catch(e){return"[Circular]"}break;default:return e}}));return i}return e}function ze(e,t){return null==e||!("array"!==t||!Array.isArray(e)||e.length)||!(!function(e){return"string"===e||"url"===e||"hex"===e||"email"===e||"date"===e||"pattern"===e}(t)||"string"!=typeof e||e)}function Be(e,t,n){var r=0,o=e.length;!function a(i){if(i&&i.length)n(i);else{var c=r;r+=1,c()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{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},Je={integer:function(e){return Je.number(e)&&parseInt(e,10)===e},float:function(e){return Je.number(e)&&!Je.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(e){return!1}},date:function(e){return"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&"number"==typeof e},object:function(e){return"object"==typeof e&&!Je.array(e)},method:function(e){return"function"==typeof e},email:function(e){return"string"==typeof e&&e.length<=320&&!!e.match(Xe.email)},url:function(e){return"string"==typeof e&&e.length<=2048&&!!e.match(Xe.url)},hex:function(e){return"string"==typeof e&&!!e.match(Xe.hex)}},Ze=Ge,Qe=function(e,t,n,r,o){(/^\s+$/.test(t)||""===t)&&r.push(Ue(o.messages.whitespace,e.fullField))},et=function(e,t,n,r,o){if(e.required&&void 0===t)Ge(e,t,n,r,o);else{var a=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(a)>-1?Je[a](t)||r.push(Ue(o.messages.types[a],e.fullField,e.type)):a&&typeof t!==e.type&&r.push(Ue(o.messages.types[a],e.fullField,e.type))}},tt=function(e,t,n,r,o){var a="number"==typeof e.len,i="number"==typeof e.min,c="number"==typeof e.max,u=t,l=null,s="number"==typeof t,f="string"==typeof t,d=Array.isArray(t);if(s?l="number":f?l="string":d&&(l="array"),!l)return!1;d&&(u=t.length),f&&(u=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),a?u!==e.len&&r.push(Ue(o.messages[l].len,e.fullField,e.len)):i&&!c&&ue.max?r.push(Ue(o.messages[l].max,e.fullField,e.max)):i&&c&&(ue.max)&&r.push(Ue(o.messages[l].range,e.fullField,e.min,e.max))},nt=function(e,t,n,r,o){e.enum=Array.isArray(e.enum)?e.enum:[],-1===e.enum.indexOf(t)&&r.push(Ue(o.messages.enum,e.fullField,e.enum.join(", ")))},rt=function(e,t,n,r,o){e.pattern&&(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||r.push(Ue(o.messages.pattern.mismatch,e.fullField,t,e.pattern))):"string"==typeof e.pattern&&(new RegExp(e.pattern).test(t)||r.push(Ue(o.messages.pattern.mismatch,e.fullField,t,e.pattern))))},ot=function(e,t,n,r,o){var a=e.type,i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(ze(t,a)&&!e.required)return n();Ze(e,t,r,i,o,a),ze(t,a)||et(e,t,r,i,o)}n(i)},at={string:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(ze(t,"string")&&!e.required)return n();Ze(e,t,r,a,o,"string"),ze(t,"string")||(et(e,t,r,a,o),tt(e,t,r,a,o),rt(e,t,r,a,o),!0===e.whitespace&&Qe(e,t,r,a,o))}n(a)},method:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(ze(t)&&!e.required)return n();Ze(e,t,r,a,o),void 0!==t&&et(e,t,r,a,o)}n(a)},number:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(""===t&&(t=void 0),ze(t)&&!e.required)return n();Ze(e,t,r,a,o),void 0!==t&&(et(e,t,r,a,o),tt(e,t,r,a,o))}n(a)},boolean:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(ze(t)&&!e.required)return n();Ze(e,t,r,a,o),void 0!==t&&et(e,t,r,a,o)}n(a)},regexp:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(ze(t)&&!e.required)return n();Ze(e,t,r,a,o),ze(t)||et(e,t,r,a,o)}n(a)},integer:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(ze(t)&&!e.required)return n();Ze(e,t,r,a,o),void 0!==t&&(et(e,t,r,a,o),tt(e,t,r,a,o))}n(a)},float:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(ze(t)&&!e.required)return n();Ze(e,t,r,a,o),void 0!==t&&(et(e,t,r,a,o),tt(e,t,r,a,o))}n(a)},array:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(null==t&&!e.required)return n();Ze(e,t,r,a,o,"array"),null!=t&&(et(e,t,r,a,o),tt(e,t,r,a,o))}n(a)},object:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(ze(t)&&!e.required)return n();Ze(e,t,r,a,o),void 0!==t&&et(e,t,r,a,o)}n(a)},enum:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(ze(t)&&!e.required)return n();Ze(e,t,r,a,o),void 0!==t&&nt(e,t,r,a,o)}n(a)},pattern:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(ze(t,"string")&&!e.required)return n();Ze(e,t,r,a,o),ze(t,"string")||rt(e,t,r,a,o)}n(a)},date:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(ze(t,"date")&&!e.required)return n();var i;Ze(e,t,r,a,o),ze(t,"date")||(i=t instanceof Date?t:new Date(t),et(e,i,r,a,o),i&&tt(e,i.getTime(),r,a,o))}n(a)},url:ot,hex:ot,email:ot,required:function(e,t,n,r,o){var a=[],i=Array.isArray(t)?"array":typeof t;Ze(e,t,r,a,o,i),n(a)},any:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(ze(t)&&!e.required)return n();Ze(e,t,r,a,o)}n(a)}};function it(){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(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var ct=it(),ut=function(){function e(e){this.rules=null,this._messages=ct,this.define(e)}var t=e.prototype;return t.define=function(e){var t=this;if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!=typeof e||Array.isArray(e))throw new Error("Rules must be an object");this.rules={},Object.keys(e).forEach((function(n){var r=e[n];t.rules[n]=Array.isArray(r)?r:[r]}))},t.messages=function(e){return e&&(this._messages=Ke(it(),e)),this._messages},t.validate=function(t,n,r){var o=this;void 0===n&&(n={}),void 0===r&&(r=function(){});var a=t,i=n,c=r;if("function"==typeof i&&(c=i,i={}),!this.rules||0===Object.keys(this.rules).length)return c&&c(null,a),Promise.resolve(a);if(i.messages){var u=this.messages();u===ct&&(u=it()),Ke(u,i.messages),i.messages=u}else i.messages=this.messages();var l={};(i.keys||Object.keys(this.rules)).forEach((function(e){var n=o.rules[e],r=a[e];n.forEach((function(n){var i=n;"function"==typeof i.transform&&(a===t&&(a=Te({},a)),r=a[e]=i.transform(r)),(i="function"==typeof i?{validator:i}:Te({},i)).validator=o.getValidationMethod(i),i.validator&&(i.field=e,i.fullField=i.fullField||e,i.type=o.getType(i),l[e]=l[e]||[],l[e].push({rule:i,value:r,source:a,field:e}))}))}));var s={};return function(e,t,n,r,o){if(t.first){var a=new Promise((function(t,a){var i=function(e){var t=[];return Object.keys(e).forEach((function(n){t.push.apply(t,e[n]||[])})),t}(e);Be(i,n,(function(e){return r(e),e.length?a(new We(e,He(e))):t(o)}))}));return a.catch((function(e){return e})),a}var i=!0===t.firstFields?Object.keys(e):t.firstFields||[],c=Object.keys(e),u=c.length,l=0,s=[],f=new Promise((function(t,a){var f=function(e){if(s.push.apply(s,e),++l===u)return r(s),s.length?a(new We(s,He(s))):t(o)};c.length||(r(s),t(o)),c.forEach((function(t){var r=e[t];-1!==i.indexOf(t)?Be(r,n,f):function(e,t,n){var r=[],o=0,a=e.length;function i(e){r.push.apply(r,e||[]),++o===a&&n(r)}e.forEach((function(e){t(e,i)}))}(r,n,f)}))}));return f.catch((function(e){return e})),f}(l,i,(function(t,n){var r,o=t.rule,c=!("object"!==o.type&&"array"!==o.type||"object"!=typeof o.fields&&"object"!=typeof o.defaultField);function u(e,t){return Te({},t,{fullField:o.fullField+"."+e,fullFields:o.fullFields?[].concat(o.fullFields,[e]):[e]})}function l(r){void 0===r&&(r=[]);var l=Array.isArray(r)?r:[r];!i.suppressWarning&&l.length&&e.warning("async-validator:",l),l.length&&void 0!==o.message&&(l=[].concat(o.message));var f=l.map(Ye(o,a));if(i.first&&f.length)return s[o.field]=1,n(f);if(c){if(o.required&&!t.value)return void 0!==o.message?f=[].concat(o.message).map(Ye(o,a)):i.error&&(f=[i.error(o,Ue(i.messages.required,o.field))]),n(f);var d={};o.defaultField&&Object.keys(t.value).map((function(e){d[e]=o.defaultField})),d=Te({},d,t.rule.fields);var p={};Object.keys(d).forEach((function(e){var t=d[e],n=Array.isArray(t)?t:[t];p[e]=n.map(u.bind(null,e))}));var h=new e(p);h.messages(i.messages),t.rule.options&&(t.rule.options.messages=i.messages,t.rule.options.error=i.error),h.validate(t.value,t.rule.options||i,(function(e){var t=[];f&&f.length&&t.push.apply(t,f),e&&e.length&&t.push.apply(t,e),n(t.length?t:null)}))}else n(f)}c=c&&(o.required||!o.required&&t.value),o.field=t.field,o.asyncValidator?r=o.asyncValidator(o,t.value,l,t.source,i):o.validator&&(!0===(r=o.validator(o,t.value,l,t.source,i))?l():!1===r?l("function"==typeof o.message?o.message(o.fullField||o.field):o.message||(o.fullField||o.field)+" fails"):r instanceof Array?l(r):r instanceof Error&&l(r.message)),r&&r.then&&r.then((function(){return l()}),(function(e){return l(e)}))}),(function(e){!function(e){var t=[],n={};function r(e){var n;Array.isArray(e)?t=(n=t).concat.apply(n,e):t.push(e)}for(var o=0;o3&&void 0!==arguments[3]&&arguments[3];return t.length&&r&&void 0===n&&!ft(e,t.slice(0,-1))?e:ht(e,t,n,r)}function mt(e){return Me(e)}function gt(e,t){return ft(e,t)}function yt(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=vt(e,t,n,r);return o}function bt(e,t){var n={};return t.forEach((function(t){var r=gt(e,t);n=yt(n,t,r)})),n}function wt(e,t){return e&&e.some((function(e){return Pt(e,t)}))}function Et(e){return"object"===we(e)&&null!==e&&Object.getPrototypeOf(e)===Object.prototype}function xt(e,t){var n=Array.isArray(e)?de(e):ue({},e);return t?(Object.keys(t).forEach((function(e){var r=n[e],o=t[e],a=Et(r)&&Et(o);n[e]=a?xt(r,o||{}):o})),n):n}function Ct(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=r||n<0||n>=r)return e;var o=e[t],a=t-n;return a>0?[].concat(de(e.slice(0,n)),[o],de(e.slice(n,t)),de(e.slice(t+1,r))):a<0?[].concat(de(e.slice(0,t)),de(e.slice(t+1,n+1)),[o],de(e.slice(n+1,r))):e}var Ft=ut;function St(e,t){return e.replace(/\$\{\w+\}/g,(function(e){var n=e.slice(2,-1);return t[n]}))}function jt(e,t,n,r,o){return Mt.apply(this,arguments)}function Mt(){return Mt=_e(Ne().mark((function e(t,n,o,a,i){var c,u,l,s,f,d,p,h;return Ne().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return delete(c=ue({},o)).ruleIndex,u=null,c&&"array"===c.type&&c.defaultField&&(u=c.defaultField,delete c.defaultField),l=new Ft(ie({},t,[c])),s=Ct({},st,a.validateMessages),l.messages(s),f=[],e.prev=8,e.next=11,Promise.resolve(l.validate(ie({},t,n),ue({},a)));case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(8),e.t0.errors?f=e.t0.errors.map((function(e,t){var n=e.message;return r.isValidElement(n)?r.cloneElement(n,{key:"error_".concat(t)}):n})):(console.error(e.t0),f=[s.default]);case 16:if(f.length||!u){e.next=21;break}return e.next=19,Promise.all(n.map((function(e,n){return jt("".concat(t,".").concat(n),e,u,a,i)})));case 19:return d=e.sent,e.abrupt("return",d.reduce((function(e,t){return[].concat(de(e),de(t))}),[]));case 21:return p=ue(ue({},o),{},{name:t,enum:(o.enum||[]).join(", ")},i),h=f.map((function(e){return"string"==typeof e?St(e,p):e})),e.abrupt("return",h);case 24:case"end":return e.stop()}}),e,null,[[8,13]])}))),Mt.apply(this,arguments)}function At(){return(At=_e(Ne().mark((function e(t){return Ne().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(t).then((function(e){var t;return(t=[]).concat.apply(t,de(e))})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Nt(){return(Nt=_e(Ne().mark((function e(t){var n;return Ne().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=0,e.abrupt("return",new Promise((function(e){t.forEach((function(r){r.then((function(r){r.errors.length&&e([r]),(n+=1)===t.length&&e([])}))}))})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Rt=["name"],_t=[];function Tt(e,t,n,r,o,a){return"function"==typeof e?e(t,n,"source"in a?{source:a.source}:{}):r!==o}var It=function(e){ye(n,e);var t=xe(n);function n(e){var o;return pe(this,n),(o=t.call(this,e)).state={resetCount:0},o.cancelRegisterFunc=null,o.mounted=!1,o.touched=!1,o.dirty=!1,o.validatePromise=null,o.prevValidating=void 0,o.errors=_t,o.warnings=_t,o.cancelRegister=function(){var e=o.props,t=e.preserve,n=e.isListField,r=e.name;o.cancelRegisterFunc&&o.cancelRegisterFunc(n,t,mt(r)),o.cancelRegisterFunc=null},o.getNamePath=function(){var e=o.props,t=e.name,n=e.fieldContext.prefixName;return void 0!==t?[].concat(de(void 0===n?[]:n),de(t)):[]},o.getRules=function(){var e=o.props,t=e.rules,n=void 0===t?[]:t,r=e.fieldContext;return n.map((function(e){return"function"==typeof e?e(r):e}))},o.refresh=function(){o.mounted&&o.setState((function(e){return{resetCount:e.resetCount+1}}))},o.triggerMetaEvent=function(e){var t=o.props.onMetaChange;null==t||t(ue(ue({},o.getMeta()),{},{destroy:e}))},o.onStoreChange=function(e,t,n){var r=o.props,a=r.shouldUpdate,i=r.dependencies,c=void 0===i?[]:i,u=r.onReset,l=n.store,s=o.getNamePath(),f=o.getValue(e),d=o.getValue(l),p=t&&wt(t,s);switch("valueUpdate"===n.type&&"external"===n.source&&f!==d&&(o.touched=!0,o.dirty=!0,o.validatePromise=null,o.errors=_t,o.warnings=_t,o.triggerMetaEvent()),n.type){case"reset":if(!t||p)return o.touched=!1,o.dirty=!1,o.validatePromise=null,o.errors=_t,o.warnings=_t,o.triggerMetaEvent(),null==u||u(),void o.refresh();break;case"remove":if(a)return void o.reRender();break;case"setField":if(p){var h=n.data;return"touched"in h&&(o.touched=h.touched),"validating"in h&&!("originRCField"in h)&&(o.validatePromise=h.validating?Promise.resolve([]):null),"errors"in h&&(o.errors=h.errors||_t),"warnings"in h&&(o.warnings=h.warnings||_t),o.dirty=!0,o.triggerMetaEvent(),void o.reRender()}if(a&&!s.length&&Tt(a,e,l,f,d,n))return void o.reRender();break;case"dependenciesUpdate":if(c.map(mt).some((function(e){return wt(n.relatedFields,e)})))return void o.reRender();break;default:if(p||(!c.length||s.length||a)&&Tt(a,e,l,f,d,n))return void o.reRender()}!0===a&&o.reRender()},o.validateRules=function(e){var t=o.getNamePath(),n=o.getValue(),r=Promise.resolve().then((function(){if(!o.mounted)return[];var a=o.props,i=a.validateFirst,c=void 0!==i&&i,u=a.messageVariables,l=(e||{}).triggerName,s=o.getRules();l&&(s=s.filter((function(e){var t=e.validateTrigger;return!t||Me(t).includes(l)})));var f=function(e,t,n,r,o,a){var i,c=e.join("."),u=n.map((function(e,t){var n=e.validator,r=ue(ue({},e),{},{ruleIndex:t});return n&&(r.validator=function(e,t,r){var o=!1,a=n(e,t,(function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:_t;if(o.validatePromise===r){o.validatePromise=null;var t=[],n=[];e.forEach((function(e){var r=e.rule.warningOnly,o=e.errors,a=void 0===o?_t:o;r?n.push.apply(n,de(a)):t.push.apply(t,de(a))})),o.errors=t,o.warnings=n,o.triggerMetaEvent(),o.reRender()}})),f}));return o.validatePromise=r,o.dirty=!0,o.errors=_t,o.warnings=_t,o.triggerMetaEvent(),o.reRender(),r},o.isFieldValidating=function(){return!!o.validatePromise},o.isFieldTouched=function(){return o.touched},o.isFieldDirty=function(){return!(!o.dirty&&void 0===o.props.initialValue)||void 0!==(0,o.props.fieldContext.getInternalHooks(Fe).getInitialValue)(o.getNamePath())},o.getErrors=function(){return o.errors},o.getWarnings=function(){return o.warnings},o.isListField=function(){return o.props.isListField},o.isList=function(){return o.props.isList},o.isPreserve=function(){return o.props.preserve},o.getMeta=function(){return o.prevValidating=o.isFieldValidating(),{touched:o.isFieldTouched(),validating:o.prevValidating,errors:o.errors,warnings:o.warnings,name:o.getNamePath()}},o.getOnlyChild=function(e){if("function"==typeof e){var t=o.getMeta();return ue(ue({},o.getOnlyChild(e(o.getControlled(),t,o.props.fieldContext))),{},{isFunction:!0})}var n=Ce(e);return 1===n.length&&r.isValidElement(n[0])?{child:n[0],isFunction:!1}:{child:n,isFunction:!1}},o.getValue=function(e){var t=o.props.fieldContext.getFieldsValue,n=o.getNamePath();return gt(e||t(!0),n)},o.getControlled=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=o.props,n=t.trigger,r=t.validateTrigger,a=t.getValueFromEvent,i=t.normalize,c=t.valuePropName,u=t.getValueProps,l=t.fieldContext,s=void 0!==r?r:l.validateTrigger,f=o.getNamePath(),d=l.getInternalHooks,p=l.getFieldsValue,h=d(Fe),v=h.dispatch,m=o.getValue(),g=u||function(e){return ie({},c,e)},y=e[n],b=ue(ue({},e),g(m));b[n]=function(){var e;o.touched=!0,o.dirty=!0,o.triggerMetaEvent();for(var t=arguments.length,n=new Array(t),r=0;r0&&void 0!==arguments[0]&&arguments[0];return e?n.fieldEntities.filter((function(e){return e.getNamePath().length})):n.fieldEntities},this.getFieldsMap=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=new Ut;return n.getFieldEntities(e).forEach((function(e){var n=e.getNamePath();t.set(n,e)})),t},this.getFieldEntitiesForNamePathList=function(e){if(!e)return n.getFieldEntities(!0);var t=n.getFieldsMap(!0);return e.map((function(e){var n=mt(e);return t.get(n)||{INVALIDATE_NAME_PATH:mt(e)}}))},this.getFieldsValue=function(e,t){if(n.warningUnhooked(),!0===e&&!t)return n.store;var r=n.getFieldEntitiesForNamePathList(Array.isArray(e)?e:null),o=[];return r.forEach((function(n){var r,a="INVALIDATE_NAME_PATH"in n?n.INVALIDATE_NAME_PATH:n.getNamePath();if(e||!(null===(r=n.isListField)||void 0===r?void 0:r.call(n)))if(t){var i="getMeta"in n?n.getMeta():null;t(i)&&o.push(a)}else o.push(a)})),bt(n.store,o.map(mt))},this.getFieldValue=function(e){n.warningUnhooked();var t=mt(e);return gt(n.store,t)},this.getFieldsError=function(e){return n.warningUnhooked(),n.getFieldEntitiesForNamePathList(e).map((function(t,n){return t&&!("INVALIDATE_NAME_PATH"in t)?{name:t.getNamePath(),errors:t.getErrors(),warnings:t.getWarnings()}:{name:mt(e[n]),errors:[],warnings:[]}}))},this.getFieldError=function(e){n.warningUnhooked();var t=mt(e);return n.getFieldsError([t])[0].errors},this.getFieldWarning=function(e){n.warningUnhooked();var t=mt(e);return n.getFieldsError([t])[0].warnings},this.isFieldsTouched=function(){n.warningUnhooked();for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=new Ut,r=n.getFieldEntities(!0);r.forEach((function(e){var n=e.props.initialValue,r=e.getNamePath();if(void 0!==n){var o=t.get(r)||new Set;o.add({entity:e,value:n}),t.set(r,o)}}));var o,a=function(r){r.forEach((function(r){if(void 0!==r.props.initialValue){var o=r.getNamePath();if(void 0!==n.getInitialValue(o))Oe(!1,"Form already set 'initialValues' with path '".concat(o.join("."),"'. Field can not overwrite it."));else{var a=t.get(o);if(a&&a.size>1)Oe(!1,"Multiple Field with path '".concat(o.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(a){var i=n.getFieldValue(o);e.skipExist&&void 0!==i||(n.store=yt(n.store,o,de(a)[0].value))}}}}))};e.entities?o=e.entities:e.namePathList?(o=[],e.namePathList.forEach((function(e){var n,r=t.get(e);r&&(n=o).push.apply(n,de(de(r).map((function(e){return e.entity}))))}))):o=r,a(o)},this.resetFields=function(e){n.warningUnhooked();var t=n.store;if(!e)return n.store=Ct({},n.initialValues),n.resetWithFieldInitialValue(),void n.notifyObservers(t,null,{type:"reset"});var r=e.map(mt);r.forEach((function(e){var t=n.getInitialValue(e);n.store=yt(n.store,e,t)})),n.resetWithFieldInitialValue({namePathList:r}),n.notifyObservers(t,r,{type:"reset"})},this.setFields=function(e){n.warningUnhooked();var t=n.store;e.forEach((function(e){var r=e.name,o=(e.errors,ae(e,zt)),a=mt(r);"value"in o&&(n.store=yt(n.store,a,o.value)),n.notifyObservers(t,[a],{type:"setField",data:e})}))},this.getFields=function(){return n.getFieldEntities(!0).map((function(e){var t=e.getNamePath(),r=ue(ue({},e.getMeta()),{},{name:t,value:n.getFieldValue(t)});return Object.defineProperty(r,"originRCField",{value:!0}),r}))},this.initEntityValue=function(e){var t=e.props.initialValue;if(void 0!==t){var r=e.getNamePath();void 0===gt(n.store,r)&&(n.store=yt(n.store,r,t))}},this.registerField=function(e){if(n.fieldEntities.push(e),void 0!==e.props.initialValue){var t=n.store;n.resetWithFieldInitialValue({entities:[e],skipExist:!0}),n.notifyObservers(t,[e.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(t,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];n.fieldEntities=n.fieldEntities.filter((function(t){return t!==e}));var a=void 0!==r?r:n.preserve;if(!1===a&&(!t||o.length>1)){var i=e.getNamePath(),c=t?void 0:gt(n.initialValues,i);if(i.length&&n.getFieldValue(i)!==c&&n.fieldEntities.every((function(e){return!Pt(e.getNamePath(),i)}))){var u=n.store;n.store=yt(u,i,c,!0),n.notifyObservers(u,[i],{type:"remove"}),n.triggerDependenciesUpdate(u,i)}}}},this.dispatch=function(e){switch(e.type){case"updateValue":var t=e.namePath,r=e.value;n.updateValue(t,r);break;case"validateField":var o=e.namePath,a=e.triggerName;n.validateFields([o],{triggerName:a})}},this.notifyObservers=function(e,t,r){if(n.subscribable){var o=ue(ue({},r),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach((function(n){(0,n.onStoreChange)(e,t,o)}))}else n.forceRootUpdate()},this.triggerDependenciesUpdate=function(e,t){var r=n.getDependencyChildrenFields(t);return r.length&&n.validateFields(r),n.notifyObservers(e,r,{type:"dependenciesUpdate",relatedFields:[t].concat(de(r))}),r},this.updateValue=function(e,t){var r=mt(e),o=n.store;n.store=yt(n.store,r,t),n.notifyObservers(o,[r],{type:"valueUpdate",source:"internal"});var a=n.triggerDependenciesUpdate(o,r),i=n.callbacks.onValuesChange;i&&i(bt(n.store,[r]),n.getFieldsValue()),n.triggerOnFieldsChange([r].concat(de(a)))},this.setFieldsValue=function(e){n.warningUnhooked();var t=n.store;e&&(n.store=Ct(n.store,e)),n.notifyObservers(t,null,{type:"valueUpdate",source:"external"})},this.getDependencyChildrenFields=function(e){var t=new Set,r=[],o=new Ut;return n.getFieldEntities().forEach((function(e){(e.props.dependencies||[]).forEach((function(t){var n=mt(t);o.update(n,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Set;return t.add(e),t}))}))})),function e(n){(o.get(n)||new Set).forEach((function(n){if(!t.has(n)){t.add(n);var o=n.getNamePath();n.isFieldDirty()&&o.length&&(r.push(o),e(o))}}))}(e),r},this.triggerOnFieldsChange=function(e,t){var r=n.callbacks.onFieldsChange;if(r){var o=n.getFields();if(t){var a=new Ut;t.forEach((function(e){var t=e.name,n=e.errors;a.set(t,n)})),o.forEach((function(e){e.errors=a.get(e.name)||e.errors}))}r(o.filter((function(t){var n=t.name;return wt(e,n)})),o)}},this.validateFields=function(e,t){n.warningUnhooked();var r=!!e,o=r?e.map(mt):[],a=[];n.getFieldEntities(!0).forEach((function(i){if(r||o.push(i.getNamePath()),(null==t?void 0:t.recursive)&&r){var c=i.getNamePath();c.every((function(t,n){return e[n]===t||void 0===e[n]}))&&o.push(c)}if(i.props.rules&&i.props.rules.length){var u=i.getNamePath();if(!r||wt(o,u)){var l=i.validateRules(ue({validateMessages:ue(ue({},st),n.validateMessages)},t));a.push(l.then((function(){return{name:u,errors:[],warnings:[]}})).catch((function(e){var t=[],n=[];return e.forEach((function(e){var r=e.rule.warningOnly,o=e.errors;r?n.push.apply(n,de(o)):t.push.apply(t,de(o))})),t.length?Promise.reject({name:u,errors:t,warnings:n}):{name:u,errors:t,warnings:n}})))}}}));var i=function(e){var t=!1,n=e.length,r=[];return e.length?new Promise((function(o,a){e.forEach((function(e,i){e.catch((function(e){return t=!0,e})).then((function(e){n-=1,r[i]=e,n>0||(t&&a(r),o(r))}))}))})):Promise.resolve([])}(a);n.lastValidatePromise=i,i.catch((function(e){return e})).then((function(e){var t=e.map((function(e){return e.name}));n.notifyObservers(n.store,t,{type:"validateFinish"}),n.triggerOnFieldsChange(t,e)}));var c=i.then((function(){return n.lastValidatePromise===i?Promise.resolve(n.getFieldsValue(o)):Promise.reject([])})).catch((function(e){var t=e.filter((function(e){return e&&e.errors.length}));return Promise.reject({values:n.getFieldsValue(o),errorFields:t,outOfDate:n.lastValidatePromise!==i})}));return c.catch((function(e){return e})),c},this.submit=function(){n.warningUnhooked(),n.validateFields().then((function(e){var t=n.callbacks.onFinish;if(t)try{t(e)}catch(e){console.error(e)}})).catch((function(e){var t=n.callbacks.onFinishFailed;t&&t(e)}))},this.forceRootUpdate=t}));const Wt=function(e){var t=r.useRef(),n=Dt(r.useState({}),2)[1];if(!t.current)if(e)t.current=e;else{var o=new Bt((function(){n({})}));t.current=o.getForm()}return[t.current]};var Yt=r.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),Kt=function(e){var t=e.validateMessages,n=e.onFormChange,o=e.onFormFinish,a=e.children,i=r.useContext(Yt),c=r.useRef({});return r.createElement(Yt.Provider,{value:ue(ue({},i),{},{validateMessages:ue(ue({},i.validateMessages),t),triggerFormChange:function(e,t){n&&n(e,{changedFields:t,forms:c.current}),i.triggerFormChange(e,t)},triggerFormFinish:function(e,t){o&&o(e,{values:t,forms:c.current}),i.triggerFormFinish(e,t)},registerForm:function(e,t){e&&(c.current=ue(ue({},c.current),{},ie({},e,t))),i.registerForm(e,t)},unregisterForm:function(e){var t=ue({},c.current);delete t[e],c.current=t,i.unregisterForm(e)}})},a)};const Gt=Yt;var Xt=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"];const Jt=function(e,t){var n=e.name,o=e.initialValues,a=e.fields,i=e.form,c=e.preserve,u=e.children,l=e.component,s=void 0===l?"form":l,f=e.validateMessages,d=e.validateTrigger,p=void 0===d?"onChange":d,h=e.onValuesChange,v=e.onFieldsChange,m=e.onFinish,g=e.onFinishFailed,b=ae(e,Xt),w=r.useContext(Gt),E=Dt(Wt(i),1)[0],x=E.getInternalHooks(Fe),C=x.useSubscribe,P=x.setInitialValues,k=x.setCallbacks,O=x.setValidateMessages,F=x.setPreserve;r.useImperativeHandle(t,(function(){return E})),r.useEffect((function(){return w.registerForm(n,E),function(){w.unregisterForm(n)}}),[w,E,n]),O(ue(ue({},w.validateMessages),f)),k({onValuesChange:h,onFieldsChange:function(e){if(w.triggerFormChange(n,e),v){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o=0&&t<=n.length?(u.keys=[].concat(de(u.keys.slice(0,t)),[u.id],de(u.keys.slice(t))),a([].concat(de(n.slice(0,t)),[e],de(n.slice(t))))):(u.keys=[].concat(de(u.keys),[u.id]),a([].concat(de(n),[e]))),u.id+=1},remove:function(e){var t=s(),n=new Set(Array.isArray(e)?e:[e]);n.size<=0||(u.keys=u.keys.filter((function(e,t){return!n.has(t)})),a(t.filter((function(e,t){return!n.has(t)}))))},move:function(e,t){if(e!==t){var n=s();e<0||e>=n.length||t<0||t>=n.length||(u.keys=Ot(u.keys,e,t),a(Ot(n,e,t)))}}},d=r||[];return Array.isArray(d)||(d=[]),o(d.map((function(e,t){var n=u.keys[t];return void 0===n&&(u.keys[t]=u.id,n=u.keys[t],u.id+=1),{name:t,key:n,isListField:!0}})),f,t)}))))},Zt.useForm=Wt;var Qt=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function en(e,t){if(e.length!==t.length)return!1;for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:1,n=tr+=1;function r(t){if(0===t)rr(n),e();else{var o=Qn((function(){r(t-1)}));nr.set(n,o)}}return r(t),n}or.cancel=function(e){var t=nr.get(e);return rr(t),er(t)};var ar=[Yn,Kn,Gn,Xn];function ir(e){return e===Gn||e===Xn}function cr(e,t,n,o){var a=o.motionEnter,i=void 0===a||a,c=o.motionAppear,u=void 0===c||c,l=o.motionLeave,s=void 0===l||l,f=o.motionDeadline,d=o.motionLeaveImmediately,p=o.onAppearPrepare,h=o.onEnterPrepare,v=o.onLeavePrepare,m=o.onAppearStart,g=o.onEnterStart,y=o.onLeaveStart,b=o.onAppearActive,w=o.onEnterActive,E=o.onLeaveActive,x=o.onAppearEnd,C=o.onEnterEnd,P=o.onLeaveEnd,k=o.onVisibleChanged,O=Dt(Jn(),2),F=O[0],S=O[1],j=Dt(Jn(Hn),2),M=j[0],A=j[1],N=Dt(Jn(null),2),R=N[0],_=N[1],T=(0,r.useRef)(!1),I=(0,r.useRef)(null),$=(0,r.useRef)(!1),V=(0,r.useRef)(null);function D(){return n()||V.current}var L=(0,r.useRef)(!1);function q(e){var t,n=D();e&&!e.deadline&&e.target!==n||(M===Un&&L.current?t=null==x?void 0:x(n,e):M===zn&&L.current?t=null==C?void 0:C(n,e):M===Bn&&L.current&&(t=null==P?void 0:P(n,e)),!1===t||$.current||(A(Hn),_(null)))}var H=function(e){var t=(0,r.useRef)(),n=(0,r.useRef)(e);n.current=e;var o=r.useCallback((function(e){n.current(e)}),[]);function a(e){e&&(e.removeEventListener(Ln,o),e.removeEventListener(Dn,o))}return r.useEffect((function(){return function(){a(t.current)}}),[]),[function(e){t.current&&t.current!==e&&a(t.current),e&&e!==t.current&&(e.addEventListener(Ln,o),e.addEventListener(Dn,o),t.current=e)},a]}(q),U=Dt(H,1)[0],z=r.useMemo((function(){var e,t,n;switch(M){case"appear":return ie(e={},Yn,p),ie(e,Kn,m),ie(e,Gn,b),e;case"enter":return ie(t={},Yn,h),ie(t,Kn,g),ie(t,Gn,w),t;case"leave":return ie(n={},Yn,v),ie(n,Kn,y),ie(n,Gn,E),n;default:return{}}}),[M]),B=Dt(function(e,t){var n=Dt(r.useState(Wn),2),o=n[0],a=n[1],i=function(){var e=r.useRef(null);function t(){or.cancel(e.current)}return r.useEffect((function(){return function(){t()}}),[]),[function n(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;t();var a=or((function(){o<=1?r({isCanceled:function(){return a!==e.current}}):n(r,o-1)}));e.current=a},t]}(),c=Dt(i,2),u=c[0],l=c[1];return Zn((function(){if(o!==Wn&&o!==Xn){var e=ar.indexOf(o),n=ar[e+1],r=t(o);!1===r?a(n):u((function(e){function t(){e.isCanceled()||a(n)}!0===r?t():Promise.resolve(r).then(t)}))}}),[e,o]),r.useEffect((function(){return function(){l()}}),[]),[function(){a(Yn)},o]}(M,(function(e){if(e===Yn){var t=z.prepare;return!!t&&t(D())}var n;return Y in z&&_((null===(n=z[Y])||void 0===n?void 0:n.call(z,D(),null))||null),Y===Gn&&(U(D()),f>0&&(clearTimeout(I.current),I.current=setTimeout((function(){q({deadline:!0})}),f))),!0})),2),W=B[0],Y=B[1],K=ir(Y);L.current=K,Zn((function(){S(t);var n,r=T.current;T.current=!0,e&&(!r&&t&&u&&(n=Un),r&&t&&i&&(n=zn),(r&&!t&&s||!r&&d&&!t&&s)&&(n=Bn),n&&(A(n),W()))}),[t]),(0,r.useEffect)((function(){(M===Un&&!u||M===zn&&!i||M===Bn&&!s)&&A(Hn)}),[u,i,s]),(0,r.useEffect)((function(){return function(){clearTimeout(I.current),$.current=!0}}),[]),(0,r.useEffect)((function(){void 0!==F&&M===Hn&&(null==k||k(F))}),[F,M]);var G=R;return z.prepare&&Y===Kn&&(G=ue({transition:"none"},G)),[M,Y,G,null!=F?F:t]}var ur=function(e){ye(n,e);var t=xe(n);function n(){return pe(this,n),t.apply(this,arguments)}return ve(n,[{key:"render",value:function(){return this.props.children}}]),n}(r.Component);const lr=ur,sr=function(e){var t=e;function n(e){return!(!e.motionName||!t)}"object"===we(e)&&(t=e.transitionSupport);var a=r.forwardRef((function(e,t){var a=e.visible,i=void 0===a||a,c=e.removeOnLeave,u=void 0===c||c,l=e.forceRender,s=e.children,f=e.motionName,d=e.leavedClassName,p=e.eventProps,h=n(e),v=(0,r.useRef)(),m=(0,r.useRef)(),g=Dt(cr(h,i,(function(){try{return(e=v.current||m.current)instanceof HTMLElement?e:o.default.findDOMNode(e)}catch(e){return null}var e}),e),4),y=g[0],b=g[1],w=g[2],E=g[3],x=r.useRef(E);E&&(x.current=!0);var C=(0,r.useRef)(t);C.current=t;var P,k=r.useCallback((function(e){v.current=e,function(e,t){"function"==typeof e?e(t):"object"===we(e)&&e&&"current"in e&&(e.current=t)}(C.current,e)}),[]),O=ue(ue({},p),{},{visible:i});if(s)if(y!==Hn&&n(e)){var F,S;b===Yn?S="prepare":ir(b)?S="active":b===Kn&&(S="start"),P=s(ue(ue({},O),{},{className:hn()(qn(f,y),(F={},ie(F,qn(f,"".concat(y,"-").concat(S)),S),ie(F,f,"string"==typeof f),F)),style:w}),k)}else P=E?s(ue({},O),k):!u&&x.current?s(ue(ue({},O),{},{className:d}),k):l?s(ue(ue({},O),{},{style:{display:"none"}}),k):null;else P=null;return r.createElement(lr,{ref:m},P)}));return a.displayName="CSSMotion",a}(Vn);var fr="add",dr="keep",pr="remove",hr="removed";function vr(e){var t;return ue(ue({},t=e&&"object"===we(e)&&"key"in e?e:{key:e}),{},{key:String(t.key)})}function mr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(vr)}function gr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,o=t.length,a=mr(e),i=mr(t);a.forEach((function(e){for(var t=!1,a=r;a1}));return u.forEach((function(e){n=n.filter((function(t){var n=t.key,r=t.status;return n!==e||r!==pr})),n.forEach((function(t){t.key===e&&(t.status=dr)}))})),n}var yr=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];const br=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:sr,n=function(e){ye(o,e);var n=xe(o);function o(){var e;return pe(this,o),(e=n.apply(this,arguments)).state={keyEntities:[]},e.removeKey=function(t){e.setState((function(e){return{keyEntities:e.keyEntities.map((function(e){return e.key!==t?e:ue(ue({},e),{},{status:hr})}))}}))},e}return ve(o,[{key:"render",value:function(){var e=this,n=this.state.keyEntities,o=this.props,a=o.component,i=o.children,c=o.onVisibleChanged,u=ae(o,["component","children","onVisibleChanged"]),l=a||r.Fragment,s={};return yr.forEach((function(e){s[e]=u[e],delete u[e]})),delete u.keys,r.createElement(l,u,n.map((function(n){var o=n.status,a=ae(n,["status"]),u=o===fr||o===dr;return r.createElement(t,y({},s,{key:a.key,visible:u,eventProps:a,onVisibleChanged:function(t){null==c||c(t,{key:a.key}),t||e.removeKey(a.key)}}),i)})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,r=t.keyEntities,o=mr(n);return{keyEntities:gr(r,o).filter((function(e){var t=r.find((function(t){var n=t.key;return e.key===n}));return!t||t.status!==hr||e.status!==pr}))}}}]),o}(r.Component);return n.defaultProps={component:"div"},n}(Vn);var wr=function(e){ye(n,e);var t=xe(n);function n(){var e;pe(this,n);for(var r=arguments.length,o=new Array(r),a=0;a=a&&(o.key=c[0].notice.key,o.updateMark=Pr(),o.userPassKey=r,c.shift()),c.push({notice:o,holderCallback:n})),{notices:c}}))},e.remove=function(t){e.setState((function(e){return{notices:e.notices.filter((function(e){var n=e.notice,r=n.key;return(n.userPassKey||r)!==t}))}}))},e.noticePropsMap={},e}return ve(n,[{key:"getTransitionName",value:function(){var e=this.props,t=e.prefixCls,n=e.animation,r=this.props.transitionName;return!r&&n&&(r="".concat(t,"-").concat(n)),r}},{key:"render",value:function(){var e=this,t=this.state.notices,n=this.props,o=n.prefixCls,a=n.className,i=n.closeIcon,c=n.style,u=[];return t.forEach((function(n,r){var a=n.notice,c=n.holderCallback,l=r===t.length-1?a.updateMark:void 0,s=a.key,f=a.userPassKey,d=ue(ue(ue({prefixCls:o,closeIcon:i},a),a.props),{},{key:s,noticeKey:f||s,updateMark:l,onClose:function(t){var n;e.remove(t),null===(n=a.onClose)||void 0===n||n.call(a)},onClick:a.onClick,children:a.content});u.push(s),e.noticePropsMap[s]={props:d,holderCallback:c}})),r.createElement("div",{className:hn()(o,a),style:c},r.createElement(br,{keys:u,motionName:this.getTransitionName(),onVisibleChanged:function(t,n){var r=n.key;t||delete e.noticePropsMap[r]}},(function(t){var n=t.key,a=t.className,i=t.style,c=t.visible,u=e.noticePropsMap[n],l=u.props,s=u.holderCallback;return s?r.createElement("div",{key:n,className:hn()(a,"".concat(o,"-hook-holder")),style:ue({},i),ref:function(t){void 0!==n&&(t?(e.hookRefs.set(n,t),s(t,l)):e.hookRefs.delete(n))}}):r.createElement(wr,y({},l,{className:hn()(a,null==l?void 0:l.className),style:ue(ue({},i),null==l?void 0:l.style),visible:c}))})))}}]),n}(r.Component);kr.newInstance=void 0,kr.defaultProps={prefixCls:"rc-notification",animation:"fade",style:{top:65,left:"50%"}},kr.newInstance=function(e,t){var n=e||{},a=n.getContainer,i=ae(n,["getContainer"]),c=document.createElement("div");a?a().appendChild(c):document.body.appendChild(c);var u=!1;o.default.render(r.createElement(kr,y({},i,{ref:function(e){u||(u=!0,t({notice:function(t){e.add(t)},removeNotice:function(t){e.remove(t)},component:e,destroy:function(){o.default.unmountComponentAtNode(c),c.parentNode&&c.parentNode.removeChild(c)},useNotification:function(){return Er(e)}}))}})),c)};const Or=kr,Fr={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};function Sr(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function jr(e){return Math.min(1,Math.max(0,e))}function Mr(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ar(e){return e<=1?100*Number(e)+"%":e}function Nr(e){return 1===e.length?"0"+e:String(e)}function Rr(e,t,n){e=Sr(e,255),t=Sr(t,255),n=Sr(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),a=0,i=0,c=(r+o)/2;if(r===o)i=0,a=0;else{var u=r-o;switch(i=c>.5?u/(2-r-o):u/(r+o),r){case e:a=(t-n)/u+(t1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Tr(e,t,n){e=Sr(e,255),t=Sr(t,255),n=Sr(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),a=0,i=r,c=r-o,u=0===r?0:c/r;if(r===o)a=0;else{switch(r){case e:a=(t-n)/c+(t=60&&Math.round(e.h)<=240?n?Math.round(e.h)-2*t:Math.round(e.h)+2*t:n?Math.round(e.h)+2*t:Math.round(e.h)-2*t)<0?r+=360:r>=360&&(r-=360),r}function Zr(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-.16*t:4===t?e.s+.16:e.s+.05*t)>1&&(r=1),n&&5===t&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function Qr(e,t,n){var r;return(r=n?e.v+.05*t:e.v-.15*t)>1&&(r=1),Number(r.toFixed(2))}function eo(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=qr(e),o=5;o>0;o-=1){var a=Kr(r),i=Gr(qr({h:Jr(a,o,!0),s:Zr(a,o,!0),v:Qr(a,o,!0)}));n.push(i)}n.push(Gr(r));for(var c=1;c<=4;c+=1){var u=Kr(r),l=Gr(qr({h:Jr(u,c),s:Zr(u,c),v:Qr(u,c)}));n.push(l)}return"dark"===t.theme?Yr.map((function(e){var r=e.index,o=e.opacity;return Gr(Xr(qr(t.backgroundColor||"#141414"),qr(n[r]),100*o))})):n}var to={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"},no={},ro={};Object.keys(to).forEach((function(e){no[e]=eo(to[e]),no[e].primary=no[e][5],ro[e]=eo(to[e],{theme:"dark",backgroundColor:"#141414"}),ro[e].primary=ro[e][5]})),no.red,no.volcano,no.gold,no.orange,no.yellow,no.lime,no.green,no.cyan,no.blue,no.geekblue,no.purple,no.magenta,no.grey;var oo="rc-util-key";function ao(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function io(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!On())return null;var r,o=document.createElement("style");(null===(t=n.csp)||void 0===t?void 0:t.nonce)&&(o.nonce=null===(r=n.csp)||void 0===r?void 0:r.nonce),o.innerHTML=e;var a=ao(n),i=a.firstChild;return n.prepend&&a.prepend?a.prepend(o):n.prepend&&i?a.insertBefore(o,i):a.appendChild(o),o}var co=new Map;function uo(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=ao(n);if(!co.has(r)){var o=io("",n),a=o.parentNode;co.set(r,a),a.removeChild(o)}var i,c,u,l=Array.from(co.get(r).children).find((function(e){return"STYLE"===e.tagName&&e[oo]===t}));if(l)return(null===(i=n.csp)||void 0===i?void 0:i.nonce)&&l.nonce!==(null===(c=n.csp)||void 0===c?void 0:c.nonce)&&(l.nonce=null===(u=n.csp)||void 0===u?void 0:u.nonce),l.innerHTML!==e&&(l.innerHTML=e),l;var s=io(e,n);return s[oo]=t,s}function lo(e){return"object"===we(e)&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"===we(e.icon)||"function"==typeof e.icon)}function so(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r=e[n];return"class"===n?(t.className=r,delete t.class):t[n]=r,t}),{})}function fo(e,t,n){return n?r.default.createElement(e.tag,ue(ue({key:t},so(e.attrs)),n),(e.children||[]).map((function(n,r){return fo(n,"".concat(t,"-").concat(e.tag,"-").concat(r))}))):r.default.createElement(e.tag,ue({key:t},so(e.attrs)),(e.children||[]).map((function(n,r){return fo(n,"".concat(t,"-").concat(e.tag,"-").concat(r))})))}function po(e){return eo(e)[0]}function ho(e){return e?Array.isArray(e)?e:[e]:[]}var vo="\n.anticon {\n display: inline-block;\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",mo=["icon","className","onClick","style","primaryColor","secondaryColor"],go={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1},yo=function(e){var t=e.icon,n=e.className,o=e.onClick,a=e.style,i=e.primaryColor,c=e.secondaryColor,u=ae(e,mo),l=go;if(i&&(l={primaryColor:i,secondaryColor:c||po(i)}),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vo,t=(0,r.useContext)(oe).csp;(0,r.useEffect)((function(){uo(e,"@ant-design-icons",{prepend:!0,csp:t})}),[])}(),function(e,t){Oe(e,"[@ant-design/icons] ".concat(t))}(lo(t),"icon should be icon definiton, but got ".concat(t)),!lo(t))return null;var s=t;return s&&"function"==typeof s.icon&&(s=ue(ue({},s),{},{icon:s.icon(l.primaryColor,l.secondaryColor)})),fo(s.icon,"svg-".concat(s.name),ue({className:n,onClick:o,style:a,"data-icon":s.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},u))};yo.displayName="IconReact",yo.getTwoToneColors=function(){return ue({},go)},yo.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;go.primaryColor=t,go.secondaryColor=n||po(t),go.calculated=!!n};const bo=yo;function wo(e){var t=Dt(ho(e),2),n=t[0],r=t[1];return bo.setTwoToneColors({primaryColor:n,secondaryColor:r})}var Eo=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];wo("#1890ff");var xo=r.forwardRef((function(e,t){var n,o=e.className,a=e.icon,i=e.spin,c=e.rotate,u=e.tabIndex,l=e.onClick,s=e.twoToneColor,f=ae(e,Eo),d=r.useContext(oe).prefixCls,p=void 0===d?"anticon":d,h=hn()(p,(ie(n={},"".concat(p,"-").concat(a.name),!!a.name),ie(n,"".concat(p,"-spin"),!!i||"loading"===a.name),n),o),v=u;void 0===v&&l&&(v=-1);var m=c?{msTransform:"rotate(".concat(c,"deg)"),transform:"rotate(".concat(c,"deg)")}:void 0,g=Dt(ho(s),2),y=g[0],b=g[1];return r.createElement("span",ue(ue({role:"img","aria-label":a.name},f),{},{ref:t,tabIndex:v,onClick:l,className:h}),r.createElement(bo,{icon:a,primaryColor:y,secondaryColor:b,style:m}))}));xo.displayName="AntdIcon",xo.getTwoToneColor=function(){var e=bo.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},xo.setTwoToneColor=wo;const Co=xo;var Po=function(e,t){return r.createElement(Co,ue(ue({},e),{},{ref:t,icon:Fr}))};Po.displayName="LoadingOutlined";const ko=r.forwardRef(Po),Oo={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 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"};var Fo=function(e,t){return r.createElement(Co,ue(ue({},e),{},{ref:t,icon:Oo}))};Fo.displayName="ExclamationCircleFilled";const So=r.forwardRef(Fo),jo={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 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"}}]},name:"close-circle",theme:"filled"};var Mo=function(e,t){return r.createElement(Co,ue(ue({},e),{},{ref:t,icon:jo}))};Mo.displayName="CloseCircleFilled";const Ao=r.forwardRef(Mo),No={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 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};var Ro=function(e,t){return r.createElement(Co,ue(ue({},e),{},{ref:t,icon:No}))};Ro.displayName="CheckCircleFilled";const _o=r.forwardRef(Ro),To={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 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};var Io=function(e,t){return r.createElement(Co,ue(ue({},e),{},{ref:t,icon:To}))};Io.displayName="InfoCircleFilled";var $o,Vo,Do,Lo,qo=3,Ho=1,Uo="",zo="move-up",Bo=!1,Wo=!1;function Yo(){return Ho++}function Ko(e,t){var n=e.prefixCls,r=e.getPopupContainer,o=$a(),a=o.getPrefixCls,i=o.getRootPrefixCls,c=o.getIconPrefixCls,u=a("message",n||Uo),l=i(e.rootPrefixCls,u),s=c();if($o)t({prefixCls:u,rootPrefixCls:l,iconPrefixCls:s,instance:$o});else{var f={prefixCls:u,transitionName:Bo?zo:"".concat(l,"-").concat(zo),style:{top:Vo},getContainer:Do||r,maxCount:Lo};Or.newInstance(f,(function(e){$o?t({prefixCls:u,rootPrefixCls:l,iconPrefixCls:s,instance:$o}):($o=e,t({prefixCls:u,rootPrefixCls:l,iconPrefixCls:s,instance:e}))}))}}var Go={info:r.forwardRef(Io),success:_o,error:Ao,warning:So,loading:ko};function Xo(e,t,n){var o,a=void 0!==e.duration?e.duration:qo,i=Go[e.type],c=hn()("".concat(t,"-custom-content"),(ie(o={},"".concat(t,"-").concat(e.type),e.type),ie(o,"".concat(t,"-rtl"),!0===Wo),o));return{key:e.key,duration:a,style:e.style||{},className:e.className,content:r.createElement(La,{iconPrefixCls:n},r.createElement("div",{className:c},e.icon||i&&r.createElement(i,null),r.createElement("span",null,e.content))),onClose:e.onClose,onClick:e.onClick}}var Jo={open:function(e){var t=e.key||Yo(),n=new Promise((function(n){var r=function(){return"function"==typeof e.onClose&&e.onClose(),n(!0)};Ko(e,(function(n){var o=n.prefixCls,a=n.iconPrefixCls;n.instance.notice(Xo(y(y({},e),{key:t,onClose:r}),o,a))}))})),r=function(){$o&&$o.removeNotice(t)};return r.then=function(e,t){return n.then(e,t)},r.promise=n,r},config:function(e){void 0!==e.top&&(Vo=e.top,$o=null),void 0!==e.duration&&(qo=e.duration),void 0!==e.prefixCls&&(Uo=e.prefixCls),void 0!==e.getContainer&&(Do=e.getContainer),void 0!==e.transitionName&&(zo=e.transitionName,$o=null,Bo=!0),void 0!==e.maxCount&&(Lo=e.maxCount,$o=null),void 0!==e.rtl&&(Wo=e.rtl)},destroy:function(e){if($o)if(e)(0,$o.removeNotice)(e);else{(0,$o.destroy)(),$o=null}}};function Zo(e,t){e[t]=function(n,r,o){return function(e){return"[object Object]"===Object.prototype.toString.call(e)&&!!e.content}(n)?e.open(y(y({},n),{type:t})):("function"==typeof r&&(o=r,r=void 0),e.open({content:n,duration:r,type:t,onClose:o}))}}["success","info","warning","error","loading"].forEach((function(e){return Zo(Jo,e)})),Jo.warn=Jo.warning,Jo.useMessage=function(e,t){return function(){var n,o,a=null,i=Dt(Er({add:function(e,t){null==a||a.component.add(e,t)}}),2),c=i[0],u=i[1],l=r.useRef({});return l.current.open=function(r){var i=r.prefixCls,u=n("message",i),l=n(),s=r.key||Yo(),f=new Promise((function(n){var i=function(){return"function"==typeof r.onClose&&r.onClose(),n(!0)};e(y(y({},r),{prefixCls:u,rootPrefixCls:l,getPopupContainer:o}),(function(e){var n=e.prefixCls,o=e.instance;a=o,c(t(y(y({},r),{key:s,onClose:i}),n))}))})),d=function(){a&&a.removeNotice(s)};return d.then=function(e,t){return f.then(e,t)},d.promise=f,d},["success","info","warning","error","loading"].forEach((function(e){return Zo(l.current,e)})),[l.current,r.createElement(xn,{key:"holder"},(function(e){return n=e.getPrefixCls,o=e.getPopupContainer,u}))]}}(Ko,Xo);const Qo=Jo,ea={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}}]},name:"close",theme:"outlined"};var ta=function(e,t){return r.createElement(Co,ue(ue({},e),{},{ref:t,icon:ea}))};ta.displayName="CloseOutlined";const na=r.forwardRef(ta),ra={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"};var oa=function(e,t){return r.createElement(Co,ue(ue({},e),{},{ref:t,icon:ra}))};oa.displayName="CheckCircleOutlined";const aa=r.forwardRef(oa),ia={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M685.4 354.8c0-4.4-3.6-8-8-8l-66 .3L512 465.6l-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155L340.5 670a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3L512 564.4l99.3 118.4 66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.5 515l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z"}},{tag:"path",attrs:{d:"M512 65C264.6 65 64 265.6 64 513s200.6 448 448 448 448-200.6 448-448S759.4 65 512 65zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"close-circle",theme:"outlined"};var ca=function(e,t){return r.createElement(Co,ue(ue({},e),{},{ref:t,icon:ia}))};ca.displayName="CloseCircleOutlined";const ua=r.forwardRef(ca),la={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"};var sa=function(e,t){return r.createElement(Co,ue(ue({},e),{},{ref:t,icon:la}))};sa.displayName="ExclamationCircleOutlined";const fa=r.forwardRef(sa),da={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"};var pa=function(e,t){return r.createElement(Co,ue(ue({},e),{},{ref:t,icon:da}))};pa.displayName="InfoCircleOutlined";var ha,va,ma,ga={},ya=4.5,ba=24,wa=24,Ea="",xa="topRight",Ca=!1;function Pa(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ba,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wa;switch(e){case"topLeft":t={left:0,top:n,bottom:"auto"};break;case"topRight":t={right:0,top:n,bottom:"auto"};break;case"bottomLeft":t={left:0,top:"auto",bottom:r};break;default:t={right:0,top:"auto",bottom:r}}return t}function ka(e,t){var n=e.placement,r=void 0===n?xa:n,o=e.top,a=e.bottom,i=e.getContainer,c=void 0===i?ha:i,u=e.prefixCls,l=$a(),s=l.getPrefixCls,f=l.getIconPrefixCls,d=s("notification",u||Ea),p=f(),h="".concat(d,"-").concat(r),v=ga[h];if(v)Promise.resolve(v).then((function(e){t({prefixCls:"".concat(d,"-notice"),iconPrefixCls:p,instance:e})}));else{var m=hn()("".concat(d,"-").concat(r),ie({},"".concat(d,"-rtl"),!0===Ca));ga[h]=new Promise((function(e){Or.newInstance({prefixCls:d,className:m,style:Pa(r,o,a),getContainer:c,maxCount:ma},(function(n){e(n),t({prefixCls:"".concat(d,"-notice"),iconPrefixCls:p,instance:n})}))}))}}var Oa={success:aa,info:r.forwardRef(pa),error:ua,warning:fa};function Fa(e,t,n){var o=e.duration,a=e.icon,i=e.type,c=e.description,u=e.message,l=e.btn,s=e.onClose,f=e.onClick,d=e.key,p=e.style,h=e.className,v=e.closeIcon,m=void 0===v?va:v,g=void 0===o?ya:o,y=null;a?y=r.createElement("span",{className:"".concat(t,"-icon")},e.icon):i&&(y=r.createElement(Oa[i]||null,{className:"".concat(t,"-icon ").concat(t,"-icon-").concat(i)}));var b=r.createElement("span",{className:"".concat(t,"-close-x")},m||r.createElement(na,{className:"".concat(t,"-close-icon")})),w=!c&&y?r.createElement("span",{className:"".concat(t,"-message-single-line-auto-margin")}):null;return{content:r.createElement(La,{iconPrefixCls:n},r.createElement("div",{className:y?"".concat(t,"-with-icon"):"",role:"alert"},y,r.createElement("div",{className:"".concat(t,"-message")},w,u),r.createElement("div",{className:"".concat(t,"-description")},c),l?r.createElement("span",{className:"".concat(t,"-btn")},l):null)),duration:g,closable:!0,closeIcon:b,onClose:s,onClick:f,key:d,style:p||{},className:hn()(h,ie({},"".concat(t,"-").concat(i),!!i))}}var Sa={open:function(e){ka(e,(function(t){var n=t.prefixCls,r=t.iconPrefixCls;t.instance.notice(Fa(e,n,r))}))},close:function(e){Object.keys(ga).forEach((function(t){return Promise.resolve(ga[t]).then((function(t){t.removeNotice(e)}))}))},config:function(e){var t=e.duration,n=e.placement,r=e.bottom,o=e.top,a=e.getContainer,i=e.closeIcon,c=e.prefixCls;void 0!==c&&(Ea=c),void 0!==t&&(ya=t),void 0!==n?xa=n:e.rtl&&(xa="topLeft"),void 0!==r&&(wa=r),void 0!==o&&(ba=o),void 0!==a&&(ha=a),void 0!==i&&(va=i),void 0!==e.rtl&&(Ca=e.rtl),void 0!==e.maxCount&&(ma=e.maxCount)},destroy:function(){Object.keys(ga).forEach((function(e){Promise.resolve(ga[e]).then((function(e){e.destroy()})),delete ga[e]}))}};["success","info","warning","error"].forEach((function(e){Sa[e]=function(t){return Sa.open(y(y({},t),{type:e}))}})),Sa.warn=Sa.warning,Sa.useNotification=function(e,t){return function(){var n,o=null,a=Dt(Er({add:function(e,t){null==o||o.component.add(e,t)}}),2),i=a[0],c=a[1],u=r.useRef({});return u.current.open=function(r){var a=r.prefixCls,c=n("notification",a);e(y(y({},r),{prefixCls:c}),(function(e){var n=e.prefixCls,a=e.instance;o=a,i(t(r,n))}))},["success","info","warning","error"].forEach((function(e){u.current[e]=function(t){return u.current.open(y(y({},t),{type:e}))}})),[u.current,r.createElement(xn,{key:"holder"},(function(e){return n=e.getPrefixCls,c}))]}}(ka,Fa);const ja=Sa;var Ma,Aa,Na=function(){function e(t,n){var r;if(void 0===t&&(t=""),void 0===n&&(n={}),t instanceof e)return t;"number"==typeof t&&(t=function(e){return{r:e>>16,g:(65280&e)>>8,b:255&e}}(t)),this.originalInput=t;var o=qr(t);this.originalInput=t,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(r=n.format)&&void 0!==r?r:o.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=o.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},e.prototype.getLuminance=function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,r=e.b/255;return.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(e){return this.a=Mr(e),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var e=Tr(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}},e.prototype.toHsvString=function(){var e=Tr(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1===this.a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this.roundA+")"},e.prototype.toHsl=function(){var e=Rr(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}},e.prototype.toHslString=function(){var e=Rr(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1===this.a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this.roundA+")"},e.prototype.toHex=function(e){return void 0===e&&(e=!1),Ir(this.r,this.g,this.b,e)},e.prototype.toHexString=function(e){return void 0===e&&(e=!1),"#"+this.toHex(e)},e.prototype.toHex8=function(e){return void 0===e&&(e=!1),function(e,t,n,r,o){var a=[Nr(Math.round(e).toString(16)),Nr(Math.round(t).toString(16)),Nr(Math.round(n).toString(16)),Nr($r(r))];return o&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this.r,this.g,this.b,this.a,e)},e.prototype.toHex8String=function(e){return void 0===e&&(e=!1),"#"+this.toHex8(e)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return 1===this.a?"rgb("+e+", "+t+", "+n+")":"rgba("+e+", "+t+", "+n+", "+this.roundA+")"},e.prototype.toPercentageRgb=function(){var e=function(e){return Math.round(100*Sr(e,255))+"%"};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var e=function(e){return Math.round(100*Sr(e,255))};return 1===this.a?"rgb("+e(this.r)+"%, "+e(this.g)+"%, "+e(this.b)+"%)":"rgba("+e(this.r)+"%, "+e(this.g)+"%, "+e(this.b)+"%, "+this.roundA+")"},e.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var e="#"+Ir(this.r,this.g,this.b,!1),t=0,n=Object.entries(Lr);t=0;return t||!r||!e.startsWith("hex")&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this.a?this.toName():this.toRgbString()},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=jr(n.l),new e(n)},e.prototype.brighten=function(t){void 0===t&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),new e(n)},e.prototype.darken=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=jr(n.l),new e(n)},e.prototype.tint=function(e){return void 0===e&&(e=10),this.mix("white",e)},e.prototype.shade=function(e){return void 0===e&&(e=10),this.mix("black",e)},e.prototype.desaturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=jr(n.s),new e(n)},e.prototype.saturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=jr(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){void 0===n&&(n=50);var r=this.toRgb(),o=new e(t).toRgb(),a=n/100;return new e({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},e.prototype.analogous=function(t,n){void 0===t&&(t=6),void 0===n&&(n=30);var r=this.toHsl(),o=360/n,a=[this];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(new e(r));return a},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){void 0===t&&(t=6);for(var n=this.toHsv(),r=n.h,o=n.s,a=n.v,i=[],c=1/t;t--;)i.push(new e({h:r,s:o,v:a})),a=(a+c)%1;return i},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,o=[this],a=360/t,i=1;i0&&(S=r.createElement(Kt,{validateMessages:j},o)),u&&(S=r.createElement(sn,{locale:u,_ANT_MARK__:ln},S)),m&&(S=r.createElement(oe.Provider,{value:F},S)),l&&(S=r.createElement(Pn,{size:l},S)),r.createElement(En.Provider,{value:O},S)},Da=function(e){return r.useEffect((function(){e.direction&&(Qo.config({rtl:"rtl"===e.direction}),ja.config({rtl:"rtl"===e.direction}))}),[e.direction]),r.createElement(dn,null,(function(t,n,o){return r.createElement(xn,null,(function(t){return r.createElement(Va,y({parentContext:t,legacyLocale:o},e))}))}))};Da.ConfigContext=En,Da.SizeContext=kn,Da.config=function(e){var t=e.prefixCls,n=e.iconPrefixCls,r=e.theme;void 0!==t&&(Ma=t),void 0!==n&&(Aa=n),r&&function(e,t){var n={},r=function(e,t){var n=e.clone();return(n=(null==t?void 0:t(n))||n).toRgbString()},o=function(e,t){var o=new Na(e),a=eo(o.toRgbString());n["".concat(t,"-color")]=r(o),n["".concat(t,"-color-disabled")]=a[1],n["".concat(t,"-color-hover")]=a[4],n["".concat(t,"-color-active")]=a[7],n["".concat(t,"-color-outline")]=o.clone().setAlpha(.2).toRgbString(),n["".concat(t,"-color-deprecated-bg")]=a[1],n["".concat(t,"-color-deprecated-border")]=a[3]};if(t.primaryColor){o(t.primaryColor,"primary");var a=new Na(t.primaryColor),i=eo(a.toRgbString());i.forEach((function(e,t){n["primary-".concat(t+1)]=e})),n["primary-color-deprecated-l-35"]=r(a,(function(e){return e.lighten(35)})),n["primary-color-deprecated-l-20"]=r(a,(function(e){return e.lighten(20)})),n["primary-color-deprecated-t-20"]=r(a,(function(e){return e.tint(20)})),n["primary-color-deprecated-t-50"]=r(a,(function(e){return e.tint(50)})),n["primary-color-deprecated-f-12"]=r(a,(function(e){return e.setAlpha(.12*e.getAlpha())}));var c=new Na(i[0]);n["primary-color-active-deprecated-f-30"]=r(c,(function(e){return e.setAlpha(.3*e.getAlpha())})),n["primary-color-active-deprecated-d-02"]=r(c,(function(e){return e.darken(2)}))}t.successColor&&o(t.successColor,"success"),t.warningColor&&o(t.warningColor,"warning"),t.errorColor&&o(t.errorColor,"error"),t.infoColor&&o(t.infoColor,"info");var u=Object.keys(n).map((function(t){return"--".concat(e,"-").concat(t,": ").concat(n[t],";")}));uo("\n :root {\n ".concat(u.join("\n"),"\n }\n "),"".concat(Ra,"-dynamic-theme"))}(Ta(),r)};const La=Da;var qa=n(754);function Ha(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:Xa(e)?2:Ja(e)?3:0}function Ya(e,t){return 2===Wa(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ka(e,t,n){var r=Wa(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function Ga(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function Xa(e){return Ci&&e instanceof Map}function Ja(e){return Pi&&e instanceof Set}function Za(e){return e.o||e.t}function Qa(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Ai(e);delete t[Si];for(var n=Mi(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=ti),Object.freeze(e),t&&Ba(e,(function(e,t){return ei(t,!0)}),!0)),e}function ti(){Ha(2)}function ni(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function ri(e){var t=Ni[e];return t||Ha(18,e),t}function oi(){return Ei}function ai(e,t){t&&(ri("Patches"),e.u=[],e.s=[],e.v=t)}function ii(e){ci(e),e.p.forEach(li),e.p=null}function ci(e){e===Ei&&(Ei=e.l)}function ui(e){return Ei={p:[],l:Ei,h:e,m:!0,_:0}}function li(e){var t=e[Si];0===t.i||1===t.i?t.j():t.O=!0}function si(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.g||ri("ES5").S(t,e,r),r?(n[Si].P&&(ii(t),Ha(4)),za(e)&&(e=fi(t,e),t.l||pi(t,e)),t.u&&ri("Patches").M(n[Si],e,t.u,t.s)):e=fi(t,n,[]),ii(t),t.u&&t.v(t.u,t.s),e!==Oi?e:void 0}function fi(e,t,n){if(ni(t))return t;var r=t[Si];if(!r)return Ba(t,(function(o,a){return di(e,r,t,o,a,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return pi(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=Qa(r.k):r.o;Ba(3===r.i?new Set(o):o,(function(t,a){return di(e,r,o,t,a,n)})),pi(e,o,!1),n&&e.u&&ri("Patches").R(r,n,e.u,e.s)}return r.o}function di(e,t,n,r,o,a){if(Ua(o)){var i=fi(e,o,a&&t&&3!==t.i&&!Ya(t.D,r)?a.concat(r):void 0);if(Ka(n,r,i),!Ua(i))return;e.m=!1}if(za(o)&&!ni(o)){if(!e.h.F&&e._<1)return;fi(e,o),t&&t.A.l||pi(e,o)}}function pi(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&ei(t,n)}function hi(e,t){var n=e[Si];return(n?Za(n):e)[t]}function vi(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function mi(e){e.P||(e.P=!0,e.l&&mi(e.l))}function gi(e){e.o||(e.o=Qa(e.t))}function yi(e,t,n){var r=Xa(t)?ri("MapSet").N(t,n):Ja(t)?ri("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:oi(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=r,a=Ri;n&&(o=[r],a=_i);var i=Proxy.revocable(o,a),c=i.revoke,u=i.proxy;return r.k=u,r.j=c,u}(t,n):ri("ES5").J(t,n);return(n?n.A:oi()).p.push(r),r}function bi(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Qa(e)}var wi,Ei,xi="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Ci="undefined"!=typeof Map,Pi="undefined"!=typeof Set,ki="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Oi=xi?Symbol.for("immer-nothing"):((wi={})["immer-nothing"]=!0,wi),Fi=xi?Symbol.for("immer-draftable"):"__$immer_draftable",Si=xi?Symbol.for("immer-state"):"__$immer_state",ji=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),Mi="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Ai=Object.getOwnPropertyDescriptors||function(e){var t={};return Mi(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},Ni={},Ri={get:function(e,t){if(t===Si)return e;var n=Za(e);if(!Ya(n,t))return function(e,t,n){var r,o=vi(t,n);return o?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!za(r)?r:r===hi(e.t,t)?(gi(e),e.o[t]=yi(e.A.h,r,e)):r},has:function(e,t){return t in Za(e)},ownKeys:function(e){return Reflect.ownKeys(Za(e))},set:function(e,t,n){var r=vi(Za(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=hi(Za(e),t),a=null==o?void 0:o[Si];if(a&&a.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(Ga(n,o)&&(void 0!==n||Ya(e.t,t)))return!0;gi(e),mi(e)}return e.o[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==hi(e.t,t)||t in e.t?(e.D[t]=!1,gi(e),mi(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Za(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){Ha(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ha(12)}},_i={};Ba(Ri,(function(e,t){_i[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),_i.deleteProperty=function(e,t){return Ri.deleteProperty.call(this,e[0],t)},_i.set=function(e,t,n){return Ri.set.call(this,e[0],t,n,e[0])};var Ti=function(){function e(e){var t=this;this.g=ki,this.F=!0,this.produce=function(e,n,r){if("function"==typeof e&&"function"!=typeof n){var o=n;n=e;var a=t;return function(e){var t=this;void 0===e&&(e=o);for(var r=arguments.length,i=Array(r>1?r-1:0),c=1;c1?r-1:0),a=1;a=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var o=ri("Patches").$;return Ua(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}(),Ii=new Ti,$i=Ii.produce;Ii.produceWithPatches.bind(Ii),Ii.setAutoFreeze.bind(Ii),Ii.setUseProxies.bind(Ii),Ii.applyPatches.bind(Ii),Ii.createDraft.bind(Ii),Ii.finishDraft.bind(Ii);const Vi=$i;function Di(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Li="function"==typeof Symbol&&Symbol.observable||"@@observable",qi=function(){return Math.random().toString(36).substring(7).split("").join(".")},Hi={INIT:"@@redux/INIT"+qi(),REPLACE:"@@redux/REPLACE"+qi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+qi()}};function Ui(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function zi(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Di(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Di(1));return n(zi)(e,t)}if("function"!=typeof e)throw new Error(Di(2));var o=e,a=t,i=[],c=i,u=!1;function l(){c===i&&(c=i.slice())}function s(){if(u)throw new Error(Di(3));return a}function f(e){if("function"!=typeof e)throw new Error(Di(4));if(u)throw new Error(Di(5));var t=!0;return l(),c.push(e),function(){if(t){if(u)throw new Error(Di(6));t=!1,l();var n=c.indexOf(e);c.splice(n,1),i=null}}}function d(e){if(!Ui(e))throw new Error(Di(7));if(void 0===e.type)throw new Error(Di(8));if(u)throw new Error(Di(9));try{u=!0,a=o(a,e)}finally{u=!1}for(var t=i=c,n=0;n=0;t--){var o=e[t][Si];if(!o.P)switch(o.i){case 5:r(o)&&mi(o);break;case 4:n(o)&&mi(o)}}}function n(e){for(var t=e.t,n=e.k,r=Mi(n),o=r.length-1;o>=0;o--){var a=r[o];if(a!==Si){var i=t[a];if(void 0===i&&!Ya(t,a))return!0;var c=n[a],u=c&&c[Si];if(u?u.t!==i:!Ga(c,i))return!0}}var l=!!t[Si];return r.length!==Mi(t).length+(l?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!n||n.get)}var o={};!function(e,t){Ni[e]||(Ni[e]=t)}("ES5",{J:function(t,n){var r=Array.isArray(t),o=function(t,n){if(t){for(var r=Array(n.length),o=0;o0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t{"use strict";var r=n(864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function u(e){return r.isMemo(e)?i:c[e.$$typeof]||o}c[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[r.Memo]=i;var l=Object.defineProperty,s=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var i=s(n);f&&(i=i.concat(f(n)));for(var c=u(t),v=u(n),m=0;m{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"}},369:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={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:"下一世纪"}},921:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,s=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,v=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case s:case f:case a:case c:case i:case p:return e;default:switch(e=e&&e.$$typeof){case l:case d:case m:case v:case u:return e;default:return t}}case o:return t}}}function x(e){return E(e)===f}t.AsyncMode=s,t.ConcurrentMode=f,t.ContextConsumer=l,t.ContextProvider=u,t.Element=r,t.ForwardRef=d,t.Fragment=a,t.Lazy=m,t.Memo=v,t.Portal=o,t.Profiler=c,t.StrictMode=i,t.Suspense=p,t.isAsyncMode=function(e){return x(e)||E(e)===s},t.isConcurrentMode=x,t.isContextConsumer=function(e){return E(e)===l},t.isContextProvider=function(e){return E(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return E(e)===d},t.isFragment=function(e){return E(e)===a},t.isLazy=function(e){return E(e)===m},t.isMemo=function(e){return E(e)===v},t.isPortal=function(e){return E(e)===o},t.isProfiler=function(e){return E(e)===c},t.isStrictMode=function(e){return E(e)===i},t.isSuspense=function(e){return E(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===f||e===c||e===i||e===p||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===u||e.$$typeof===l||e.$$typeof===d||e.$$typeof===y||e.$$typeof===b||e.$$typeof===w||e.$$typeof===g)},t.typeOf=E},864:(e,t,n)=>{"use strict";e.exports=n(921)},666:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),i=new S(r||[]);return a._invoke=function(e,t,n){var r=f;return function(o,a){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw a;return M()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var c=k(i,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=s(e,t,n);if("normal"===u.type){if(r=n.done?h:d,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=h,n.method="throw",n.arg=u.arg)}}}(e,n,i),a}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",p="executing",h="completed",v={};function m(){}function g(){}function y(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(j([])));E&&E!==n&&r.call(E,a)&&(b=E);var x=y.prototype=m.prototype=Object.create(b);function C(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(o,a,i,c){var u=s(e[o],e,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){l.value=e,i(l)}),(function(e){return n("throw",e,i,c)}))}c(u.arg)}var o;this._invoke=function(e,r){function a(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(a,a):a()}}function k(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,k(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=s(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function F(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(u&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),F(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;F(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:j(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},954:e=>{"use strict";e.exports=n},493:e=>{"use strict";e.exports=r}},a={};function i(e){var t=a[e];if(void 0!==t){if(void 0!==t.error)throw t.error;return t.exports}var n=a[e]={exports:{}};try{var r={id:e,module:n,factory:o[e],require:i};i.i.forEach((function(e){e(r)})),n=r.module,r.factory.call(n.exports,n,n.exports,r.require)}catch(e){throw n.error=e,e}return n.exports}return i.m=o,i.c=a,i.i=[],i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.hu=e=>e+"."+i.h()+".hot-update.js",i.hmrF=()=>"main."+i.h()+".hot-update.json",i.h=()=>"6380a008de2599d15d98",i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="single-spa-app:",i.l=(n,r,o,a)=>{if(e[n])e[n].push(r);else{var c,u;if(void 0!==o)for(var l=document.getElementsByTagName("script"),s=0;s{c.onerror=c.onload=null,clearTimeout(p);var o=e[n];if(delete e[n],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach((e=>e(r))),t)return t(r)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=d.bind(null,c.onerror),c.onload=d.bind(null,c.onload),u&&document.head.appendChild(c)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e,t,n,r,o={},a=i.c,c=[],u=[],l="idle";function s(e){l=e;for(var t=[],n=0;n0)return s("abort").then((function(){throw o[0]}));var a=s("dispose");t.forEach((function(e){e.dispose&&e.dispose()}));var i,c=s("apply"),u=function(e){i||(i=e)},l=[];return t.forEach((function(e){if(e.apply){var t=e.apply(u);if(t)for(var n=0;n=0&&y._disposeHandlers.splice(t,1)},invalidate:function(){switch(this._selfInvalidated=!0,l){case"idle":n=[],Object.keys(i.hmrI).forEach((function(e){i.hmrI[e](v,n)})),s("ready");break;case"ready":Object.keys(i.hmrI).forEach((function(e){i.hmrI[e](v,n)}));break;case"prepare":case"check":case"dispose":case"apply":(r=r||[]).push(v)}},check:d,apply:p,status:function(e){if(!e)return l;u.push(e)},addStatusHandler:function(e){u.push(e)},removeStatusHandler:function(e){var t=u.indexOf(e);t>=0&&u.splice(t,1)},data:o[v]},e=void 0,y),b.parents=c,b.children=[],c=[],h.require=w})),i.hmrC={},i.hmrI={}})(),i.p="/",(()=>{var e,t,n,r,o=i.hmrS_jsonp=i.hmrS_jsonp||{179:0},a={};function c(e){return new Promise(((t,n)=>{a[e]=t;var r=i.p+i.hu(e),o=new Error;i.l(r,(t=>{if(a[e]){a[e]=void 0;var r=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src;o.message="Loading hot update chunk "+e+" failed.\n("+r+": "+i+")",o.name="ChunkLoadError",o.type=r,o.request=i,n(o)}}))}))}function u(a){function c(e){for(var t=[e],n={},r=t.map((function(e){return{chain:[e],id:e}}));r.length>0;){var o=r.pop(),a=o.id,c=o.chain,l=i.c[a];if(l&&(!l.hot._selfAccepted||l.hot._selfInvalidated)){if(l.hot._selfDeclined)return{type:"self-declined",chain:c,moduleId:a};if(l.hot._main)return{type:"unaccepted",chain:c,moduleId:a};for(var s=0;s ")),h.type){case"self-declined":a.onDeclined&&a.onDeclined(h),a.ignoreDeclined||(m=new Error("Aborted because of self decline: "+h.moduleId+b));break;case"declined":a.onDeclined&&a.onDeclined(h),a.ignoreDeclined||(m=new Error("Aborted because of declined dependency: "+h.moduleId+" in "+h.parentId+b));break;case"unaccepted":a.onUnaccepted&&a.onUnaccepted(h),a.ignoreUnaccepted||(m=new Error("Aborted because "+p+" is not accepted"+b));break;case"accepted":a.onAccepted&&a.onAccepted(h),g=!0;break;case"disposed":a.onDisposed&&a.onDisposed(h),y=!0;break;default:throw new Error("Unexception type "+h.type)}if(m)return{error:m};if(g)for(p in f[p]=v,u(s,h.outdatedModules),h.outdatedDependencies)i.o(h.outdatedDependencies,p)&&(l[p]||(l[p]=[]),u(l[p],h.outdatedDependencies[p]));y&&(u(s,[h.moduleId]),f[p]=d)}t=void 0;for(var w,E=[],x=0;x0;){var a=r.pop(),c=i.c[a];if(c){var u={},f=c.hot._disposeHandlers;for(x=0;x=0&&d.parents.splice(e,1)}}}for(var p in l)if(i.o(l,p)&&(c=i.c[p]))for(w=l[p],x=0;x=0&&c.children.splice(e,1)},apply:function(e){for(var t in f)i.o(f,t)&&(i.m[t]=f[t]);for(var n=0;n{for(var c in n)i.o(n,c)&&(t[c]=n[c]);o&&r.push(o),a[e]&&(a[e](),a[e]=void 0)},i.hmrI.jsonp=function(e,o){t||(t={},r=[],n=[],o.push(u)),i.o(t,e)||(t[e]=i.m[e])},i.hmrC.jsonp=function(a,l,s,f,d,p){d.push(u),e={},n=l,t=s.reduce((function(e,t){return e[t]=!1,e}),{}),r=[],a.forEach((function(t){i.o(o,t)&&void 0!==o[t]&&(f.push(c(t)),e[t]=!0)})),i.f&&(i.f.jsonpHmr=function(t,n){e&&!i.o(e,t)&&i.o(o,t)&&void 0!==o[t]&&(n.push(c(t)),e[t]=!0)})},i.hmrM=()=>{if("undefined"==typeof fetch)throw new Error("No browser support: need fetch API");return fetch(i.p+i.hmrF()).then((e=>{if(404!==e.status){if(!e.ok)throw new Error("Failed to fetch update manifest "+e.statusText);return e.json()}}))}})(),i(210)})())}}}));
3 | //# sourceMappingURL=main.js.map
--------------------------------------------------------------------------------
/package/portal/public/project2/main.js.LICENSE.txt:
--------------------------------------------------------------------------------
1 | /*!
2 | Copyright (c) 2018 Jed Watson.
3 | Licensed under the MIT License (MIT), see
4 | http://jedwatson.github.io/classnames
5 | */
6 |
7 | /**
8 | * React Router v6.2.1
9 | *
10 | * Copyright (c) Remix Software Inc.
11 | *
12 | * This source code is licensed under the MIT license found in the
13 | * LICENSE.md file in the root directory of this source tree.
14 | *
15 | * @license MIT
16 | */
17 |
18 | /** @license React v16.13.1
19 | * react-is.production.min.js
20 | *
21 | * Copyright (c) Facebook, Inc. and its affiliates.
22 | *
23 | * This source code is licensed under the MIT license found in the
24 | * LICENSE file in the root directory of this source tree.
25 | */
26 |
--------------------------------------------------------------------------------
/package/portal/single-spa-config/build-single-spa.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 注册用不同框架为主单页应用开发的每个部分。
3 | * 每调用一次 registerApplication 都会注册一个新的应用,它接受三个参数:
4 | 应用的名称
5 | 要加载的函数(要加载的入口点)
6 | 用来激活的函数(用于告知是否加载应用的逻辑)
7 | */
8 |
9 | import { registerApplication, start } from 'single-spa'
10 |
11 | /**
12 | * 子应用入口js拉取 这里我们将各个子应用打包后的js放入到public中来mock线上的环境
13 | */
14 |
15 | registerApplication(
16 | 'project1',
17 | // @ts-ignore
18 | () => System.import('/project1/js/main.js'),
19 | () => location.pathname.startsWith('/project1') ? true : false
20 | );
21 |
22 | registerApplication(
23 | 'project2',
24 | // @ts-ignore
25 | () => System.import('/project2/main.js'),
26 | () => location.pathname.startsWith('/project2') ? true : false
27 | );
28 |
29 | start();
--------------------------------------------------------------------------------
/package/portal/single-spa-config/dev-single-spa.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 注册用不同框架为主单页应用开发的每个部分。
3 | * 每调用一次 registerApplication 都会注册一个新的应用,它接受三个参数:
4 | 应用的名称
5 | 要加载的函数(要加载的入口点)
6 | 用来激活的函数(用于告知是否加载应用的逻辑)
7 | */
8 |
9 | import { registerApplication, start } from 'single-spa'
10 | /**
11 | * 子应用入口js拉取 这里我们将各个子应用打包后的js放入到public中来mock线上的环境
12 | * 如果你需要root本地开发 联调某个子应用时,可以通过import项目入口文件的方式
13 | */
14 | registerApplication(
15 | 'project1',
16 | // () => import('../../project1/entry.js'), // 本地开发 root 联调 project1项目时
17 | // () => System.import('project1'), // 在index.html中标注清楚
18 | //
27 | // @ts-ignore
28 | // () => System.import('/project1/js/main.js'),
29 | () => System.import('project1'),
30 | () => location.pathname.startsWith('/project1') ? true : false
31 | );
32 |
33 | registerApplication(
34 | 'project2',
35 | // () => import('../../project2/entry.js'),
36 | // @ts-ignore
37 | () => System.import('/project2/main.js'),
38 | () => location.pathname.startsWith('/project2') ? true : false
39 | );
40 | start();
--------------------------------------------------------------------------------
/package/portal/single-spa-config/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 全部本地加载(包括子应用)
3 | *
4 | * 对于大多数开发而言,我们只关注此应用本身, 所以我们只需要要引入build-single-spa.config即可
5 | */
6 | if(process.env.NODE_ENV === 'development') {
7 | import('./dev-single-spa.config')
8 | } else {
9 | import('./build-single-spa.config')
10 | }
--------------------------------------------------------------------------------
/package/portal/src/Layout/index.js:
--------------------------------------------------------------------------------
1 | import React, { useState } from 'react'
2 | import { Layout } from 'antd';
3 | import { Link } from 'react-router-dom'
4 | import {
5 | MenuUnfoldOutlined,
6 | MenuFoldOutlined,
7 | } from '@ant-design/icons';
8 | import './index.less';
9 |
10 | const { Header, Sider, Content } = Layout;
11 | function App() {
12 | const [collapsed, setCollapse] = useState(false)
13 | return (
14 |
15 |
16 |
17 |
18 |
19 |
20 | project1
21 |
22 |
23 | project2
24 |
25 |
26 |
27 |
28 |
29 | {React.createElement(collapsed ? MenuUnfoldOutlined : MenuFoldOutlined, {
30 | className: 'trigger',
31 | onClick: () => { setCollapse(!collapsed) },
32 | })}
33 |
34 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | );
49 | }
50 | export default App;
--------------------------------------------------------------------------------
/package/portal/src/Layout/index.less:
--------------------------------------------------------------------------------
1 | .App {
2 | .ant-layout-has-sider {
3 | height: 100vh;
4 | }
5 |
6 | .trigger {
7 | font-size: 18px;
8 | line-height: 50px;
9 | padding: 0 24px;
10 | cursor: pointer;
11 | transition: color 0.3s;
12 | }
13 |
14 | .trigger:hover {
15 | color: #1890ff;
16 | }
17 |
18 | .logo {
19 | height: 32px;
20 | background: rgba(255, 255, 255, 0.2);
21 | margin: 16px;
22 | }
23 |
24 | .site-layout .site-layout-background {
25 | background: #fff;
26 | }
27 |
28 | ul {
29 | width: 100%;
30 | text-align: center;
31 |
32 | li {
33 | height: 40px;
34 | line-height: 40px;
35 | a{
36 | display: block;
37 | }
38 | :hover {
39 | cursor: pointer;
40 | color: #fff;
41 | }
42 | }
43 | }
44 | }
45 |
46 | a {
47 | color: rgba(255, 255, 255, 0.65);
48 | }
49 |
50 | .ant-menu-item:hover a {
51 | color: rgba(255, 255, 255) !important;
52 | }
--------------------------------------------------------------------------------
/package/portal/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
4 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
5 | sans-serif;
6 | -webkit-font-smoothing : antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
12 | monospace;
13 | }
14 |
15 | body,
16 | p,
17 | h1,
18 | h2,
19 | h3,
20 | h4,
21 | h5,
22 | h6,
23 | ul,
24 | ol,
25 | dl,
26 | li,
27 | dt,
28 | dd {
29 | /* 默认有边距,都要清除 */
30 | margin: 0;
31 | padding: 0;
32 | /*字体设置*/
33 | font-size: 14px;
34 | font-family: "Microsoft Yahei", sans-serif;
35 | color: #ccc;
36 | /* 去掉列表的原点 */
37 | list-style: none;
38 | /* 默认鼠标 */
39 | cursor: default;
40 | }
41 |
42 | /*可选*/
43 | html,
44 | body {
45 | width: 100%;
46 | height: 100%;
47 | /* font-size: 100px !important; */
48 | }
49 |
50 | /*行内块元素*/
51 | input,
52 | img {
53 | margin: 0;
54 | padding: 0;
55 | border: 0 none;
56 | outline-style: none;
57 | vertical-align: bottom;
58 | }
59 |
60 | /*行内元素*/
61 | a,
62 | a:active,
63 | a:visited {
64 | /*下划线和颜色*/
65 | text-decoration: none;
66 | color: #ccc;
67 | }
68 |
69 | a:hover {
70 | color: #333;
71 | }
72 |
73 | textarea {
74 | /* 边框清零 */
75 | border: none;
76 | /* 轮廓线清零 */
77 | outline: none;
78 | /* 防止文本域被随意拖拽 */
79 | resize: none;
80 | }
81 |
82 | i {
83 | /*文字样式*/
84 | font-style: normal;
85 | }
86 |
87 | table {
88 | /*边框合并*/
89 | border-collapse: collapse;
90 | border-spacing: 0;
91 | }
92 |
93 |
94 | /* 使用伪元素清除浮动 */
95 | .clearfix::before,
96 | .clearfix::after {
97 | content: "";
98 | height: 0;
99 | line-height: 0;
100 | display: block;
101 | visibility: none;
102 | clear: both;
103 | }
104 |
105 | .clearfix {
106 | *zoom: 1;
107 | }
108 |
109 | /* 版心*/
110 | .w {
111 | width: 1883px;
112 | margin: 0 auto;
113 | }
114 |
115 | #console-basic {
116 | position: fixed;
117 | height: 50px;
118 | width: 100%;
119 | top: 0;
120 | z-index: 100;
121 | /* background: lime; */
122 | }
--------------------------------------------------------------------------------
/package/portal/src/index.js:
--------------------------------------------------------------------------------
1 |
2 | import React from 'react';
3 | import ReactDOM from 'react-dom';
4 | import 'antd/dist/antd.css';
5 | import './index.css';
6 | import Layout from './Layout';
7 | import { BrowserRouter } from 'react-router-dom';
8 | import "../single-spa-config"; // 引入微前端配置文件;
9 |
10 | ReactDOM.render(
11 |
12 |
13 | ,
14 | document.getElementById('root')
15 | );
--------------------------------------------------------------------------------
/package/portal/webpack.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const webpack = require('webpack');
3 | const HtmlWebpackPlugin = require('html-webpack-plugin')
4 | const { CleanWebpackPlugin } = require('clean-webpack-plugin');
5 |
6 | module.exports = {
7 | mode: 'development',
8 | entry: {
9 | main: './src/index.js'
10 | },
11 | output: {
12 | publicPath: '/',
13 | filename: '[name].js',
14 | path: path.resolve(__dirname, 'dist'),
15 | },
16 | module: {
17 | rules: [
18 | {
19 | test: /\.(le|c)ss$/,
20 | use: ['style-loader', 'css-loader', 'less-loader']
21 | }, {
22 | test: /\.js$/,
23 | exclude: [/node_modules/],
24 | loader: 'babel-loader',
25 | options: { presets: ['@babel/env','@babel/preset-react'] },
26 | },
27 | ],
28 | },
29 | resolve: {
30 | modules: [path.resolve(__dirname, 'node_modules')],
31 | alias: {
32 | "@": path.resolve(__dirname, "./src"),
33 | },
34 | },
35 | plugins: [
36 | new CleanWebpackPlugin(),
37 | new HtmlWebpackPlugin({
38 | template: './public/index.html',
39 | filename: 'index.html'
40 | }),
41 | ],
42 | devtool: 'source-map',
43 | externals: [],
44 | devServer: {
45 | historyApiFallback: true,
46 | static: {
47 | directory: path.join(__dirname, 'public'),
48 | staticOptions: {},
49 | // Don't be confused with `devMiddleware.publicPath`, it is `publicPath` for static directory
50 | // Can be:
51 | // publicPath: ['/static-public-path-one/', '/static-public-path-two/'],
52 | publicPath: "/",
53 | // Can be:
54 | // serveIndex: {} (options for the `serveIndex` option you can find https://github.com/expressjs/serve-index)
55 | serveIndex: true,
56 | // Can be:
57 | // watch: {} (options for the `watch` option you can find https://github.com/paulmillr/chokidar)
58 | watch: true,
59 | },
60 | proxy: {
61 | '/api': 'http://localhost:5000'
62 | },
63 | // hotOnly: true,
64 | hot: true,
65 | open: true,
66 | }
67 | };
--------------------------------------------------------------------------------
/package/project1/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["@babel/preset-env", {
4 | "targets": {
5 | "browsers": ["last 2 versions"]
6 | }
7 | }],
8 | ["@babel/preset-react"]
9 | ],
10 | "plugins": [
11 | "@babel/plugin-syntax-dynamic-import",
12 | "@babel/plugin-proposal-object-rest-spread",
13 | "@babel/plugin-syntax-jsx"
14 | ]
15 | }
--------------------------------------------------------------------------------
/package/project1/README.md:
--------------------------------------------------------------------------------
1 | single-spa-react-redux-toolkit/project1
2 |
3 |
4 |
5 | single-spa-react-redux-toolkit:
6 | react+single-spa-react+@reduxjs/toolkit 🚀🚀🚀, single-spa-react微前端结合状态管理库reduxjs/toolkit!并且增加了基座,可以让你每个子应用单独发布单独上线!!
7 |
8 | [](https://github.com/single-spa-react/single-spa-react-redux-toolkit#readme) [](https://github.com/single-spa-react/single-spa-react-redux-toolkit/graphs/commit-activity) [](https://github.com/single-spa-react/single-spa-react-redux-toolkit/blob/master/LICENSE)
9 |
10 |
11 |
12 | ## ⌨️ 本地开发
13 |
14 | ```bash
15 | $ git clone git@github.com:single-spa-react/single-spa-react-redux-toolkit.git
16 | $ cd single-spa-react-redux-toolkit
17 | $ cd project1
18 | $ npm install
19 | $ npm start
20 | ```
21 |
22 | 打开浏览器访问 http://127.0.0.1:8080/project1/。
23 |
24 | ## 相关资料:
25 | 1,项目依赖包梳理:https://segmentfault.com/a/1190000019006667
26 |
27 | ## 相关推广
28 |
29 | 1. https://github.com/xlei1123/daymanage
30 | > 这是一个使用 umi 开发的项目,想学习 umi 的新手可以学习一下
31 | 2. https://github.com/xlei1123/dtext
32 | > 前端文案默认值处理利器,统一定制修改,同时支持使用时特殊指定
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/package/project1/entry.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import singleSpaReact from 'single-spa-react';
4 | import App from './src/app.js';
5 |
6 |
7 | let reactLifecycle={};
8 |
9 | if (process.env.NODE_ENV === 'development') {
10 | // 本地开发 加载一些资源, 生产环境中统一由基座拉取
11 | // @ts-ignore
12 | import ('antd/dist/antd.css');
13 | ReactDOM.render( , document.getElementById('project1'));
14 | } else {
15 | function domElementGetter() {
16 | return document.getElementById('project1')
17 | }
18 | reactLifecycle = singleSpaReact({
19 | React,
20 | ReactDOM,
21 | rootComponent: App, // function/class Component (函数或者类组件)
22 | domElementGetter,
23 | });
24 | }
25 |
26 | export const bootstrap = [
27 | reactLifecycle.bootstrap,
28 | ];
29 |
30 | export const mount = [
31 | reactLifecycle.mount,
32 | ];
33 |
34 | export const unmount = [
35 | reactLifecycle.unmount,
36 | ];
37 |
38 |
39 |
--------------------------------------------------------------------------------
/package/project1/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "single-spa-app",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "cross-env NODE_ENV=development webpack serve --config webpack/webpack.config.dev.js",
8 | "build": "cross-env NODE_ENV=production webpack --config webpack/webpack.config.pro.js"
9 | },
10 | "keywords": [],
11 | "author": "",
12 | "license": "ISC",
13 | "dependencies": {
14 | "@babel/runtime": "^7.16.7",
15 | "@reduxjs/toolkit": "^1.7.1",
16 | "antd": "^4.18.2",
17 | "dva": "^2.6.0-beta.20",
18 | "react": "^17.0.2",
19 | "react-dom": "^17.0.2",
20 | "react-redux": "^7.2.6",
21 | "react-router-dom": "^6.2.1",
22 | "single-spa": "^5.9.3",
23 | "single-spa-react": "^4.6.0"
24 | },
25 | "devDependencies": {
26 | "@babel/core": "^7.16.7",
27 | "@babel/plugin-proposal-object-rest-spread": "^7.16.7",
28 | "@babel/plugin-syntax-dynamic-import": "^7.8.3",
29 | "@babel/preset-env": "^7.16.7",
30 | "@babel/preset-react": "^7.16.7",
31 | "babel-loader": "^8.2.3",
32 | "clean-webpack-plugin": "^4.0.0",
33 | "copy-webpack-plugin": "^10.2.4",
34 | "css-loader": "^6.5.1",
35 | "css-minimizer-webpack-plugin": "^3.4.1",
36 | "less": "^4.1.2",
37 | "less-loader": "^10.2.0",
38 | "mini-css-extract-plugin": "^2.5.3",
39 | "style-loader": "^3.3.1",
40 | "html-webpack-plugin": "^5.3.2",
41 | "webpack": "^5.63.0",
42 | "webpack-cli": "^4.7.2",
43 | "webpack-dev-server": "^4.2.1"
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/package/project1/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Document
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/package/project1/src/app.js:
--------------------------------------------------------------------------------
1 | // import React from "react"
2 |
3 | // const App = () => Hello from project1
4 | // console.log(123456);
5 | // export default App
6 |
7 | import React from 'react';
8 | import { Provider } from 'react-redux';
9 | import { Route, BrowserRouter, Routes } from 'react-router-dom';
10 | import { ConfigProvider } from 'antd';
11 | import zhCN from 'antd/lib/locale-provider/zh_CN';
12 | import routes from './routes';
13 | import store from './models/store';
14 |
15 | const renderApp = () =>
16 |
17 |
18 |
19 | {routes.map((route, index) => (
20 |
23 | ))}
24 |
25 |
26 |
27 | ;
28 |
29 | export default renderApp;
30 |
--------------------------------------------------------------------------------
/package/project1/src/assets/a.text:
--------------------------------------------------------------------------------
1 | 111
--------------------------------------------------------------------------------
/package/project1/src/models/global/index.js:
--------------------------------------------------------------------------------
1 | import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
2 |
3 | const namespace = 'global';
4 |
5 |
6 | export const fetchXxx = createAsyncThunk(`${namespace}/xxx`, async () => {
7 | // 接口请求,你的逻辑等等
8 | return {
9 | name: 'single-spa-react-redux-toolkit',
10 | age: 4
11 | }
12 | });
13 |
14 | const initialState = {
15 | user: {
16 | name: 'single-spa-react',
17 | age: '3',
18 | },
19 | loading: false,
20 | }
21 |
22 | // 创建带有命名空间的reducer
23 | const stateSlice = createSlice({
24 | name: namespace,
25 | initialState,
26 | reducers: {},
27 | extraReducers: (builder) => {
28 | builder
29 | .addCase(fetchXxx.pending, (state) => {
30 | state.loading = true;
31 | })
32 | .addCase(fetchXxx.fulfilled, (state, { payload }) => ({
33 | loading: false,
34 | user: {
35 | ...state.user,
36 | ...payload,
37 | }
38 |
39 | }))
40 | .addCase(fetchXxx.rejected, (state) => {
41 | state.loading = false;
42 | });
43 | },
44 | });
45 |
46 | export const selectGlobal = (state) => state.global;
47 | export default stateSlice.reducer;
48 |
--------------------------------------------------------------------------------
/package/project1/src/models/store.js:
--------------------------------------------------------------------------------
1 | import { configureStore, combineReducers } from '@reduxjs/toolkit';
2 | import { useSelector, useDispatch } from 'react-redux';
3 |
4 | import global from './global';
5 |
6 | const reducer = combineReducers({
7 | global,
8 | });
9 |
10 | const store = configureStore({
11 | reducer,
12 | });
13 |
14 |
15 | export const useAppDispatch = () => useDispatch();
16 | export const useAppSelector = useSelector;
17 |
18 | export default store;
19 |
--------------------------------------------------------------------------------
/package/project1/src/pages/home.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Button } from 'antd';
3 | import { useAppDispatch, useAppSelector } from '../models/store';
4 | import { fetchXxx, selectGlobal } from '../models/global';
5 |
6 | const Home = () => {
7 | const { user } = useAppSelector(selectGlobal);
8 | const dispatch = useAppDispatch();
9 | const toggleUser = async () => {
10 | await dispatch(fetchXxx());
11 | }
12 | return
13 |
Hello from project1, {user.name}
14 | 切换用户
15 |
16 |
17 | };
18 |
19 | export default React.memo(Home);
--------------------------------------------------------------------------------
/package/project1/src/routes.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Home from './pages/home';
3 |
4 | export default [
5 | {
6 | routeKey: '/project1',
7 | exact: true,
8 | path: '/project1',
9 | element: ,
10 | }
11 | ]
--------------------------------------------------------------------------------
/package/project1/webpack/webpack.config.base.js:
--------------------------------------------------------------------------------
1 | const { CleanWebpackPlugin } = require('clean-webpack-plugin');
2 | const webpack = require('webpack');
3 | const CopyWebpackPlugin = require('copy-webpack-plugin'); //拷贝资源文件
4 | const path = require('path');
5 | const config = {
6 | resolve: {
7 | //识别扩展文件名
8 | extensions: ['*', '.js', '.jsx', '.json'],
9 | alias: {
10 | "@": path.resolve(__dirname, "../src"),
11 | }
12 | },
13 | entry: {
14 | main: path.resolve(__dirname, '../entry.js'),
15 | },
16 | output: {
17 | //输出目录
18 | path: path.resolve(__dirname, '../dist'),
19 | publicPath: '/',
20 | filename: 'js/[name].js',
21 | chunkFilename: 'js/[name].js',
22 | libraryTarget: process.env.NODE_ENV === 'production' ? 'system': ''
23 | },
24 | plugins: [
25 | new CopyWebpackPlugin({
26 | patterns: [
27 | {
28 | from: path.resolve(__dirname, '../src/assets'),
29 | to: path.resolve(__dirname, '../dist/assets'),
30 | // ignore: ['.*']
31 | }
32 | ]
33 | }),
34 | new CleanWebpackPlugin()
35 | ],
36 | module: {
37 | rules: [
38 | {
39 | test: /\.js?$/,
40 | exclude: /node_modules/,
41 | use: [{ loader: 'babel-loader', options: { cacheDirectory: true } }]
42 | },
43 | {
44 | test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
45 | type: 'asset/inline',
46 | generator: {
47 | filename: '[name].[ext]'
48 | }
49 | // use: [
50 | // {
51 | // loader: 'url-loader',
52 | // options: {
53 | // limit: 10000,
54 | // mimetype: 'image/svg+xml',
55 | // name: '[name].[ext]'
56 | // }
57 | // }
58 | // ]
59 | },
60 | {
61 | test: /\.(jpe?g|png|gif|ico)$/i,
62 | type: 'asset/resource',
63 | generator: {
64 | filename: '[name].[ext]'
65 | }
66 | // use: [
67 | // {
68 | // // loader: 'file-loader',
69 | // type: 'asset/resource',
70 | // generator: {
71 | // filename: 'assets/[hash][ext][query]'
72 | // }
73 | // // options: {
74 | // // name: '[name].[ext]'
75 | // // }
76 | // }
77 | // ]
78 | },
79 | {
80 | test: /\.css|\.less$/,
81 | // exclude: /node_modules/,
82 | use: [
83 | {
84 | loader: 'css-loader',
85 | options: {
86 | // minimize: true,
87 | sourceMap: false
88 | // importLoaders: 2,
89 | // modules: true,
90 | // // namedExport: true, // this is invalid Options ,I find it
91 | // camelCase: true,
92 | // localIdentName: '[path][name]__[local]--[hash:base64:5]',
93 | }
94 | }, {
95 | loader: 'less-loader',
96 | options: {
97 | lessOptions: {
98 | paths: [path.resolve(__dirname, '../src'), path.resolve(__dirname, '../node_modules')],
99 | javascriptEnabled: true,
100 | sourceMap: false
101 | }
102 | }
103 | }
104 | ]
105 | }
106 | ]
107 | },
108 | };
109 | module.exports = config;
110 |
--------------------------------------------------------------------------------
/package/project1/webpack/webpack.config.dev.js:
--------------------------------------------------------------------------------
1 | const webpack = require('webpack');
2 | const path = require('path');
3 | const HtmlWebpackPlugin = require('html-webpack-plugin'); //生成html并注入
4 | const { merge } = require('webpack-merge');
5 | const base = require('./webpack.config.base.js');
6 | const config = {
7 | devtool: 'eval', // 调试工具
8 | mode: "development",
9 | devServer: {
10 | static: {
11 | directory: path.join(__dirname, "../public/"),
12 | staticOptions: {},
13 | // Don't be confused with `devMiddleware.publicPath`, it is `publicPath` for static directory
14 | // Can be:
15 | // publicPath: ['/static-public-path-one/', '/static-public-path-two/'],
16 | publicPath: "/",
17 | // Can be:
18 | // serveIndex: {} (options for the `serveIndex` option you can find https://github.com/expressjs/serve-index)
19 | serveIndex: true,
20 | // Can be:
21 | // watch: {} (options for the `watch` option you can find https://github.com/paulmillr/chokidar)
22 | watch: true,
23 | },
24 | port: 3005,
25 | historyApiFallback: true,
26 | proxy: {
27 | '/api': 'http://localhost:5000'
28 | },
29 | // hotOnly: true,
30 | hot: true,
31 | open: true,
32 | },
33 | cache: {
34 | type: 'filesystem',
35 | allowCollectingMemory: true,
36 | },
37 | plugins: [
38 | new webpack.HotModuleReplacementPlugin(),
39 | new webpack.NoEmitOnErrorsPlugin(),
40 | new HtmlWebpackPlugin({ // Create HTML file that includes references to bundled CSS and JS.
41 | template: path.resolve(__dirname, '../public/index.html'),
42 | filename: 'index.html',
43 | minify: {
44 | removeComments: true,
45 | collapseWhitespace: true
46 | },
47 | inject: true
48 | })
49 | ]
50 | };
51 | // @ts-ignore
52 | module.exports = merge(base, config);
--------------------------------------------------------------------------------
/package/project1/webpack/webpack.config.pro.js:
--------------------------------------------------------------------------------
1 | const { CleanWebpackPlugin } = require('clean-webpack-plugin');
2 | const webpack = require('webpack');
3 | const TerserPlugin = require('terser-webpack-plugin');
4 | const MiniCssExtractPlugin = require("mini-css-extract-plugin"); //打包压缩css
5 | const CopyWebpackPlugin = require('copy-webpack-plugin'); //拷贝资源文件
6 | const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
7 | const path = require('path');
8 | const { merge } = require('webpack-merge');
9 | const base = require('./webpack.config.base.js');
10 | const config = {
11 | //开启调试
12 | mode: 'production',
13 | optimization: {
14 | minimizer: [
15 | new TerserPlugin({
16 | terserOptions: {
17 | parse: {
18 | ecma: 5,
19 | },
20 | compress: {
21 | ecma: 5,
22 | comparisons: false,
23 | inline: 2,
24 | drop_console: true,
25 | drop_debugger: true,
26 | pure_funcs: ['console.log'],
27 | },
28 | mangle: {
29 | safari10: true,
30 | },
31 | output: {
32 | ecma: 5,
33 | comments: false,
34 | ascii_only: true,
35 | },
36 | },
37 | parallel: true,
38 | }),
39 | ],
40 | },
41 | plugins: [
42 | // 编译环境变量
43 | // new webpack.DefinePlugin(GLOBALS),
44 | new MiniCssExtractPlugin({
45 | // Options similar to the same options in webpackOptions.output
46 | // both options are optional eea1d28b685828b67788
47 | filename: "css/[name].css?v=[chunkhash]",
48 | chunkFilename: "css/vendor.css?v=[chunkhash]"
49 | }),
50 | new CleanWebpackPlugin()
51 | ],
52 | externals: ['react', 'react-dom']
53 | };
54 | // @ts-ignore
55 | module.exports = merge(base, config);
56 |
--------------------------------------------------------------------------------
/package/project2/README.md:
--------------------------------------------------------------------------------
1 | single-spa-react-redux-toolkit/project2
2 |
3 |
4 |
5 | single-spa-react-redux-toolkit:
6 | react+single-spa-react+@reduxjs/toolkit 🚀🚀🚀, single-spa-react微前端结合状态管理库reduxjs/toolkit!并且增加了基座,可以让你每个子应用单独发布单独上线!!
7 |
8 | [](https://github.com/single-spa-react/single-spa-react-redux-toolkit#readme) [](https://github.com/single-spa-react/single-spa-react-redux-toolkit/graphs/commit-activity) [](https://github.com/single-spa-react/single-spa-react-redux-toolkit/blob/master/LICENSE)
9 |
10 |
11 |
12 | ## ⌨️ 本地开发
13 |
14 | ```bash
15 | $ git clone git@github.com:single-spa-react/single-spa-react-redux-toolkit.git
16 | $ cd single-spa-react-redux-toolkit
17 | $ cd project2
18 | $ npm install
19 | $ npm start
20 | ```
21 |
22 | 打开浏览器访问 http://127.0.0.1:8080/project2/。
23 |
24 | ## 相关资料:
25 | 1,项目依赖包梳理:https://segmentfault.com/a/1190000019006667
26 |
27 | ## 相关推广
28 |
29 | 1. https://github.com/xlei1123/daymanage
30 | > 这是一个使用 umi 开发的项目,想学习 umi 的新手可以学习一下
31 | 2. https://github.com/xlei1123/dtext
32 | > 前端文案默认值处理利器,统一定制修改,同时支持使用时特殊指定
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/package/project2/entry.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import singleSpaReact from 'single-spa-react';
4 | import App from './src/app.js';
5 |
6 |
7 | let reactLifecycle={};
8 |
9 | if (process.env.NODE_ENV === 'development') {
10 | // 本地开发 加载一些资源, 生产环境中统一由基座拉取
11 | // @ts-ignore
12 | import ('antd/dist/antd.css');
13 | ReactDOM.render( , document.getElementById('project2'));
14 | } else {
15 | function domElementGetter() {
16 | return document.getElementById('project2')
17 | }
18 | reactLifecycle = singleSpaReact({
19 | React,
20 | ReactDOM,
21 | rootComponent: App, // function/class Component 函数或者类组件
22 | domElementGetter,
23 | });
24 | }
25 |
26 | export const bootstrap = [
27 | reactLifecycle.bootstrap,
28 | ];
29 |
30 | export const mount = [
31 | reactLifecycle.mount,
32 | ];
33 |
34 | export const unmount = [
35 | reactLifecycle.unmount,
36 | ];
37 |
38 |
39 |
--------------------------------------------------------------------------------
/package/project2/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "single-spa-app",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "cross-env NODE_ENV=dev webpack server --open",
8 | "build": "cross-env NODE_ENV=production webpack --config webpack.config.js"
9 | },
10 | "keywords": [],
11 | "author": "",
12 | "license": "ISC",
13 | "dependencies": {
14 | "@babel/runtime": "^7.16.7",
15 | "@reduxjs/toolkit": "^1.7.1",
16 | "antd": "^4.18.2",
17 | "dva": "^2.6.0-beta.20",
18 | "history": "^5.2.0",
19 | "react": "^17.0.2",
20 | "react-dom": "^17.0.2",
21 | "react-redux": "^7.2.6",
22 | "react-router": "^6.2.1",
23 | "react-router-dom": "^6.2.1",
24 | "single-spa": "^5.9.3",
25 | "single-spa-react": "^4.6.0"
26 | },
27 | "devDependencies": {
28 | "@babel/core": "^7.16.7",
29 | "@babel/plugin-proposal-object-rest-spread": "^7.16.7",
30 | "@babel/plugin-syntax-dynamic-import": "^7.8.3",
31 | "@babel/preset-env": "^7.16.7",
32 | "@babel/preset-react": "^7.16.7",
33 | "babel-loader": "^8.2.3",
34 | "less": "^4.1.2",
35 | "less-loader": "^10.2.0",
36 | "css-loader": "^6.5.1",
37 | "style-loader": "^3.3.1",
38 | "clean-webpack-plugin": "^4.0.0",
39 | "html-webpack-plugin": "^5.3.2",
40 | "webpack": "^5.63.0",
41 | "webpack-cli": "^4.7.2",
42 | "webpack-dev-server": "^4.2.1"
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/package/project2/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Document
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/package/project2/src/app.js:
--------------------------------------------------------------------------------
1 | // import React from "react"
2 |
3 | // const App = () => Hello from project1
4 | // console.log(123456);
5 | // export default App
6 |
7 | import React from 'react';
8 | import { Route, BrowserRouter as Router, Routes } from 'react-router-dom';
9 | import { Provider } from 'react-redux';
10 | import { ConfigProvider } from 'antd';
11 | import zhCN from 'antd/lib/locale-provider/zh_CN';
12 | import routes from './routes';
13 | import store from './models/store';
14 |
15 | const renderApp = () =>
16 |
17 |
18 |
19 | {routes.map((route, index) => (
20 |
23 | ))}
24 |
25 |
26 |
27 | ;
28 |
29 | export default renderApp;
30 |
--------------------------------------------------------------------------------
/package/project2/src/models/global/index.js:
--------------------------------------------------------------------------------
1 | import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
2 |
3 | const namespace = 'global';
4 |
5 |
6 | export const fetchXxx = createAsyncThunk(`${namespace}/xxx`, async () => {
7 | // 你的逻辑
8 | });
9 |
10 | const initialState = {
11 | user: {
12 | project2name: 'single-spa-react-project2',
13 | age: '4',
14 | },
15 | loading: false
16 | }
17 |
18 | // 创建带有命名空间的reducer
19 | const stateSlice = createSlice({
20 | name: namespace,
21 | initialState,
22 | reducers: {},
23 | extraReducers: (builder) => {
24 | builder
25 | .addCase(fetchXxx.pending, (state) => {
26 | state.loading = true;
27 | })
28 | .addCase(fetchXxx.fulfilled, (state, { payload }) => {
29 | state.loading = false;
30 | })
31 | .addCase(fetchXxx.rejected, (state) => {
32 | state.loading = false;
33 | });
34 | },
35 | });
36 |
37 | export const selectGlobal = (state) => state.global;
38 | export default stateSlice.reducer;
39 |
--------------------------------------------------------------------------------
/package/project2/src/models/store.js:
--------------------------------------------------------------------------------
1 | import { configureStore, combineReducers } from '@reduxjs/toolkit';
2 | import { useSelector, useDispatch } from 'react-redux';
3 |
4 | import global from './global';
5 |
6 | const reducer = combineReducers({
7 | global,
8 | });
9 |
10 | const store = configureStore({
11 | reducer,
12 | });
13 |
14 |
15 | export const useAppDispatch = () => useDispatch();
16 | export const useAppSelector = useSelector;
17 |
18 | export default store;
19 |
--------------------------------------------------------------------------------
/package/project2/src/pages/home.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { useAppSelector } from '../models/store';
3 | import { selectGlobal } from '../models/global';
4 | const Home = () => {
5 | const { user } = useAppSelector(selectGlobal);
6 | return Hello from project2, {user.project2name}
7 | };
8 |
9 | export default React.memo(Home);
--------------------------------------------------------------------------------
/package/project2/src/routes.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Home from './pages/home';
3 |
4 | export default [
5 | {
6 | routeKey: '/project2',
7 | exact: true,
8 | path: '/project2',
9 | element: ,
10 | }
11 | ]
--------------------------------------------------------------------------------
/package/project2/webpack.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const webpack = require('webpack');
3 | const HtmlWebpackPlugin = require('html-webpack-plugin')
4 |
5 | module.exports = {
6 | mode: process.env.NODE_ENV,
7 | entry: {
8 | main: './entry.js'
9 | },
10 | output: {
11 | publicPath: '/',
12 | filename: '[name].js',
13 | path: path.resolve(__dirname, 'dist'),
14 | libraryTarget: process.env.NODE_ENV === 'production' ? 'system': ''
15 | },
16 | module: {
17 | rules: [
18 | {
19 | test: /\.(le|c)ss$/,
20 | use: ['style-loader', 'css-loader', 'less-loader']
21 | }, {
22 | test: /\.js$/,
23 | exclude: [/node_modules/],
24 | loader: 'babel-loader',
25 | options: { presets: ['@babel/env','@babel/preset-react'] },
26 | },
27 | ],
28 | },
29 | resolve: {
30 | modules: [path.resolve(__dirname, 'node_modules')],
31 | alias: {
32 | "@": path.resolve(__dirname, "./src"),
33 | },
34 | },
35 | plugins: [
36 | new webpack.HotModuleReplacementPlugin(),
37 | new webpack.NoEmitOnErrorsPlugin(),
38 | process.env.NODE_ENV === 'development' ? new HtmlWebpackPlugin({
39 | template: '/public/index.html',
40 | filename: 'index.html',
41 | }) : () => {},
42 | ],
43 | devtool: 'source-map',
44 | devServer: {
45 | historyApiFallback: true,
46 | static: {
47 | directory: "/public/",
48 | staticOptions: {},
49 | // Don't be confused with `devMiddleware.publicPath`, it is `publicPath` for static directory
50 | // Can be:
51 | // publicPath: ['/static-public-path-one/', '/static-public-path-two/'],
52 | publicPath: "/",
53 | // Can be:
54 | // serveIndex: {} (options for the `serveIndex` option you can find https://github.com/expressjs/serve-index)
55 | serveIndex: true,
56 | // Can be:
57 | // watch: {} (options for the `watch` option you can find https://github.com/paulmillr/chokidar)
58 | watch: true,
59 | },
60 | proxy: {
61 | '/api': 'http://localhost:5000'
62 | },
63 | // hotOnly: true,
64 | hot: true,
65 | open: true,
66 | },
67 | externals: process.env.NODE_ENV === 'production' ? ['react', 'react-dom'] : []
68 | };
69 |
--------------------------------------------------------------------------------