(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[704],{25414:function(){},51752:function(Et,Be,S){"use strict";S.d(Be,{Z:function(){return Yt}});var w=S(96156),ce=S(22122),Te=S(54549),We=S(44545),St=S(49101),xt=S(94184),j=S.n(xt),R=S(28481),De=S(90484),Ct=S(81253),z=S(28991),t=S(67294),Tt=S(50344),Zt=S(31131),Oe=S(21770),Ke=S(85061),le=S(75164),$e=S(48717);function He(e){var o=(0,t.useRef)(),n=(0,t.useRef)(!1);function r(){for(var a=arguments.length,i=new Array(a),c=0;cu&&mf+T){M=D-1;break}}for(var h=0,p=b-1;p>=0;p-=1){var L=e.get(i[p].key)||je;if(L[v]K?(x=P,V.current="x"):(x=I,V.current="y"),o(-x,-x)&&d.preventDefault()}var Z=(0,t.useRef)(null);Z.current={onTouchStart:h,onTouchMove:p,onTouchEnd:L,onWheel:H},t.useEffect(function(){function d(g){Z.current.onTouchStart(g)}function P(g){Z.current.onTouchMove(g)}function I(g){Z.current.onTouchEnd(g)}function x(g){Z.current.onWheel(g)}return document.addEventListener("touchmove",P,{passive:!1}),document.addEventListener("touchend",I,{passive:!1}),e.current.addEventListener("touchstart",d,{passive:!1}),e.current.addEventListener("wheel",x),function(){document.removeEventListener("touchmove",P),document.removeEventListener("touchend",I)}},[])}function Dt(){var e=(0,t.useRef)(new Map);function o(r){return e.current.has(r)||e.current.set(r,t.createRef()),e.current.get(r)}function n(r){e.current.delete(r)}return[o,n]}function Ye(e,o){var n=t.useRef(e),r=t.useState({}),a=(0,R.Z)(r,2),i=a[1];function c(s){var l=typeof s=="function"?s(n.current):s;l!==n.current&&o(l,n.current),n.current=l,i({})}return[n.current,c]}var Xe=function(o){var n=o.position,r=o.prefixCls,a=o.extra;if(!a)return null;var i,c={};return a&&(0,De.Z)(a)==="object"&&!t.isValidElement(a)?c=a:c.right=a,n==="right"&&(i=c.right),n==="left"&&(i=c.left),i?t.createElement("div",{className:"".concat(r,"-extra-content")},i):null};function Ot(e,o){var n,r=t.useContext(Ze),a=r.prefixCls,i=r.tabs,c=e.className,s=e.style,l=e.id,v=e.animated,f=e.activeKey,u=e.rtl,m=e.extra,A=e.editable,T=e.locale,b=e.tabPosition,M=e.tabBarGutter,D=e.children,O=e.onTabClick,h=e.onTabScroll,p=(0,t.useRef)(),L=(0,t.useRef)(),V=(0,t.useRef)(),H=(0,t.useRef)(),Z=Dt(),d=(0,R.Z)(Z,2),P=d[0],I=d[1],x=b==="top"||b==="bottom",g=Ye(0,function(C,E){x&&h&&h({direction:C>E?"left":"right"})}),K=(0,R.Z)(g,2),N=K[0],_=K[1],ie=Ye(0,function(C,E){!x&&h&&h({direction:C>E?"top":"bottom"})}),J=(0,R.Z)(ie,2),Y=J[0],ne=J[1],y=(0,t.useState)(0),k=(0,R.Z)(y,2),$=k[0],F=k[1],re=(0,t.useState)(0),ee=(0,R.Z)(re,2),Q=ee[0],Re=ee[1],ye=(0,t.useState)(null),ge=(0,R.Z)(ye,2),U=ge[0],se=ge[1],Pe=(0,t.useState)(null),ue=(0,R.Z)(Pe,2),q=ue[0],Ee=ue[1],B=(0,t.useState)(0),te=(0,R.Z)(B,2),de=te[0],Xt=te[1],Jt=(0,t.useState)(0),tt=(0,R.Z)(Jt,2),Qt=tt[0],qt=tt[1],_t=Rt(new Map),at=(0,R.Z)(_t,2),ea=at[0],ta=at[1],Se=Nt(i,ea,$),aa="".concat(a,"-nav-operations-hidden"),ve=0,fe=0;x?u?(ve=0,fe=Math.max(0,$-U)):(ve=Math.min(0,U-$),fe=0):(ve=Math.min(0,q-Q),fe=0);function Ie(C){return Cfe?fe:C}var nt=(0,t.useRef)(),na=(0,t.useState)(),rt=(0,R.Z)(na,2),xe=rt[0],ot=rt[1];function Ne(){ot(Date.now())}function ke(){window.clearTimeout(nt.current)}Wt(p,function(C,E){function W(G,oe){G(function(be){var Le=Ie(be+oe);return Le})}if(x){if(U>=$)return!1;W(_,C)}else{if(q>=Q)return!1;W(ne,E)}return ke(),Ne(),!0}),(0,t.useEffect)(function(){return ke(),xe&&(nt.current=window.setTimeout(function(){ot(0)},100)),ke},[xe]);function it(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:f,E=Se.get(C)||{width:0,height:0,left:0,right:0,top:0};if(x){var W=N;u?E.rightN+U&&(W=E.right+E.width-U):E.left<-N?W=-E.left:E.left+E.width>-N+U&&(W=-(E.left+E.width-U)),ne(0),_(Ie(W))}else{var G=Y;E.top<-Y?G=-E.top:E.top+E.height>-Y+q&&(G=-(E.top+E.height-q)),_(0),ne(Ie(G))}}var ra=kt(Se,{width:U,height:q,left:N,top:Y},{width:$,height:Q},{width:de,height:Qt},(0,z.Z)((0,z.Z)({},e),{},{tabs:i})),ct=(0,R.Z)(ra,2),oa=ct[0],ia=ct[1],Ce={};b==="top"||b==="bottom"?Ce[u?"marginRight":"marginLeft"]=M:Ce.marginTop=M;var lt=i.map(function(C,E){var W=C.key;return t.createElement(It,{id:l,prefixCls:a,key:W,tab:C,style:E===0?void 0:Ce,closable:C.closable,editable:A,active:W===f,renderWrapper:D,removeAriaLabel:T==null?void 0:T.removeAriaLabel,ref:P(W),onClick:function(oe){O(W,oe)},onRemove:function(){I(W)},onFocus:function(){it(W),Ne(),!!p.current&&(u||(p.current.scrollLeft=0),p.current.scrollTop=0)}})}),we=He(function(){var C,E,W,G,oe,be,Le=((C=p.current)===null||C===void 0?void 0:C.offsetWidth)||0,va=((E=p.current)===null||E===void 0?void 0:E.offsetHeight)||0,ht=((W=H.current)===null||W===void 0?void 0:W.offsetWidth)||0,pt=((G=H.current)===null||G===void 0?void 0:G.offsetHeight)||0;se(Le),Ee(va),Xt(ht),qt(pt);var fa=(((oe=L.current)===null||oe===void 0?void 0:oe.offsetWidth)||0)-ht,ma=(((be=L.current)===null||be===void 0?void 0:be.offsetHeight)||0)-pt;F(fa),Re(ma),ta(function(){var yt=new Map;return i.forEach(function(ba){var gt=ba.key,he=P(gt).current;he&&yt.set(gt,{width:he.offsetWidth,height:he.offsetHeight,left:he.offsetLeft,top:he.offsetTop})}),yt})}),ca=i.slice(0,oa),la=i.slice(ia+1),st=[].concat((0,Ke.Z)(ca),(0,Ke.Z)(la)),sa=(0,t.useState)(),ut=(0,R.Z)(sa,2),ua=ut[0],da=ut[1],ae=Se.get(f),dt=(0,t.useRef)();function vt(){le.Z.cancel(dt.current)}(0,t.useEffect)(function(){var C={};return ae&&(x?(u?C.right=ae.right:C.left=ae.left,C.width=ae.width):(C.top=ae.top,C.height=ae.height)),vt(),dt.current=(0,le.Z)(function(){da(C)}),vt},[ae,x,u]),(0,t.useEffect)(function(){it()},[f,ae,Se,x]),(0,t.useEffect)(function(){we()},[u,M,f,i.map(function(C){return C.key}).join("_")]);var ft=!!st.length,me="".concat(a,"-nav-wrap"),Ae,Me,mt,bt;return x?u?(Me=N>0,Ae=N+U<$):(Ae=N<0,Me=-N+U<$):(mt=Y<0,bt=-Y+q