mirror of https://gitee.com/topiam/eiam
19 lines
22 KiB
JavaScript
19 lines
22 KiB
JavaScript
/*
|
|
* eiam-portal - Employee Identity and Access Management Program
|
|
* Copyright © 2020-2023 TopIAM (support@topiam.cn)
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Affero General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
"use strict";(self.webpackChunktopiam_portal=self.webpackChunktopiam_portal||[]).push([[88],{34580:function(V,S,o){o.d(S,{Z:function(){return O}});var s=o(5543),b=o(79685),P={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0138.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z"}}]},name:"github",theme:"outlined"},m=P,d=o(20165),p=function(x,T){return b.createElement(d.Z,(0,s.Z)((0,s.Z)({},x),{},{ref:T,icon:m}))};p.displayName="GithubOutlined";var O=b.forwardRef(p)},89419:function(V,S,o){o.d(S,{Z:function(){return O}});var s=o(5543),b=o(79685),P={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"lock",theme:"outlined"},m=P,d=o(20165),p=function(x,T){return b.createElement(d.Z,(0,s.Z)((0,s.Z)({},x),{},{ref:T,icon:m}))};p.displayName="LockOutlined";var O=b.forwardRef(p)},50833:function(V,S,o){o.d(S,{Z:function(){return O}});var s=o(5543),b=o(79685),P={icon:function(x,T){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304z",fill:x}},{tag:"path",attrs:{d:"M232 840h560V536H232v304zm280-226a48.01 48.01 0 0128 87v53c0 4.4-3.6 8-8 8h-40c-4.4 0-8-3.6-8-8v-53a48.01 48.01 0 0128-87z",fill:T}},{tag:"path",attrs:{d:"M484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z",fill:x}}]}},name:"lock",theme:"twotone"},m=P,d=o(20165),p=function(x,T){return b.createElement(d.Z,(0,s.Z)((0,s.Z)({},x),{},{ref:T,icon:m}))};p.displayName="LockTwoTone";var O=b.forwardRef(p)},17292:function(V,S,o){o.d(S,{Z:function(){return O}});var s=o(5543),b=o(79685),P={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M744 62H280c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h464c35.3 0 64-28.7 64-64V126c0-35.3-28.7-64-64-64zm-8 824H288V134h448v752zM472 784a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"mobile",theme:"outlined"},m=P,d=o(20165),p=function(x,T){return b.createElement(d.Z,(0,s.Z)((0,s.Z)({},x),{},{ref:T,icon:m}))};p.displayName="MobileOutlined";var O=b.forwardRef(p)},54180:function(V,S,o){var s=o(5543),b=o(79685),P=o(24730),m=o(20165),d=function(O,M){return b.createElement(m.Z,(0,s.Z)((0,s.Z)({},O),{},{ref:M,icon:P.Z}))};d.displayName="UserOutlined",S.Z=b.forwardRef(d)},64213:function(V,S,o){var s=o(5543),b=o(66105),P=o(54969),m=o(10779),d=o(79685),p=o(60353),O=o(56109),M=o(63342),x=["options","fieldProps","proFieldProps","valueEnum"],T=d.forwardRef(function(L,N){var D=L.options,Y=L.fieldProps,q=L.proFieldProps,_=L.valueEnum,H=(0,b.Z)(L,x);return(0,M.jsx)(O.Z,(0,s.Z)({ref:N,valueType:"checkbox",valueEnum:(0,P.h)(_,void 0),fieldProps:(0,s.Z)({options:D},Y),lightProps:(0,s.Z)({labelFormatter:function(){return(0,M.jsx)(O.Z,(0,s.Z)({ref:N,valueType:"checkbox",mode:"read",valueEnum:(0,P.h)(_,void 0),filedConfig:{customLightMode:!0},fieldProps:(0,s.Z)({options:D},Y),proFieldProps:q},H))}},H.lightProps),proFieldProps:q},H))}),$=d.forwardRef(function(L,N){var D=L.fieldProps,Y=L.children;return(0,M.jsx)(m.Z,(0,s.Z)((0,s.Z)({ref:N},D),{},{children:Y}))}),X=(0,p.G)($,{valuePropName:"checked"}),I=X;I.Group=T,S.Z=I},63392:function(V,S,o){o.d(S,{q:function(){return _}});var s=o(5543),b=o(79685),P={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 372zm5.6-532.7c53 0 89 33.8 93 83.4.3 4.2 3.8 7.4 8 7.4h56.7c2.6 0 4.7-2.1 4.7-4.7 0-86.7-68.4-147.4-162.7-147.4C407.4 290 344 364.2 344 486.8v52.3C344 660.8 407.4 734 517.3 734c94 0 162.7-58.8 162.7-141.4 0-2.6-2.1-4.7-4.7-4.7h-56.8c-4.2 0-7.6 3.2-8 7.3-4.2 46.1-40.1 77.8-93 77.8-65.3 0-102.1-47.9-102.1-133.6v-52.6c.1-87 37-135.5 102.2-135.5z"}}]},name:"copyright",theme:"outlined"},m=P,d=o(30877),p=function(y,Z){return b.createElement(d.Z,(0,s.Z)((0,s.Z)({},y),{},{ref:Z,icon:m}))};p.displayName="CopyrightOutlined";var O=b.forwardRef(p),M=o(97154),x=o(47918),T=o(68591),$=o.n(T),X=o(16431),I=o(71775),L=function(y){return(0,X.Z)({},y.componentCls,{marginBlock:0,marginBlockStart:48,marginBlockEnd:24,marginInline:0,paddingBlock:0,paddingInline:16,textAlign:"center","&-list":{marginBlockEnd:8,color:y.colorTextSecondary,"&-link":{color:y.colorTextSecondary,textDecoration:y.linkDecoration},"*:not(:last-child)":{marginInlineEnd:8,"&:hover":{color:y.colorText}}},"&-copyright":{fontSize:"14px",color:y.colorText}})};function N(H){return(0,I.Xj)("ProLayoutFooter",function(y){var Z=(0,s.Z)((0,s.Z)({},y),{},{componentCls:".".concat(H)});return[L(Z)]})}var D=o(63342),Y=function(y){var Z=y.className,Q=y.prefixCls,r=y.links,R=y.copyright,E=y.style,u=(0,b.useContext)(x.ZP.ConfigContext),f=u.getPrefixCls(Q||"pro-global-footer"),F=N(f),B=F.wrapSSR,G=F.hashId;return(r==null||r===!1||Array.isArray(r)&&r.length===0)&&(R==null||R===!1)?null:B((0,D.jsxs)("div",{className:$()(f,G,Z),style:E,children:[r&&(0,D.jsx)("div",{className:"".concat(f,"-list ").concat(G),children:r.map(function(j){return(0,D.jsx)("a",{className:"".concat(f,"-list-link ").concat(G),title:j.key,target:j.blankTarget?"_blank":"_self",href:j.href,rel:"noreferrer",children:j.title},j.key)})}),R&&(0,D.jsx)("div",{className:"".concat(f,"-copyright ").concat(G),children:R})]}))},q=M.Z.Footer,_=function(y){var Z=y.links,Q=y.copyright,r=y.style,R=y.className,E=y.prefixCls;return(0,D.jsx)(q,{className:R,style:(0,s.Z)({padding:0},r),children:(0,D.jsx)(Y,{links:Z,prefixCls:E,copyright:Q===!1?null:(0,D.jsxs)(b.Fragment,{children:[(0,D.jsx)(O,{})," ",Q]})})})}},78035:function(V,S,o){var s=o(79685),b=o(43865),P=o(15035);const m=d=>{P.Z&&((0,b.mf)(d)||console.error(`useMount: parameter \`fn\` expected to be a function, but got "${typeof d}".`)),(0,s.useEffect)(()=>{d==null||d()},[])};S.Z=m},66015:function(V,S,o){o.d(S,{Z:function(){return De}});var s=o(79685);const b=t=>(e,n)=>{const i=(0,s.useRef)(!1);t(()=>()=>{i.current=!1},[]),t(()=>{if(!i.current)i.current=!0;else return e()},n)};var P=null,m=b(s.useEffect);const d=(t,{manual:e,ready:n=!0,defaultParams:i=[],refreshDeps:a=[],refreshDepsAction:l})=>{const g=(0,s.useRef)(!1);return g.current=!1,m(()=>{!e&&n&&(g.current=!0,t.run(...i))},[n]),m(()=>{g.current||e||(g.current=!0,l?l():t.refresh())},[...a]),{onBefore:()=>{if(!n)return{stopNow:!0}}}};d.onInit=({ready:t=!0,manual:e})=>({loading:!e&&t});var p=d;function O(t,e){if(t===e)return!0;for(let n=0;n<t.length;n++)if(!Object.is(t[n],e[n]))return!1;return!0}function M(t,e){const{current:n}=(0,s.useRef)({deps:e,obj:void 0,initialized:!1});return(n.initialized===!1||!O(n.deps,e))&&(n.deps=e,n.obj=t(),n.initialized=!0),n.obj}function x(t){const e=(0,s.useRef)(t);return e.current=t,e}var T=x,$=o(43865),X=o(15035),L=t=>{X.Z&&((0,$.mf)(t)||console.error(`useUnmount expected parameter is a function, got ${typeof t}`));const e=T(t);(0,s.useEffect)(()=>()=>{e.current()},[])};const N=new Map,D=(t,e,n)=>{const i=N.get(t);i!=null&&i.timer&&clearTimeout(i.timer);let a;e>-1&&(a=setTimeout(()=>{N.delete(t)},e)),N.set(t,Object.assign(Object.assign({},n),{timer:a}))},Y=t=>N.get(t),q=t=>{t?(Array.isArray(t)?t:[t]).forEach(n=>N.delete(n)):N.clear()},_=new Map,H=t=>_.get(t),y=(t,e)=>{_.set(t,e),e.then(n=>(_.delete(t),n)).catch(()=>{_.delete(t)})},Z={},Q=(t,e)=>{Z[t]&&Z[t].forEach(n=>n(e))},r=(t,e)=>(Z[t]||(Z[t]=[]),Z[t].push(e),function(){const i=Z[t].indexOf(e);Z[t].splice(i,1)});var E=(t,{cacheKey:e,cacheTime:n=5*60*1e3,staleTime:i=0,setCache:a,getCache:l})=>{const g=(0,s.useRef)(),C=(0,s.useRef)(),c=(h,v)=>{a?a(v):D(h,n,v),Q(h,v.data)},z=(h,v=[])=>l?l(v):Y(h);return M(()=>{if(!e)return;const h=z(e);h&&Object.hasOwnProperty.call(h,"data")&&(t.state.data=h.data,t.state.params=h.params,(i===-1||new Date().getTime()-h.time<=i)&&(t.state.loading=!1)),g.current=r(e,v=>{t.setState({data:v})})},[]),L(()=>{var h;(h=g.current)===null||h===void 0||h.call(g)}),e?{onBefore:h=>{const v=z(e,h);return!v||!Object.hasOwnProperty.call(v,"data")?{}:i===-1||new Date().getTime()-v.time<=i?{loading:!1,data:v==null?void 0:v.data,error:void 0,returnNow:!0}:{data:v==null?void 0:v.data,error:void 0}},onRequest:(h,v)=>{let A=H(e);return A&&A!==C.current?{servicePromise:A}:(A=h(...v),C.current=A,y(e,A),{servicePromise:A})},onSuccess:(h,v)=>{var A;e&&((A=g.current)===null||A===void 0||A.call(g),c(e,{data:h,params:v,time:new Date().getTime()}),g.current=r(e,le=>{t.setState({data:le})}))},onMutate:h=>{var v;e&&((v=g.current)===null||v===void 0||v.call(g),c(e,{data:h,params:t.state.params,time:new Date().getTime()}),g.current=r(e,A=>{t.setState({data:A})}))}}:{}},u=o(63390),f=o.n(u),B=(t,{debounceWait:e,debounceLeading:n,debounceTrailing:i,debounceMaxWait:a})=>{const l=(0,s.useRef)(),g=(0,s.useMemo)(()=>{const C={};return n!==void 0&&(C.leading=n),i!==void 0&&(C.trailing=i),a!==void 0&&(C.maxWait=a),C},[n,i,a]);return(0,s.useEffect)(()=>{if(e){const C=t.runAsync.bind(t);return l.current=f()(c=>{c()},e,g),t.runAsync=(...c)=>new Promise((z,h)=>{var v;(v=l.current)===null||v===void 0||v.call(l,()=>{C(...c).then(z).catch(h)})}),()=>{var c;(c=l.current)===null||c===void 0||c.cancel(),t.runAsync=C}}},[e,g]),e?{onCancel:()=>{var C;(C=l.current)===null||C===void 0||C.cancel()}}:{}},j=(t,{loadingDelay:e})=>{const n=(0,s.useRef)();if(!e)return{};const i=()=>{n.current&&clearTimeout(n.current)};return{onBefore:()=>(i(),n.current=setTimeout(()=>{t.setState({loading:!0})},e),{loading:!1}),onFinally:()=>{i()},onCancel:()=>{i()}}},w=!!(typeof window!="undefined"&&window.document&&window.document.createElement);function k(){return w?document.visibilityState!=="hidden":!0}const W=[];function ne(t){return W.push(t),function(){const n=W.indexOf(t);W.splice(n,1)}}if(w){const t=()=>{if(k())for(let e=0;e<W.length;e++){const n=W[e];n()}};window.addEventListener("visibilitychange",t,!1)}var ce=ne,se=(t,{pollingInterval:e,pollingWhenHidden:n=!0,pollingErrorRetryCount:i=-1})=>{const a=(0,s.useRef)(),l=(0,s.useRef)(),g=(0,s.useRef)(0),C=()=>{var c;a.current&&clearTimeout(a.current),(c=l.current)===null||c===void 0||c.call(l)};return m(()=>{e||C()},[e]),e?{onBefore:()=>{C()},onError:()=>{g.current+=1},onSuccess:()=>{g.current=0},onFinally:()=>{i===-1||i!==-1&&g.current<=i?a.current=setTimeout(()=>{!n&&!k()?l.current=ce(()=>{t.refresh()}):t.refresh()},e):g.current=0},onCancel:()=>{C()}}:{}};function re(t,e){let n=!1;return(...i)=>{n||(n=!0,t(...i),setTimeout(()=>{n=!1},e))}}function ue(){return w&&typeof navigator.onLine!="undefined"?navigator.onLine:!0}const U=[];function de(t){return U.push(t),function(){const n=U.indexOf(t);n>-1&&U.splice(n,1)}}if(w){const t=()=>{if(!(!k()||!ue()))for(let e=0;e<U.length;e++){const n=U[e];n()}};window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1)}var fe=de,ie=(t,{refreshOnWindowFocus:e,focusTimespan:n=5e3})=>{const i=(0,s.useRef)(),a=()=>{var l;(l=i.current)===null||l===void 0||l.call(i)};return(0,s.useEffect)(()=>{if(e){const l=re(t.refresh.bind(t),n);i.current=fe(()=>{l()})}return()=>{a()}},[e,n]),L(()=>{a()}),{}},ve=(t,{retryInterval:e,retryCount:n})=>{const i=(0,s.useRef)(),a=(0,s.useRef)(0),l=(0,s.useRef)(!1);return n?{onBefore:()=>{l.current||(a.current=0),l.current=!1,i.current&&clearTimeout(i.current)},onSuccess:()=>{a.current=0},onError:()=>{if(a.current+=1,n===-1||a.current<=n){const g=e!=null?e:Math.min(1e3*Math.pow(2,a.current),3e4);i.current=setTimeout(()=>{l.current=!0,t.refresh()},g)}else a.current=0},onCancel:()=>{a.current=0,i.current&&clearTimeout(i.current)}}:{}},ae=o(72806),ge=o.n(ae),oe=(t,{throttleWait:e,throttleLeading:n,throttleTrailing:i})=>{const a=(0,s.useRef)(),l={};return n!==void 0&&(l.leading=n),i!==void 0&&(l.trailing=i),(0,s.useEffect)(()=>{if(e){const g=t.runAsync.bind(t);return a.current=ge()(C=>{C()},e,l),t.runAsync=(...C)=>new Promise((c,z)=>{var h;(h=a.current)===null||h===void 0||h.call(a,()=>{g(...C).then(c).catch(z)})}),()=>{var C;t.runAsync=g,(C=a.current)===null||C===void 0||C.cancel()}}},[e,n,i]),e?{onCancel:()=>{var g;(g=a.current)===null||g===void 0||g.cancel()}}:{}},me=o(29268);function Oe(t){X.Z&&((0,$.mf)(t)||console.error(`useMemoizedFn expected parameter is a function, got ${typeof t}`));const e=(0,s.useRef)(t);e.current=(0,s.useMemo)(()=>t,[t]);const n=(0,s.useRef)();return n.current||(n.current=function(...i){return e.current.apply(this,i)}),n.current}var ee=Oe,ye=o(78035),Ee=()=>{const[,t]=(0,s.useState)({});return(0,s.useCallback)(()=>t({}),[])};class Re{constructor(e,n,i,a={}){this.serviceRef=e,this.options=n,this.subscribe=i,this.initState=a,this.count=0,this.state={loading:!1,params:void 0,data:void 0,error:void 0},this.state=Object.assign(Object.assign(Object.assign({},this.state),{loading:!n.manual}),a)}setState(e={}){this.state=Object.assign(Object.assign({},this.state),e),this.subscribe()}runPluginHandler(e,...n){const i=this.pluginImpls.map(a=>{var l;return(l=a[e])===null||l===void 0?void 0:l.call(a,...n)}).filter(Boolean);return Object.assign({},...i)}runAsync(...e){var n,i,a,l,g,C,c,z,h,v;return(0,me.mG)(this,void 0,void 0,function*(){this.count+=1;const A=this.count,le=this.runPluginHandler("onBefore",e),{stopNow:Ze=!1,returnNow:je=!1}=le,Pe=(0,me._T)(le,["stopNow","returnNow"]);if(Ze)return new Promise(()=>{});if(this.setState(Object.assign({loading:!0,params:e},Pe)),je)return Promise.resolve(Pe.data);(i=(n=this.options).onBefore)===null||i===void 0||i.call(n,e);try{let{servicePromise:J}=this.runPluginHandler("onRequest",this.serviceRef.current,e);J||(J=this.serviceRef.current(...e));const te=yield J;return A!==this.count?new Promise(()=>{}):(this.setState({data:te,error:void 0,loading:!1}),(l=(a=this.options).onSuccess)===null||l===void 0||l.call(a,te,e),this.runPluginHandler("onSuccess",te,e),(C=(g=this.options).onFinally)===null||C===void 0||C.call(g,e,te,void 0),A===this.count&&this.runPluginHandler("onFinally",e,te,void 0),te)}catch(J){if(A!==this.count)return new Promise(()=>{});throw this.setState({error:J,loading:!1}),(z=(c=this.options).onError)===null||z===void 0||z.call(c,J,e),this.runPluginHandler("onError",J,e),(v=(h=this.options).onFinally)===null||v===void 0||v.call(h,e,void 0,J),A===this.count&&this.runPluginHandler("onFinally",e,void 0,J),J}})}run(...e){this.runAsync(...e).catch(n=>{this.options.onError||console.error(n)})}cancel(){this.count+=1,this.setState({loading:!1}),this.runPluginHandler("onCancel")}refresh(){this.run(...this.state.params||[])}refreshAsync(){return this.runAsync(...this.state.params||[])}mutate(e){const n=(0,$.mf)(e)?e(this.state.data):e;this.runPluginHandler("onMutate",n),this.setState({data:n})}}function Se(t,e={},n=[]){const{manual:i=!1}=e,a=(0,me._T)(e,["manual"]),l=Object.assign({manual:i},a),g=T(t),C=Ee(),c=M(()=>{const z=n.map(h=>{var v;return(v=h==null?void 0:h.onInit)===null||v===void 0?void 0:v.call(h,l)}).filter(Boolean);return new Re(g,l,C,Object.assign({},...z))},[]);return c.options=l,c.pluginImpls=n.map(z=>z(c,l)),(0,ye.Z)(()=>{if(!i){const z=c.state.params||e.defaultParams||[];c.run(...z)}}),L(()=>{c.cancel()}),{loading:c.state.loading,data:c.state.data,error:c.state.error,params:c.state.params||[],cancel:ee(c.cancel.bind(c)),refresh:ee(c.refresh.bind(c)),refreshAsync:ee(c.refreshAsync.bind(c)),run:ee(c.run.bind(c)),runAsync:ee(c.runAsync.bind(c)),mutate:ee(c.mutate.bind(c))}}var xe=Se;function Me(t,e,n){return xe(t,e,[...n||[],B,j,se,ie,oe,p,E,ve])}var Te=Me,De=Te},15035:function(V,S){S.Z=!1},97154:function(V,S,o){var s=o(27693),b=o(17875);const P=s.ZP;P.Header=s.h4,P.Footer=s.$_,P.Content=s.VY,P.Sider=b.Z,S.Z=P},91902:function(V,S,o){o.d(S,{Z:function(){return Q}});var s=o(35632),b=o(68591),P=o.n(b),m=o(79685),d=o(56865),p=o(78699),O=o(96721),M=o(83396),x=o(42006);function T(r){return typeof r!="string"?r:r.charAt(0).toUpperCase()+r.slice(1)}var $=o(8336),X=o(42786);const I=(r,R,E)=>{const u=T(E);return{[`${r.componentCls}-${R}`]:{color:r[`color${E}`],background:r[`color${u}Bg`],borderColor:r[`color${u}Border`]}}},L=r=>(0,$.j)(r,(R,E)=>{let{textColor:u,lightBorderColor:f,lightColor:F,darkColor:B}=E;return{[`${r.componentCls}-${R}`]:{color:u,background:F,borderColor:f,"&-inverse":{color:r.colorTextLightSolid,background:B,borderColor:B}}}}),N=r=>{const{paddingXXS:R,lineWidth:E,tagPaddingHorizontal:u,componentCls:f}=r,F=u-E,B=R-E;return{[f]:Object.assign(Object.assign({},(0,X.Wf)(r)),{display:"inline-block",height:"auto",marginInlineEnd:r.marginXS,paddingInline:F,fontSize:r.tagFontSize,lineHeight:`${r.tagLineHeight}px`,whiteSpace:"nowrap",background:r.tagDefaultBg,border:`${r.lineWidth}px ${r.lineType} ${r.colorBorder}`,borderRadius:r.borderRadiusSM,opacity:1,transition:`all ${r.motionDurationMid}`,textAlign:"start",[`&${f}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:r.tagDefaultColor},[`${f}-close-icon`]:{marginInlineStart:B,color:r.colorTextDescription,fontSize:r.tagIconSize,cursor:"pointer",transition:`all ${r.motionDurationMid}`,"&:hover":{color:r.colorTextHeading}},[`&${f}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${r.iconCls}-close, ${r.iconCls}-close:hover`]:{color:r.colorTextLightSolid}},["&-checkable"]:{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${f}-checkable-checked):hover`]:{color:r.colorPrimary,backgroundColor:r.colorFillSecondary},"&:active, &-checked":{color:r.colorTextLightSolid},"&-checked":{backgroundColor:r.colorPrimary,"&:hover":{backgroundColor:r.colorPrimaryHover}},"&:active":{backgroundColor:r.colorPrimaryActive}},["&-hidden"]:{display:"none"},[`> ${r.iconCls} + span, > span + ${r.iconCls}`]:{marginInlineStart:F}})}};var D=(0,M.Z)("Tag",r=>{const{fontSize:R,lineHeight:E,lineWidth:u,fontSizeIcon:f}=r,F=Math.round(R*E),B=r.fontSizeSM,G=F-u*2,j=r.colorFillAlter,K=r.colorText,w=(0,x.TS)(r,{tagFontSize:B,tagLineHeight:G,tagDefaultBg:j,tagDefaultColor:K,tagIconSize:f-2*u,tagPaddingHorizontal:8});return[N(w),L(w),I(w,"success","Success"),I(w,"processing","Info"),I(w,"error","Error"),I(w,"warning","Warning")]}),Y=function(r,R){var E={};for(var u in r)Object.prototype.hasOwnProperty.call(r,u)&&R.indexOf(u)<0&&(E[u]=r[u]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,u=Object.getOwnPropertySymbols(r);f<u.length;f++)R.indexOf(u[f])<0&&Object.prototype.propertyIsEnumerable.call(r,u[f])&&(E[u[f]]=r[u[f]]);return E},_=r=>{var{prefixCls:R,className:E,checked:u,onChange:f,onClick:F}=r,B=Y(r,["prefixCls","className","checked","onChange","onClick"]);const{getPrefixCls:G}=m.useContext(d.E_),j=ne=>{f==null||f(!u),F==null||F(ne)},K=G("tag",R),[w,k]=D(K),W=P()(K,{[`${K}-checkable`]:!0,[`${K}-checkable-checked`]:u},E,k);return w(m.createElement("span",Object.assign({},B,{className:W,onClick:j})))},H=function(r,R){var E={};for(var u in r)Object.prototype.hasOwnProperty.call(r,u)&&R.indexOf(u)<0&&(E[u]=r[u]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,u=Object.getOwnPropertySymbols(r);f<u.length;f++)R.indexOf(u[f])<0&&Object.prototype.propertyIsEnumerable.call(r,u[f])&&(E[u[f]]=r[u[f]]);return E};const y=(r,R)=>{var{prefixCls:E,className:u,rootClassName:f,style:F,children:B,icon:G,color:j,onClose:K,closeIcon:w,closable:k=!1}=r,W=H(r,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable"]);const{getPrefixCls:ne,direction:ce}=m.useContext(d.E_),[pe,se]=m.useState(!0);m.useEffect(()=>{"visible"in W&&se(W.visible)},[W.visible]);const re=(0,p.o2)(j)||(0,p.yT)(j),ue=Object.assign({backgroundColor:j&&!re?j:void 0},F),U=ne("tag",E),[de,fe]=D(U),Ce=P()(U,{[`${U}-${j}`]:re,[`${U}-has-color`]:j&&!re,[`${U}-hidden`]:!pe,[`${U}-rtl`]:ce==="rtl"},u,f,fe),ie=oe=>{oe.stopPropagation(),K==null||K(oe),!oe.defaultPrevented&&se(!1)},be=()=>k?w?m.createElement("span",{className:`${U}-close-icon`,onClick:ie},w):m.createElement(s.Z,{className:`${U}-close-icon`,onClick:ie}):null,ve=typeof W.onClick=="function"||B&&B.type==="a",ae=G||null,ge=ae?m.createElement(m.Fragment,null,ae,m.createElement("span",null,B)):B,he=m.createElement("span",Object.assign({},W,{ref:R,className:Ce,style:ue}),ge,be());return de(ve?m.createElement(O.Z,null,he):he)},Z=m.forwardRef(y);Z.CheckableTag=_;var Q=Z},77264:function(V,S,o){o.d(S,{x0:function(){return m}});let s=d=>crypto.getRandomValues(new Uint8Array(d)),b=(d,p,O)=>{let M=(2<<Math.log(d.length-1)/Math.LN2)-1,x=-~(1.6*M*p/d.length);return(T=p)=>{let $="";for(;;){let X=O(x),I=x;for(;I--;)if($+=d[X[I]&M]||"",$.length===T)return $}}},P=(d,p=21)=>b(d,p,s),m=(d=21)=>crypto.getRandomValues(new Uint8Array(d)).reduce((p,O)=>(O&=63,O<36?p+=O.toString(36):O<62?p+=(O-26).toString(36).toUpperCase():O>62?p+="-":p+="_",p),"")}}]);
|