Files
weiyu/deploy/server/admin/t__plugin-layout__Layout.134e3279.async.js
2025-12-17 17:03:07 +08:00

1 line
12 KiB
JavaScript

"use strict";(self.webpackChunkadmin=self.webpackChunkadmin||[]).push([[6301],{37455:function(n,t,e){e.d(t,{n:function(){return c}});var r=e(32906),i=e(29608),a=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,o=function(n){return"*"===n||"x"===n||"X"===n},l=function(n){var t=parseInt(n,10);return isNaN(t)?n:t},u=function(n,t){if(o(n)||o(t))return 0;var e=function(n,t){return(0,i.Z)(n)!==(0,i.Z)(t)?[String(n),String(t)]:[n,t]}(l(n),l(t)),a=(0,r.Z)(e,2),u=a[0],s=a[1];return u>s?1:u<s?-1:0},s=function(n){var t,e=n.match(a);return null==e||null===(t=e.shift)||void 0===t||t.call(e),e},c=function(n,t){var e=s(n),r=s(t),i=e.pop(),a=r.pop(),o=function(n,t){for(var e=0;e<Math.max(n.length,t.length);e++){var r=u(n[e]||"0",t[e]||"0");if(0!==r)return r}return 0}(e,r);return 0!==o?o:i||a?i?-1:1:0}},80012:function(n,t,e){e.d(t,{X:function(){return u},b:function(){return l}});var r=e(82073),i=e(64742),a=e(37455),o=e(73656),l=function(){return void 0===o?r.Z:(null===o||void 0===o||null===(o={NODE_ENV:"production",PUBLIC_PATH:"/admin/"})||void 0===o?void 0:o.ANTD_VERSION)||r.Z},u=function(n,t){var e=(0,a.n)(l(),"4.23.0")>-1?{open:n,onOpenChange:t}:{visible:n,onVisibleChange:t};return(0,i.Y)(e)}},27450:function(n,t,e){e.d(t,{S:function(){return f}});var r=e(17989),i=e(71235),a=e(31722),o=e(28944),l=e(99531),u=e(1206),s=e(59811),c=e(44194),d=e(31549),f=function(n){(0,o.Z)(e,n);var t=(0,l.Z)(e);function e(){var n;(0,r.Z)(this,e);for(var i=arguments.length,o=new Array(i),l=0;l<i;l++)o[l]=arguments[l];return n=t.call.apply(t,[this].concat(o)),(0,u.Z)((0,a.Z)(n),"state",{hasError:!1,errorInfo:""}),n}return(0,i.Z)(e,[{key:"componentDidCatch",value:function(n,t){console.log(n,t)}},{key:"render",value:function(){return this.state.hasError?(0,d.jsx)(s.ZP,{status:"error",title:"Something went wrong.",extra:this.state.errorInfo}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(n){return{hasError:!0,errorInfo:n.message}}}]),e}(c.Component)},40475:function(n,t,e){e.d(t,{D:function(){return l}});var r=e(6321),i=e(7304),a=e(44194),o=e(87998);function l(n,t){var e=(0,o.J)(n),l=(0,a.useRef)(),u=(0,a.useCallback)((function(){l.current&&(clearTimeout(l.current),l.current=null)}),[]),s=(0,a.useCallback)((0,i.Z)((0,r.Z)().mark((function n(){var a,o,s,c=arguments;return(0,r.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:for(a=c.length,o=new Array(a),s=0;s<a;s++)o[s]=c[s];if(0!==t&&void 0!==t){n.next=3;break}return n.abrupt("return",e.apply(void 0,o));case 3:return u(),n.abrupt("return",new Promise((function(n){l.current=setTimeout((0,i.Z)((0,r.Z)().mark((function t(){return(0,r.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=n,t.next=3,e.apply(void 0,o);case 3:return t.t1=t.sent,(0,t.t0)(t.t1),t.abrupt("return");case 6:case"end":return t.stop()}}),t)}))),t)})));case 5:case"end":return n.stop()}}),n)}))),[e,u,t]);return(0,a.useEffect)((function(){return u}),[u]),{run:s,cancel:u}}},87998:function(n,t,e){e.d(t,{J:function(){return a}});var r=e(28548),i=e(44194),a=function(n){var t=(0,i.useRef)(null);return t.current=n,(0,i.useCallback)((function(){for(var n,e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return null===(n=t.current)||void 0===n?void 0:n.call.apply(n,[t].concat((0,r.Z)(i)))}),[])}},3064:function(n,t,e){e.d(t,{j:function(){return a}});var r=e(73656),i=void 0!==r&&null!=r.versions&&null!=r.versions.node,a=function(){return"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.matchMedia&&!i}},64742:function(n,t,e){e.d(t,{Y:function(){return r}});var r=function(n){var t={};if(Object.keys(n||{}).forEach((function(e){void 0!==n[e]&&(t[e]=n[e])})),!(Object.keys(t).length<1))return t}},48261:function(n,t,e){e.r(t),e.d(t,{default:function(){return z}});var r=e(45332),i=e.n(r),a=e(76711),o=e.n(a),l=e(73193),u=e.n(l),s=e(86222),c=e.n(s),d=e(5861),f=e(44194),h=e(26022),p=e(31549),v=function(){return(0,p.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 200 200",children:[(0,p.jsxs)("defs",{children:[(0,p.jsxs)("linearGradient",{id:"linearGradient-1",x1:"62.102%",x2:"108.197%",y1:"0%",y2:"37.864%",children:[(0,p.jsx)("stop",{offset:"0%",stopColor:"#4285EB"}),(0,p.jsx)("stop",{offset:"100%",stopColor:"#2EC7FF"})]}),(0,p.jsxs)("linearGradient",{id:"linearGradient-2",x1:"69.644%",x2:"54.043%",y1:"0%",y2:"108.457%",children:[(0,p.jsx)("stop",{offset:"0%",stopColor:"#29CDFF"}),(0,p.jsx)("stop",{offset:"37.86%",stopColor:"#148EFF"}),(0,p.jsx)("stop",{offset:"100%",stopColor:"#0A60FF"})]}),(0,p.jsxs)("linearGradient",{id:"linearGradient-3",x1:"69.691%",x2:"16.723%",y1:"-12.974%",y2:"117.391%",children:[(0,p.jsx)("stop",{offset:"0%",stopColor:"#FA816E"}),(0,p.jsx)("stop",{offset:"41.473%",stopColor:"#F74A5C"}),(0,p.jsx)("stop",{offset:"100%",stopColor:"#F51D2C"})]}),(0,p.jsxs)("linearGradient",{id:"linearGradient-4",x1:"68.128%",x2:"30.44%",y1:"-35.691%",y2:"114.943%",children:[(0,p.jsx)("stop",{offset:"0%",stopColor:"#FA8E7D"}),(0,p.jsx)("stop",{offset:"51.264%",stopColor:"#F74A5C"}),(0,p.jsx)("stop",{offset:"100%",stopColor:"#F51D2C"})]})]}),(0,p.jsx)("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1",children:(0,p.jsx)("g",{transform:"translate(-20 -20)",children:(0,p.jsx)("g",{transform:"translate(20 20)",children:(0,p.jsxs)("g",{children:[(0,p.jsxs)("g",{fillRule:"nonzero",children:[(0,p.jsxs)("g",{children:[(0,p.jsx)("path",{fill:"url(#linearGradient-1)",d:"M91.588 4.177L4.18 91.513a11.981 11.981 0 000 16.974l87.408 87.336a12.005 12.005 0 0016.989 0l36.648-36.618c4.209-4.205 4.209-11.023 0-15.228-4.208-4.205-11.031-4.205-15.24 0l-27.783 27.76c-1.17 1.169-2.945 1.169-4.114 0l-69.802-69.744c-1.17-1.169-1.17-2.942 0-4.11l69.802-69.745c1.17-1.169 2.944-1.169 4.114 0l27.783 27.76c4.209 4.205 11.032 4.205 15.24 0 4.209-4.205 4.209-11.022 0-15.227L108.581 4.056c-4.719-4.594-12.312-4.557-16.993.12z"}),(0,p.jsx)("path",{fill:"url(#linearGradient-2)",d:"M91.588 4.177L4.18 91.513a11.981 11.981 0 000 16.974l87.408 87.336a12.005 12.005 0 0016.989 0l36.648-36.618c4.209-4.205 4.209-11.023 0-15.228-4.208-4.205-11.031-4.205-15.24 0l-27.783 27.76c-1.17 1.169-2.945 1.169-4.114 0l-69.802-69.744c-1.17-1.169-1.17-2.942 0-4.11l69.802-69.745c2.912-2.51 7.664-7.596 14.642-8.786 5.186-.883 10.855 1.062 17.009 5.837L108.58 4.056c-4.719-4.594-12.312-4.557-16.993.12z"})]}),(0,p.jsx)("path",{fill:"url(#linearGradient-3)",d:"M153.686 135.855c4.208 4.205 11.031 4.205 15.24 0l27.034-27.012c4.7-4.696 4.7-12.28 0-16.974l-27.27-27.15c-4.218-4.2-11.043-4.195-15.254.013-4.209 4.205-4.209 11.022 0 15.227l18.418 18.403c1.17 1.169 1.17 2.943 0 4.111l-18.168 18.154c-4.209 4.205-4.209 11.023 0 15.228z"})]}),(0,p.jsx)("ellipse",{cx:"100.519",cy:"100.437",fill:"url(#linearGradient-4)",rx:"23.6",ry:"23.581"})]})})})})]})},g=e(59811),m=e(2157),x=function(n){var t,e;return!n.route&&(n.noFound||n.notFound)||(null===(t=n.route)||void 0===t?void 0:t.unaccessible)&&(n.unAccessible||n.noAccessible)||(!n.route||(null===(e=n.route)||void 0===e?void 0:e.unaccessible))&&(0,p.jsx)(g.ZP,{status:n.route?"403":"404",title:n.route?"403":"404",subTitle:n.route?"抱歉,你无权访问该页面":"抱歉,你访问的页面不存在",extra:(0,p.jsx)(m.ZP,{type:"primary",onClick:function(){return d.history.push("/")},children:"返回首页"})})||n.children},y=e(44423),j=e(23513),C=e(82073),Z=e(53030),b=e(95330),k=e(94433),w=e(29),A=e(23630),S=function(n,t){return f.createElement(A.Z,(0,k.Z)((0,k.Z)({},n),{},{ref:t,icon:w.Z}))};var F=f.forwardRef(S),R=e(70762);var N=e(71512),E=e(22868),M=function n(t,e){if(0===t.length)return[];var r,i=[],a=c()(t);try{for(a.s();!(r=a.n()).done;){var l=r.value,s=u()({},l);e(l)?Array.isArray(s.routes)&&i.push.apply(i,o()(n(s.routes,e))):(Array.isArray(s.children)&&(s.children=n(s.children,e),s.routes=s.children),i.push(s))}}catch(n){a.e(n)}finally{a.f()}return i},I=function n(t){return 0===t.length?[]:t.map((function(t){var e=u()({},t);return t.originPath&&(e.path=t.originPath),Array.isArray(t.routes)&&(e.routes=n(t.routes)),Array.isArray(t.children)&&(e.children=n(t.children)),e}))},z=function(n){var t=(0,d.useLocation)(),e=(0,d.useNavigate)(),r=(0,d.useAppData)(),a=r.clientRoutes,o=r.pluginManager,l=N.t&&(0,N.t)("@@initialState")||{initialState:void 0,loading:!1,setInitialState:null},s=l.initialState,c=l.loading,g=l.setInitialState,m={locale:!0,navTheme:"light",collapsed:!1,layout:"mix",contentWidth:"Fluid",siderWidth:180,fixedHeader:!1,fixSiderbar:!0,colorWeak:!1,pwa:!0,token:{},splitMenus:!1,siderMenuType:"sub"},k=(0,R.YB)().formatMessage,w=o.applyPlugins({key:"layout",type:"modify",initialValue:u()({},l)}),A=M(a.filter((function(n){return"ant-design-pro-layout"===n.id})),(function(n){return!!n.isLayout&&"ant-design-pro-layout"!==n.id||!!n.isWrapper})),S=(0,E.Mf)(I(A)),z=i()(S,1)[0],D=(0,f.useMemo)((function(){var n,e;return null===(n=(0,d.matchRoutes)(z.children,t.pathname))||void 0===n||null===(e=n.pop)||void 0===e||null===(e=e.call(n))||void 0===e?void 0:e.route}),[t.pathname]);return(0,p.jsx)(h.f,u()(u()({route:z,location:t,title:m.title||"admin",navTheme:"dark",siderWidth:256,onMenuHeaderClick:function(n){n.stopPropagation(),n.preventDefault(),e("/")},formatMessage:m.formatMessage||k,menu:{locale:m.locale},logo:v,menuItemRender:function(n,e){return n.isUrl||n.children?e:n.path&&t.pathname!==n.path?(0,p.jsx)(d.Link,{to:n.path.replace("/*",""),target:n.target,children:e}):e},itemRender:function(n,t,e){var r=n.breadcrumbName,i=n.title,a=n.path,o=i||r,l=e[e.length-1];return!l||l.path!==a&&l.linkPath!==a?(0,p.jsx)(d.Link,{to:a,children:o}):(0,p.jsx)("span",{children:o})},disableContentMargin:!0,fixSiderbar:!0,fixedHeader:!0},w),{},{rightContentRender:!1!==w.rightContentRender&&function(n){var t=function(n){var t,e,r,i,a;if(n.runtimeConfig.rightRender)return n.runtimeConfig.rightRender(n.initialState,n.setInitialState,n.runtimeConfig);var o=(null===(t=n.initialState)||void 0===t?void 0:t.avatar)||(null===(e=n.initialState)||void 0===e?void 0:e.name)||n.runtimeConfig.logout,l=!1===(null===(r=n.initialState)||void 0===r?void 0:r.avatar),s=l?"umi-plugin-layout-name umi-plugin-layout-hide-avatar-img":"umi-plugin-layout-name",c=o?(0,p.jsxs)("span",{className:"umi-plugin-layout-action",children:[l?null:(0,p.jsx)(y.Z,{size:"small",className:"umi-plugin-layout-avatar",src:(null===(i=n.initialState)||void 0===i?void 0:i.avatar)||"https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png",alt:"avatar"}),(0,p.jsx)("span",{className:s,children:null===(a=n.initialState)||void 0===a?void 0:a.name})]}):null;if(n.loading)return(0,p.jsx)("div",{className:"umi-plugin-layout-right",children:(0,p.jsx)(j.Z,{size:"small",style:{marginLeft:8,marginRight:8}})});var d,f={className:"umi-plugin-layout-menu",selectedKeys:[],items:[{key:"logout",label:(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(F,{}),"退出登录"]}),onClick:function(){var t,e;null==n||null===(t=n.runtimeConfig)||void 0===t||null===(e=t.logout)||void 0===e||e.call(t,n.initialState)}}]};return d=C.Z.startsWith("6.")||C.Z.startsWith("5.")||C.Z.startsWith("4.24.")?{menu:f}:C.Z.startsWith("3.")?{overlay:(0,p.jsx)(Z.Z,{children:f.items.map((function(n){return(0,p.jsx)(Z.Z.Item,{onClick:n.onClick,children:n.label},n.key)}))})}:{overlay:(0,p.jsx)(Z.Z,u()({},f))},(0,p.jsxs)("div",{className:"umi-plugin-layout-right anticon",children:[n.runtimeConfig.logout?(0,p.jsx)(b.Z,u()(u()({},d),{},{overlayClassName:"umi-plugin-layout-container",children:c})):c,(0,p.jsx)(R.pD,{})]})}({runtimeConfig:w,loading:c,initialState:s,setInitialState:g});return w.rightContentRender?w.rightContentRender(n,t,{userConfig:m,runtimeConfig:w,loading:c,initialState:s,setInitialState:g}):t},children:(0,p.jsx)(x,{route:D,noFound:null==w?void 0:w.noFound,notFound:null==w?void 0:w.notFound,unAccessible:null==w?void 0:w.unAccessible,noAccessible:null==w?void 0:w.noAccessible,children:w.childrenRender?w.childrenRender((0,p.jsx)(d.Outlet,{}),n):(0,p.jsx)(d.Outlet,{})})}))}}}]);