vdi/web-fe/serve/dist/818.async.js

4 lines
37 KiB
JavaScript

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[818],{37322:function(Ot,_e,v){v.d(_e,{Z:function(){return k}});var a=v(66283),we=v(75271),Ae={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},He=Ae,We=v(60101),X=function(I,Te){return we.createElement(We.Z,(0,a.Z)({},I,{ref:Te,icon:He}))},le=we.forwardRef(X),k=le},80818:function(Ot,_e,v){v.d(_e,{Z:function(){return Ga}});var a=v(75271),we=v(45659),Ae=v(35867),He=v(37322),We=v(82187),X=v.n(We),le=v(66283),k=v(781),q=v(28037),I=v(29705),Te=v(19505),Le=v(79843),qe=v(93954),Bt=v(21611),Me=(0,a.createContext)(null),et=v(49744),Ge=v(1728),Dt=v(59373),_t=v(42684),tt=v(49975),At=function(t){var n=t.activeTabOffset,r=t.horizontal,i=t.rtl,l=t.indicator,c=l===void 0?{}:l,o=c.size,s=c.align,d=s===void 0?"center":s,g=(0,a.useState)(),b=(0,I.Z)(g,2),S=b[0],M=b[1],H=(0,a.useRef)(),E=a.useCallback(function(m){return typeof o=="function"?o(m):typeof o=="number"?o:m},[o]);function B(){tt.Z.cancel(H.current)}return(0,a.useEffect)(function(){var m={};if(n)if(r){m.width=E(n.width);var h=i?"right":"left";d==="start"&&(m[h]=n[h]),d==="center"&&(m[h]=n[h]+n.width/2,m.transform=i?"translateX(50%)":"translateX(-50%)"),d==="end"&&(m[h]=n[h]+n.width,m.transform="translateX(-100%)")}else m.height=E(n.height),d==="start"&&(m.top=n.top),d==="center"&&(m.top=n.top+n.height/2,m.transform="translateY(-50%)"),d==="end"&&(m.top=n.top+n.height,m.transform="translateY(-100%)");return B(),H.current=(0,tt.Z)(function(){var R=S&&m&&Object.keys(m).every(function(z){var D=m[z],_=S[z];return typeof D=="number"&&typeof _=="number"?Math.round(D)===Math.round(_):D===_});R||M(m)}),B},[JSON.stringify(n),r,i,d,E]),{style:S}},Ht=At,at={width:0,height:0,left:0,top:0};function Wt(e,t,n){return(0,a.useMemo)(function(){for(var r,i=new Map,l=t.get((r=e[0])===null||r===void 0?void 0:r.key)||at,c=l.left+l.width,o=0;o<e.length;o+=1){var s=e[o].key,d=t.get(s);if(!d){var g;d=t.get((g=e[o-1])===null||g===void 0?void 0:g.key)||at}var b=i.get(s)||(0,q.Z)({},d);b.right=c-b.left-b.width,i.set(s,b)}return i},[e.map(function(r){return r.key}).join("_"),t,n])}function nt(e,t){var n=a.useRef(e),r=a.useState({}),i=(0,I.Z)(r,2),l=i[1];function c(o){var s=typeof o=="function"?o(n.current):o;s!==n.current&&t(s,n.current),n.current=s,l({})}return[n.current,c]}var Gt=.1,rt=.01,Ze=20,it=Math.pow(.995,Ze);function jt(e,t){var n=(0,a.useState)(),r=(0,I.Z)(n,2),i=r[0],l=r[1],c=(0,a.useState)(0),o=(0,I.Z)(c,2),s=o[0],d=o[1],g=(0,a.useState)(0),b=(0,I.Z)(g,2),S=b[0],M=b[1],H=(0,a.useState)(),E=(0,I.Z)(H,2),B=E[0],m=E[1],h=(0,a.useRef)();function R(P){var w=P.touches[0],f=w.screenX,C=w.screenY;l({x:f,y:C}),window.clearInterval(h.current)}function z(P){if(i){var w=P.touches[0],f=w.screenX,C=w.screenY;l({x:f,y:C});var p=f-i.x,x=C-i.y;t(p,x);var j=Date.now();d(j),M(j-s),m({x:p,y:x})}}function D(){if(i&&(l(null),m(null),B)){var P=B.x/S,w=B.y/S,f=Math.abs(P),C=Math.abs(w);if(Math.max(f,C)<Gt)return;var p=P,x=w;h.current=window.setInterval(function(){if(Math.abs(p)<rt&&Math.abs(x)<rt){window.clearInterval(h.current);return}p*=it,x*=it,t(p*Ze,x*Ze)},Ze)}}var _=(0,a.useRef)();function G(P){var w=P.deltaX,f=P.deltaY,C=0,p=Math.abs(w),x=Math.abs(f);p===x?C=_.current==="x"?w:f:p>x?(C=w,_.current="x"):(C=f,_.current="y"),t(-C,-C)&&P.preventDefault()}var O=(0,a.useRef)(null);O.current={onTouchStart:R,onTouchMove:z,onTouchEnd:D,onWheel:G},a.useEffect(function(){function P(p){O.current.onTouchStart(p)}function w(p){O.current.onTouchMove(p)}function f(p){O.current.onTouchEnd(p)}function C(p){O.current.onWheel(p)}return document.addEventListener("touchmove",w,{passive:!1}),document.addEventListener("touchend",f,{passive:!0}),e.current.addEventListener("touchstart",P,{passive:!0}),e.current.addEventListener("wheel",C,{passive:!1}),function(){document.removeEventListener("touchmove",w),document.removeEventListener("touchend",f)}},[])}var kt=v(92076);function ot(e){var t=(0,a.useState)(0),n=(0,I.Z)(t,2),r=n[0],i=n[1],l=(0,a.useRef)(0),c=(0,a.useRef)();return c.current=e,(0,kt.o)(function(){var o;(o=c.current)===null||o===void 0||o.call(c)},[r]),function(){l.current===r&&(l.current+=1,i(l.current))}}function Kt(e){var t=(0,a.useRef)([]),n=(0,a.useState)({}),r=(0,I.Z)(n,2),i=r[1],l=(0,a.useRef)(typeof e=="function"?e():e),c=ot(function(){var s=l.current;t.current.forEach(function(d){s=d(s)}),t.current=[],l.current=s,i({})});function o(s){t.current.push(s),c()}return[l.current,o]}var lt={width:0,height:0,left:0,top:0,right:0};function Vt(e,t,n,r,i,l,c){var o=c.tabs,s=c.tabPosition,d=c.rtl,g,b,S;return["top","bottom"].includes(s)?(g="width",b=d?"right":"left",S=Math.abs(n)):(g="height",b="top",S=-n),(0,a.useMemo)(function(){if(!o.length)return[0,0];for(var M=o.length,H=M,E=0;E<M;E+=1){var B=e.get(o[E].key)||lt;if(Math.floor(B[b]+B[g])>Math.floor(S+t)){H=E-1;break}}for(var m=0,h=M-1;h>=0;h-=1){var R=e.get(o[h].key)||lt;if(R[b]<S){m=h+1;break}}return m>=H?[0,0]:[m,H]},[e,t,r,i,l,S,s,o.map(function(M){return M.key}).join("_"),d])}function ct(e){var t;return e instanceof Map?(t={},e.forEach(function(n,r){t[r]=n})):t=e,JSON.stringify(t)}var Xt="TABS_DQ";function st(e){return String(e).replace(/"/g,Xt)}function je(e,t,n,r){return!(!n||r||e===!1||e===void 0&&(t===!1||t===null))}var Ut=a.forwardRef(function(e,t){var n=e.prefixCls,r=e.editable,i=e.locale,l=e.style;return!r||r.showAdd===!1?null:a.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:l,"aria-label":(i==null?void 0:i.addAriaLabel)||"Add tab",onClick:function(o){r.onEdit("add",{event:o})}},r.addIcon||"+")}),dt=Ut,Ft=a.forwardRef(function(e,t){var n=e.position,r=e.prefixCls,i=e.extra;if(!i)return null;var l,c={};return(0,Te.Z)(i)==="object"&&!a.isValidElement(i)?c=i:c.right=i,n==="right"&&(l=c.right),n==="left"&&(l=c.left),l?a.createElement("div",{className:"".concat(r,"-extra-content"),ref:t},l):null}),ut=Ft,Yt=v(84123),ft=v(42915),ue=v(14583),Qt=a.forwardRef(function(e,t){var n=e.prefixCls,r=e.id,i=e.tabs,l=e.locale,c=e.mobile,o=e.more,s=o===void 0?{}:o,d=e.style,g=e.className,b=e.editable,S=e.tabBarGutter,M=e.rtl,H=e.removeAriaLabel,E=e.onTabClick,B=e.getPopupContainer,m=e.popupClassName,h=(0,a.useState)(!1),R=(0,I.Z)(h,2),z=R[0],D=R[1],_=(0,a.useState)(null),G=(0,I.Z)(_,2),O=G[0],P=G[1],w=s.icon,f=w===void 0?"More":w,C="".concat(r,"-more-popup"),p="".concat(n,"-dropdown"),x=O!==null?"".concat(C,"-").concat(O):null,j=l==null?void 0:l.dropdownAriaLabel;function K(T,W){T.preventDefault(),T.stopPropagation(),b.onEdit("remove",{key:W,event:T})}var F=a.createElement(ft.ZP,{onClick:function(W){var V=W.key,U=W.domEvent;E(V,U),D(!1)},prefixCls:"".concat(p,"-menu"),id:C,tabIndex:-1,role:"listbox","aria-activedescendant":x,selectedKeys:[O],"aria-label":j!==void 0?j:"expanded dropdown"},i.map(function(T){var W=T.closable,V=T.disabled,U=T.closeIcon,J=T.key,ie=T.label,ee=je(W,U,b,V);return a.createElement(ft.sN,{key:J,id:"".concat(C,"-").concat(J),role:"option","aria-controls":r&&"".concat(r,"-panel-").concat(J),disabled:V},a.createElement("span",null,ie),ee&&a.createElement("button",{type:"button","aria-label":H||"remove",tabIndex:0,className:"".concat(p,"-menu-item-remove"),onClick:function(ve){ve.stopPropagation(),K(ve,J)}},U||b.removeIcon||"\xD7"))}));function Q(T){for(var W=i.filter(function(ee){return!ee.disabled}),V=W.findIndex(function(ee){return ee.key===O})||0,U=W.length,J=0;J<U;J+=1){V=(V+T+U)%U;var ie=W[V];if(!ie.disabled){P(ie.key);return}}}function $(T){var W=T.which;if(!z){[ue.Z.DOWN,ue.Z.SPACE,ue.Z.ENTER].includes(W)&&(D(!0),T.preventDefault());return}switch(W){case ue.Z.UP:Q(-1),T.preventDefault();break;case ue.Z.DOWN:Q(1),T.preventDefault();break;case ue.Z.ESC:D(!1);break;case ue.Z.SPACE:case ue.Z.ENTER:O!==null&&E(O,T);break}}(0,a.useEffect)(function(){var T=document.getElementById(x);T&&T.scrollIntoView&&T.scrollIntoView(!1)},[O]),(0,a.useEffect)(function(){z||P(null)},[z]);var re=(0,k.Z)({},M?"marginRight":"marginLeft",S);i.length||(re.visibility="hidden",re.order=1);var te=X()((0,k.Z)({},"".concat(p,"-rtl"),M)),Y=c?null:a.createElement(Yt.Z,(0,le.Z)({prefixCls:p,overlay:F,visible:i.length?z:!1,onVisibleChange:D,overlayClassName:X()(te,m),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:B},s),a.createElement("button",{type:"button",className:"".concat(n,"-nav-more"),style:re,"aria-haspopup":"listbox","aria-controls":C,id:"".concat(r,"-more"),"aria-expanded":z,onKeyDown:$},f));return a.createElement("div",{className:X()("".concat(n,"-nav-operations"),g),style:d,ref:t},Y,a.createElement(dt,{prefixCls:n,locale:l,editable:b}))}),Jt=a.memo(Qt,function(e,t){return t.tabMoving}),qt=function(t){var n=t.prefixCls,r=t.id,i=t.active,l=t.focus,c=t.tab,o=c.key,s=c.label,d=c.disabled,g=c.closeIcon,b=c.icon,S=t.closable,M=t.renderWrapper,H=t.removeAriaLabel,E=t.editable,B=t.onClick,m=t.onFocus,h=t.onBlur,R=t.onKeyDown,z=t.onMouseDown,D=t.onMouseUp,_=t.style,G=t.tabCount,O=t.currentPosition,P="".concat(n,"-tab"),w=je(S,g,E,d);function f(K){d||B(K)}function C(K){K.preventDefault(),K.stopPropagation(),E.onEdit("remove",{key:o,event:K})}var p=a.useMemo(function(){return b&&typeof s=="string"?a.createElement("span",null,s):s},[s,b]),x=a.useRef(null);a.useEffect(function(){l&&x.current&&x.current.focus()},[l]);var j=a.createElement("div",{key:o,"data-node-key":st(o),className:X()(P,(0,k.Z)((0,k.Z)((0,k.Z)((0,k.Z)({},"".concat(P,"-with-remove"),w),"".concat(P,"-active"),i),"".concat(P,"-disabled"),d),"".concat(P,"-focus"),l)),style:_,onClick:f},a.createElement("div",{ref:x,role:"tab","aria-selected":i,id:r&&"".concat(r,"-tab-").concat(o),className:"".concat(P,"-btn"),"aria-controls":r&&"".concat(r,"-panel-").concat(o),"aria-disabled":d,tabIndex:d?null:i?0:-1,onClick:function(F){F.stopPropagation(),f(F)},onKeyDown:R,onMouseDown:z,onMouseUp:D,onFocus:m,onBlur:h},l&&a.createElement("div",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"Tab ".concat(O," of ").concat(G)),b&&a.createElement("span",{className:"".concat(P,"-icon")},b),s&&p),w&&a.createElement("button",{type:"button",role:"tab","aria-label":H||"remove",tabIndex:i?0:-1,className:"".concat(P,"-remove"),onClick:function(F){F.stopPropagation(),C(F)}},g||E.removeIcon||"\xD7"));return M?M(j):j},ea=qt,ta=function(t,n){var r=t.offsetWidth,i=t.offsetHeight,l=t.offsetTop,c=t.offsetLeft,o=t.getBoundingClientRect(),s=o.width,d=o.height,g=o.left,b=o.top;return Math.abs(s-r)<1?[s,d,g-n.left,b-n.top]:[r,i,c,l]},pe=function(t){var n=t.current||{},r=n.offsetWidth,i=r===void 0?0:r,l=n.offsetHeight,c=l===void 0?0:l;if(t.current){var o=t.current.getBoundingClientRect(),s=o.width,d=o.height;if(Math.abs(s-i)<1)return[s,d]}return[i,c]},Ne=function(t,n){return t[n?0:1]},aa=a.forwardRef(function(e,t){var n=e.className,r=e.style,i=e.id,l=e.animated,c=e.activeKey,o=e.rtl,s=e.extra,d=e.editable,g=e.locale,b=e.tabPosition,S=e.tabBarGutter,M=e.children,H=e.onTabClick,E=e.onTabScroll,B=e.indicator,m=a.useContext(Me),h=m.prefixCls,R=m.tabs,z=(0,a.useRef)(null),D=(0,a.useRef)(null),_=(0,a.useRef)(null),G=(0,a.useRef)(null),O=(0,a.useRef)(null),P=(0,a.useRef)(null),w=(0,a.useRef)(null),f=b==="top"||b==="bottom",C=nt(0,function(L,u){f&&E&&E({direction:L>u?"left":"right"})}),p=(0,I.Z)(C,2),x=p[0],j=p[1],K=nt(0,function(L,u){!f&&E&&E({direction:L>u?"top":"bottom"})}),F=(0,I.Z)(K,2),Q=F[0],$=F[1],re=(0,a.useState)([0,0]),te=(0,I.Z)(re,2),Y=te[0],T=te[1],W=(0,a.useState)([0,0]),V=(0,I.Z)(W,2),U=V[0],J=V[1],ie=(0,a.useState)([0,0]),ee=(0,I.Z)(ie,2),$e=ee[0],ve=ee[1],ye=(0,a.useState)([0,0]),Se=(0,I.Z)(ye,2),Z=Se[0],se=Se[1],ge=Kt(new Map),pt=(0,I.Z)(ge,2),ja=pt[0],ka=pt[1],ze=Wt(R,ja,U[0]),ke=Ne(Y,f),Ee=Ne(U,f),Ke=Ne($e,f),$t=Ne(Z,f),yt=Math.floor(ke)<Math.floor(Ee+Ke),ce=yt?ke-$t:ke-Ke,Ka="".concat(h,"-nav-operations-hidden"),be=0,he=0;f&&o?(be=0,he=Math.max(0,Ee-ce)):(be=Math.min(0,ce-Ee),he=0);function Ve(L){return L<be?be:L>he?he:L}var Xe=(0,a.useRef)(null),Va=(0,a.useState)(),St=(0,I.Z)(Va,2),Oe=St[0],Ct=St[1];function Ue(){Ct(Date.now())}function Fe(){Xe.current&&clearTimeout(Xe.current)}jt(G,function(L,u){function N(A,oe){A(function(ae){var xe=Ve(ae+oe);return xe})}return yt?(f?N(j,L):N($,u),Fe(),Ue(),!0):!1}),(0,a.useEffect)(function(){return Fe(),Oe&&(Xe.current=setTimeout(function(){Ct(0)},100)),Fe},[Oe]);var Xa=Vt(ze,ce,f?x:Q,Ee,Ke,$t,(0,q.Z)((0,q.Z)({},e),{},{tabs:R})),xt=(0,I.Z)(Xa,2),Ua=xt[0],Fa=xt[1],Pt=(0,Dt.Z)(function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c,u=ze.get(L)||{width:0,height:0,left:0,right:0,top:0};if(f){var N=x;o?u.right<x?N=u.right:u.right+u.width>x+ce&&(N=u.right+u.width-ce):u.left<-x?N=-u.left:u.left+u.width>-x+ce&&(N=-(u.left+u.width-ce)),$(0),j(Ve(N))}else{var A=Q;u.top<-Q?A=-u.top:u.top+u.height>-Q+ce&&(A=-(u.top+u.height-ce)),j(0),$(Ve(A))}}),Ya=(0,a.useState)(),Tt=(0,I.Z)(Ya,2),me=Tt[0],Re=Tt[1],Qa=(0,a.useState)(!1),Et=(0,I.Z)(Qa,2),Ja=Et[0],Rt=Et[1],de=R.filter(function(L){return!L.disabled}).map(function(L){return L.key}),Ce=function(u){var N=de.indexOf(me||c),A=de.length,oe=(N+u+A)%A,ae=de[oe];Re(ae)},qa=function(u){var N=u.code,A=o&&f,oe=de[0],ae=de[de.length-1];switch(N){case"ArrowLeft":{f&&Ce(A?1:-1);break}case"ArrowRight":{f&&Ce(A?-1:1);break}case"ArrowUp":{u.preventDefault(),f||Ce(-1);break}case"ArrowDown":{u.preventDefault(),f||Ce(1);break}case"Home":{u.preventDefault(),Re(oe);break}case"End":{u.preventDefault(),Re(ae);break}case"Enter":case"Space":{u.preventDefault(),H(me!=null?me:c,u);break}case"Backspace":case"Delete":{var xe=de.indexOf(me),ne=R.find(function(Pe){return Pe.key===me}),Je=je(ne==null?void 0:ne.closable,ne==null?void 0:ne.closeIcon,d,ne==null?void 0:ne.disabled);Je&&(u.preventDefault(),u.stopPropagation(),d.onEdit("remove",{key:me,event:u}),xe===de.length-1?Ce(-1):Ce(1));break}}},Be={};f?Be[o?"marginRight":"marginLeft"]=S:Be.marginTop=S;var It=R.map(function(L,u){var N=L.key;return a.createElement(ea,{id:i,prefixCls:h,key:N,tab:L,style:u===0?void 0:Be,closable:L.closable,editable:d,active:N===c,focus:N===me,renderWrapper:M,removeAriaLabel:g==null?void 0:g.removeAriaLabel,tabCount:de.length,currentPosition:u+1,onClick:function(oe){H(N,oe)},onKeyDown:qa,onFocus:function(){Ja||Re(N),Pt(N),Ue(),G.current&&(o||(G.current.scrollLeft=0),G.current.scrollTop=0)},onBlur:function(){Re(void 0)},onMouseDown:function(){Rt(!0)},onMouseUp:function(){Rt(!1)}})}),wt=function(){return ka(function(){var u,N=new Map,A=(u=O.current)===null||u===void 0?void 0:u.getBoundingClientRect();return R.forEach(function(oe){var ae,xe=oe.key,ne=(ae=O.current)===null||ae===void 0?void 0:ae.querySelector('[data-node-key="'.concat(st(xe),'"]'));if(ne){var Je=ta(ne,A),Pe=(0,I.Z)(Je,4),rn=Pe[0],on=Pe[1],ln=Pe[2],cn=Pe[3];N.set(xe,{width:rn,height:on,left:ln,top:cn})}}),N})};(0,a.useEffect)(function(){wt()},[R.map(function(L){return L.key}).join("_")]);var De=ot(function(){var L=pe(z),u=pe(D),N=pe(_);T([L[0]-u[0]-N[0],L[1]-u[1]-N[1]]);var A=pe(w);ve(A);var oe=pe(P);se(oe);var ae=pe(O);J([ae[0]-A[0],ae[1]-A[1]]),wt()}),en=R.slice(0,Ua),tn=R.slice(Fa+1),Lt=[].concat((0,et.Z)(en),(0,et.Z)(tn)),Mt=ze.get(c),an=Ht({activeTabOffset:Mt,horizontal:f,indicator:B,rtl:o}),nn=an.style;(0,a.useEffect)(function(){Pt()},[c,be,he,ct(Mt),ct(ze),f]),(0,a.useEffect)(function(){De()},[o]);var Zt=!!Lt.length,Ie="".concat(h,"-nav-wrap"),Ye,Qe,Nt,zt;return f?o?(Qe=x>0,Ye=x!==he):(Ye=x<0,Qe=x!==be):(Nt=Q<0,zt=Q!==be),a.createElement(Ge.Z,{onResize:De},a.createElement("div",{ref:(0,_t.x1)(t,z),role:"tablist","aria-orientation":f?"horizontal":"vertical",className:X()("".concat(h,"-nav"),n),style:r,onKeyDown:function(){Ue()}},a.createElement(ut,{ref:D,position:"left",extra:s,prefixCls:h}),a.createElement(Ge.Z,{onResize:De},a.createElement("div",{className:X()(Ie,(0,k.Z)((0,k.Z)((0,k.Z)((0,k.Z)({},"".concat(Ie,"-ping-left"),Ye),"".concat(Ie,"-ping-right"),Qe),"".concat(Ie,"-ping-top"),Nt),"".concat(Ie,"-ping-bottom"),zt)),ref:G},a.createElement(Ge.Z,{onResize:De},a.createElement("div",{ref:O,className:"".concat(h,"-nav-list"),style:{transform:"translate(".concat(x,"px, ").concat(Q,"px)"),transition:Oe?"none":void 0}},It,a.createElement(dt,{ref:w,prefixCls:h,locale:g,editable:d,style:(0,q.Z)((0,q.Z)({},It.length===0?void 0:Be),{},{visibility:Zt?"hidden":null})}),a.createElement("div",{className:X()("".concat(h,"-ink-bar"),(0,k.Z)({},"".concat(h,"-ink-bar-animated"),l.inkBar)),style:nn}))))),a.createElement(Jt,(0,le.Z)({},e,{removeAriaLabel:g==null?void 0:g.removeAriaLabel,ref:P,prefixCls:h,tabs:Lt,className:!Zt&&Ka,tabMoving:!!Oe})),a.createElement(ut,{ref:_,position:"right",extra:s,prefixCls:h})))}),vt=aa,na=a.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,i=e.style,l=e.id,c=e.active,o=e.tabKey,s=e.children;return a.createElement("div",{id:l&&"".concat(l,"-panel-").concat(o),role:"tabpanel",tabIndex:c?0:-1,"aria-labelledby":l&&"".concat(l,"-tab-").concat(o),"aria-hidden":!c,style:i,className:X()(n,c&&"".concat(n,"-active"),r),ref:t},s)}),bt=na,ra=["renderTabBar"],ia=["label","key"],oa=function(t){var n=t.renderTabBar,r=(0,Le.Z)(t,ra),i=a.useContext(Me),l=i.tabs;if(n){var c=(0,q.Z)((0,q.Z)({},r),{},{panes:l.map(function(o){var s=o.label,d=o.key,g=(0,Le.Z)(o,ia);return a.createElement(bt,(0,le.Z)({tab:s,key:d,tabKey:d},g))})});return n(c,vt)}return a.createElement(vt,r)},la=oa,ca=v(62803),sa=["key","forceRender","style","className","destroyInactiveTabPane"],da=function(t){var n=t.id,r=t.activeKey,i=t.animated,l=t.tabPosition,c=t.destroyInactiveTabPane,o=a.useContext(Me),s=o.prefixCls,d=o.tabs,g=i.tabPane,b="".concat(s,"-tabpane");return a.createElement("div",{className:X()("".concat(s,"-content-holder"))},a.createElement("div",{className:X()("".concat(s,"-content"),"".concat(s,"-content-").concat(l),(0,k.Z)({},"".concat(s,"-content-animated"),g))},d.map(function(S){var M=S.key,H=S.forceRender,E=S.style,B=S.className,m=S.destroyInactiveTabPane,h=(0,Le.Z)(S,sa),R=M===r;return a.createElement(ca.ZP,(0,le.Z)({key:M,visible:R,forceRender:H,removeOnLeave:!!(c||m),leavedClassName:"".concat(b,"-hidden")},i.tabPaneMotion),function(z,D){var _=z.style,G=z.className;return a.createElement(bt,(0,le.Z)({},h,{prefixCls:b,id:n,tabKey:M,animated:g,active:R,style:(0,q.Z)((0,q.Z)({},E),_),className:X()(B,G),ref:D}))})})))},ua=da,sn=v(4449);function fa(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},t;return e===!1?t={inkBar:!1,tabPane:!1}:e===!0?t={inkBar:!0,tabPane:!1}:t=(0,q.Z)({inkBar:!0},(0,Te.Z)(e)==="object"?e:{}),t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}var va=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","more","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],mt=0,ba=a.forwardRef(function(e,t){var n=e.id,r=e.prefixCls,i=r===void 0?"rc-tabs":r,l=e.className,c=e.items,o=e.direction,s=e.activeKey,d=e.defaultActiveKey,g=e.editable,b=e.animated,S=e.tabPosition,M=S===void 0?"top":S,H=e.tabBarGutter,E=e.tabBarStyle,B=e.tabBarExtraContent,m=e.locale,h=e.more,R=e.destroyInactiveTabPane,z=e.renderTabBar,D=e.onChange,_=e.onTabClick,G=e.onTabScroll,O=e.getPopupContainer,P=e.popupClassName,w=e.indicator,f=(0,Le.Z)(e,va),C=a.useMemo(function(){return(c||[]).filter(function(Z){return Z&&(0,Te.Z)(Z)==="object"&&"key"in Z})},[c]),p=o==="rtl",x=fa(b),j=(0,a.useState)(!1),K=(0,I.Z)(j,2),F=K[0],Q=K[1];(0,a.useEffect)(function(){Q((0,Bt.Z)())},[]);var $=(0,qe.Z)(function(){var Z;return(Z=C[0])===null||Z===void 0?void 0:Z.key},{value:s,defaultValue:d}),re=(0,I.Z)($,2),te=re[0],Y=re[1],T=(0,a.useState)(function(){return C.findIndex(function(Z){return Z.key===te})}),W=(0,I.Z)(T,2),V=W[0],U=W[1];(0,a.useEffect)(function(){var Z=C.findIndex(function(ge){return ge.key===te});if(Z===-1){var se;Z=Math.max(0,Math.min(V,C.length-1)),Y((se=C[Z])===null||se===void 0?void 0:se.key)}U(Z)},[C.map(function(Z){return Z.key}).join("_"),te,V]);var J=(0,qe.Z)(null,{value:n}),ie=(0,I.Z)(J,2),ee=ie[0],$e=ie[1];(0,a.useEffect)(function(){n||($e("rc-tabs-".concat(mt)),mt+=1)},[]);function ve(Z,se){_==null||_(Z,se);var ge=Z!==te;Y(Z),ge&&(D==null||D(Z))}var ye={id:ee,activeKey:te,animated:x,tabPosition:M,rtl:p,mobile:F},Se=(0,q.Z)((0,q.Z)({},ye),{},{editable:g,locale:m,more:h,tabBarGutter:H,onTabClick:ve,onTabScroll:G,extra:B,style:E,panes:null,getPopupContainer:O,popupClassName:P,indicator:w});return a.createElement(Me.Provider,{value:{tabs:C,prefixCls:i}},a.createElement("div",(0,le.Z)({ref:t,id:n,className:X()(i,"".concat(i,"-").concat(M),(0,k.Z)((0,k.Z)((0,k.Z)({},"".concat(i,"-mobile"),F),"".concat(i,"-editable"),g),"".concat(i,"-rtl"),p),l)},f),a.createElement(la,(0,le.Z)({},Se,{renderTabBar:z})),a.createElement(ua,(0,le.Z)({destroyInactiveTabPane:R},ye,{animated:x}))))}),ma=ba,ga=ma,ha=v(70436),pa=v(22123),$a=v(44413),ya=v(68819);const Sa={motionAppear:!1,motionEnter:!0,motionLeave:!0};function Ca(e,t={inkBar:!0,tabPane:!1}){let n;return t===!1?n={inkBar:!1,tabPane:!1}:t===!0?n={inkBar:!0,tabPane:!0}:n=Object.assign({inkBar:!0},typeof t=="object"?t:{}),n.tabPane&&(n.tabPaneMotion=Object.assign(Object.assign({},Sa),{motionName:(0,ya.m)(e,"switch")})),n}var xa=v(81626),Pa=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Ta(e){return e.filter(t=>t)}function Ea(e,t){if(e)return e.map(r=>{var i;const l=(i=r.destroyOnHidden)!==null&&i!==void 0?i:r.destroyInactiveTabPane;return Object.assign(Object.assign({},r),{destroyInactiveTabPane:l})});const n=(0,xa.Z)(t).map(r=>{if(a.isValidElement(r)){const{key:i,props:l}=r,c=l||{},{tab:o}=c,s=Pa(c,["tab"]);return Object.assign(Object.assign({key:String(i)},s),{label:o})}return null});return Ta(n)}var Ra=Ea,y=v(89260),fe=v(67083),Ia=v(89348),wa=v(30509),gt=v(1916),La=e=>{const{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[(0,gt.oN)(e,"slide-up"),(0,gt.oN)(e,"slide-down")]]};const Ma=e=>{const{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:i,colorBorderSecondary:l,itemSelectedColor:c}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:r,border:`${(0,y.bf)(e.lineWidth)} ${e.lineType} ${l}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:c,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:(0,fe.oN)(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:"none"},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:(0,y.bf)(i)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${(0,y.bf)(e.borderRadiusLG)} ${(0,y.bf)(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${(0,y.bf)(e.borderRadiusLG)} ${(0,y.bf)(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:(0,y.bf)(i)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${(0,y.bf)(e.borderRadiusLG)} 0 0 ${(0,y.bf)(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${(0,y.bf)(e.borderRadiusLG)} ${(0,y.bf)(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},Za=e=>{const{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return{[`${t}-dropdown`]:Object.assign(Object.assign({},(0,fe.Wf)(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${(0,y.bf)(r)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":Object.assign(Object.assign({},fe.vS),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${(0,y.bf)(e.paddingXXS)} ${(0,y.bf)(e.paddingSM)}`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},Na=e=>{const{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:i,verticalItemPadding:l,verticalItemMargin:c,calc:o}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:i,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${(0,y.bf)(e.lineWidth)} ${e.lineType} ${r}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:`width ${e.motionDurationSlow}, left ${e.motionDurationSlow},
right ${e.motionDurationSlow}`}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav,
> div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:"column",minWidth:o(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:l,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:c},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:`height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:(0,y.bf)(o(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${(0,y.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:o(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${(0,y.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},za=e=>{const{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:l,horizontalItemPaddingSM:c,horizontalItemPaddingLG:o}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:c,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:o,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:i,minHeight:i}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${(0,y.bf)(e.borderRadius)} ${(0,y.bf)(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${(0,y.bf)(e.borderRadius)} ${(0,y.bf)(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${(0,y.bf)(e.borderRadius)} ${(0,y.bf)(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${(0,y.bf)(e.borderRadius)} 0 0 ${(0,y.bf)(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:l,minHeight:l}}}}}},Oa=e=>{const{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:l,horizontalItemPadding:c,itemSelectedColor:o,itemColor:s}=e,d=`${t}-tab`;return{[d]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:c,fontSize:e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:s,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:"none",transition:`all ${e.motionDurationSlow}`,[`${d}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":Object.assign({flex:"none",marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading}},(0,fe.Qy)(e)),"&:hover":{color:r},[`&${d}-active ${d}-btn`]:{color:o,textShadow:e.tabsActiveTextShadow},[`&${d}-focus ${d}-btn:focus-visible`]:(0,fe.oN)(e),[`&${d}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${d}-disabled ${d}-btn, &${d}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${d}-remove ${i}`]:{margin:0},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${d} + ${d}`]:{margin:{_skip_check_:!0,value:l}}}},Ba=e=>{const{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:l}=e;return{[`${t}-rtl`]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:n},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:(0,y.bf)(e.marginSM)}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:(0,y.bf)(e.marginXS)},marginLeft:{_skip_check_:!0,value:(0,y.bf)(l(e.marginXXS).mul(-1).equal())},[r]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:i},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},Da=e=>{const{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:i,itemHoverColor:l,itemActiveColor:c,colorBorderSecondary:o}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,fe.Wf)(e)),{display:"flex",[`> ${t}-nav, > div > ${t}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${t}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${t}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${t}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${t}-nav-more`]:{position:"relative",padding:n,background:"transparent",border:0,color:e.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:Object.assign({minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:i},background:"transparent",border:`${(0,y.bf)(e.lineWidth)} ${e.lineType} ${o}`,borderRadius:`${(0,y.bf)(e.borderRadiusLG)} ${(0,y.bf)(e.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:l},"&:active, &:focus:not(:focus-visible)":{color:c}},(0,fe.Qy)(e,-3))},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"}}),Oa(e)),{[`${t}-content`]:{position:"relative",width:"100%"},[`${t}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-tabpane`]:Object.assign(Object.assign({},(0,fe.Qy)(e)),{"&-hidden":{display:"none"}})}),[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:"auto"}}}}}},_a=e=>{const{cardHeight:t,cardHeightSM:n,cardHeightLG:r,controlHeight:i,controlHeightLG:l}=e,c=t||l,o=n||i,s=r||l+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:c,cardHeightSM:o,cardHeightLG:s,cardPadding:`${(c-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(o-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(s-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}};var Aa=(0,Ia.I$)("Tabs",e=>{const t=(0,wa.IX)(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${(0,y.bf)(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${(0,y.bf)(e.horizontalItemGutter)}`});return[za(t),Ba(t),Na(t),Za(t),Ma(t),Da(t),La(t)]},_a),Ha=()=>null,Wa=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const ht=e=>{var t,n,r,i,l,c,o,s,d,g,b;const{type:S,className:M,rootClassName:H,size:E,onEdit:B,hideAdd:m,centered:h,addIcon:R,removeIcon:z,moreIcon:D,more:_,popupClassName:G,children:O,items:P,animated:w,style:f,indicatorSize:C,indicator:p,destroyInactiveTabPane:x,destroyOnHidden:j}=e,K=Wa(e,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","removeIcon","moreIcon","more","popupClassName","children","items","animated","style","indicatorSize","indicator","destroyInactiveTabPane","destroyOnHidden"]),{prefixCls:F}=K,{direction:Q,tabs:$,getPrefixCls:re,getPopupContainer:te}=a.useContext(ha.E_),Y=re("tabs",F),T=(0,pa.Z)(Y),[W,V,U]=Aa(Y,T);let J;S==="editable-card"&&(J={onEdit:(Z,{key:se,event:ge})=>{B==null||B(Z==="add"?ge:se,Z)},removeIcon:(t=z!=null?z:$==null?void 0:$.removeIcon)!==null&&t!==void 0?t:a.createElement(we.Z,null),addIcon:(R!=null?R:$==null?void 0:$.addIcon)||a.createElement(He.Z,null),showAdd:m!==!0});const ie=re(),ee=(0,$a.Z)(E),$e=Ra(P,O),ve=Ca(Y,w),ye=Object.assign(Object.assign({},$==null?void 0:$.style),f),Se={align:(n=p==null?void 0:p.align)!==null&&n!==void 0?n:(r=$==null?void 0:$.indicator)===null||r===void 0?void 0:r.align,size:(o=(l=(i=p==null?void 0:p.size)!==null&&i!==void 0?i:C)!==null&&l!==void 0?l:(c=$==null?void 0:$.indicator)===null||c===void 0?void 0:c.size)!==null&&o!==void 0?o:$==null?void 0:$.indicatorSize};return W(a.createElement(ga,Object.assign({direction:Q,getPopupContainer:te},K,{items:$e,className:X()({[`${Y}-${ee}`]:ee,[`${Y}-card`]:["card","editable-card"].includes(S),[`${Y}-editable-card`]:S==="editable-card",[`${Y}-centered`]:h},$==null?void 0:$.className,M,H,V,U,T),popupClassName:X()(G,V,U,T),style:ye,editable:J,more:Object.assign({icon:(b=(g=(d=(s=$==null?void 0:$.more)===null||s===void 0?void 0:s.icon)!==null&&d!==void 0?d:$==null?void 0:$.moreIcon)!==null&&g!==void 0?g:D)!==null&&b!==void 0?b:a.createElement(Ae.Z,null),transitionName:`${ie}-slide-up`},_),prefixCls:Y,animated:ve,indicator:Se,destroyInactiveTabPane:j!=null?j:x})))};ht.TabPane=Ha;var Ga=ht}}]);