| 1234567891011121314 |
- import{a as e,n as t}from"./react-dom-stZKkA6x.js";import{M as n,N as r,j as i}from"./theme-DNlqAiGO.js";import{$n as a,Ar as o,B as s,Cn as c,Cr as l,Dr as u,En as d,Er as f,Gt as p,H as m,Mn as h,Mr as g,On as _,Pn as v,Pt as y,Qn as b,Rn as x,Sn as S,T as C,Xt as w,Y as T,Yt as E,_n as D,_r as O,ar as k,at as A,bn as j,cn as M,dn as N,dr as P,fn as F,gr as I,hr as L,ir as R,j as z,jn as B,jr as V,k as H,kr as U,lr as W,mn as ee,mr as G,or as K,ot as te,pn as ne,pr as re,sn as q,st as ie,tr as ae,tt as oe,un as se,vr as ce,w as le,wn as ue,zn as de}from"./jsx-runtime-dm82oUI8.js";var J=e(t()),Y=e(g()),X=(e,t,n,r,i)=>({background:e,border:`${a(r.lineWidth)} ${r.lineType} ${t}`,[`${i}-icon`]:{color:n}}),fe=e=>{let{componentCls:t,motionDurationSlow:n,marginXS:r,marginSM:i,fontSize:a,fontSizeLG:o,lineHeight:s,borderRadiusLG:c,motionEaseInOutCirc:l,withDescriptionIconSize:u,colorText:f,colorTextHeading:p,withDescriptionPadding:m,defaultPadding:h}=e;return{[t]:Object.assign(Object.assign({},d(e)),{position:`relative`,display:`flex`,alignItems:`center`,padding:h,wordWrap:`break-word`,borderRadius:c,[`&${t}-rtl`]:{direction:`rtl`},[`${t}-content`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:r,lineHeight:0},"&-description":{display:`none`,fontSize:a,lineHeight:s},"&-message":{color:p},[`&${t}-motion-leave`]:{overflow:`hidden`,opacity:1,transition:`max-height ${n} ${l}, opacity ${n} ${l},
- padding-top ${n} ${l}, padding-bottom ${n} ${l},
- margin-bottom ${n} ${l}`},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:`0 !important`,paddingTop:0,paddingBottom:0,opacity:0}}),[`${t}-with-description`]:{alignItems:`flex-start`,padding:m,[`${t}-icon`]:{marginInlineEnd:i,fontSize:u,lineHeight:0},[`${t}-message`]:{display:`block`,marginBottom:r,color:p,fontSize:o},[`${t}-description`]:{display:`block`,color:f}},[`${t}-banner`]:{marginBottom:0,border:`0 !important`,borderRadius:0}}},pe=e=>{let{componentCls:t,colorSuccess:n,colorSuccessBorder:r,colorSuccessBg:i,colorWarning:a,colorWarningBorder:o,colorWarningBg:s,colorError:c,colorErrorBorder:l,colorErrorBg:u,colorInfo:d,colorInfoBorder:f,colorInfoBg:p}=e;return{[t]:{"&-success":X(i,r,n,e,t),"&-info":X(p,f,d,e,t),"&-warning":X(s,o,a,e,t),"&-error":Object.assign(Object.assign({},X(u,l,c,e,t)),{[`${t}-description > pre`]:{margin:0,padding:0}})}}},Z=e=>{let{componentCls:t,iconCls:n,motionDurationMid:r,marginXS:i,fontSizeIcon:o,colorIcon:s,colorIconHover:c}=e;return{[t]:{"&-action":{marginInlineStart:i},[`${t}-close-icon`]:{marginInlineStart:i,padding:0,overflow:`hidden`,fontSize:o,lineHeight:a(o),backgroundColor:`transparent`,border:`none`,outline:`none`,cursor:`pointer`,[`${n}-close`]:{color:s,transition:`color ${r}`,"&:hover":{color:c}}},"&-close-text":{color:s,transition:`color ${r}`,"&:hover":{color:c}}}}},me=j(`Alert`,e=>[fe(e),pe(e),Z(e)],e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`})),Q=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},he={success:r,info:i,error:ne,warning:n},ge=e=>{let{icon:t,prefixCls:n,type:r}=e,i=he[r]||null;return t?se(t,J.createElement(`span`,{className:`${n}-icon`},t),()=>({className:(0,Y.default)(`${n}-icon`,t.props.className)})):J.createElement(i,{className:`${n}-icon`})},_e=e=>{let{isClosable:t,prefixCls:n,closeIcon:r,handleClose:i,ariaProps:a}=e,o=r===!0||r===void 0?J.createElement(F,null):r;return t?J.createElement(`button`,Object.assign({type:`button`,onClick:i,className:`${n}-close-icon`,tabIndex:0},a),o):null},ve=J.forwardRef((e,t)=>{let{description:n,prefixCls:r,message:i,banner:a,className:o,rootClassName:s,style:c,onMouseEnter:l,onMouseLeave:u,onClick:d,afterClose:f,showIcon:p,closable:m,closeText:h,closeIcon:g,action:_,id:v}=e,y=Q(e,[`description`,`prefixCls`,`message`,`banner`,`className`,`rootClassName`,`style`,`onMouseEnter`,`onMouseLeave`,`onClick`,`afterClose`,`showIcon`,`closable`,`closeText`,`closeIcon`,`action`,`id`]),[b,x]=J.useState(!1),S=J.useRef(null);J.useImperativeHandle(t,()=>({nativeElement:S.current}));let{getPrefixCls:C,direction:w,closable:T,closeIcon:E,className:O,style:k}=de(`alert`),A=C(`alert`,r),[j,M,P]=me(A),F=t=>{var n;x(!0),(n=e.onClose)==null||n.call(e,t)},I=J.useMemo(()=>e.type===void 0?a?`warning`:`info`:e.type,[e.type,a]),L=J.useMemo(()=>typeof m==`object`&&m.closeIcon||h?!0:typeof m==`boolean`?m:g!==!1&&g!=null?!0:!!T,[h,g,m,T]),R=a&&p===void 0?!0:p,z=(0,Y.default)(A,`${A}-${I}`,{[`${A}-with-description`]:!!n,[`${A}-no-icon`]:!R,[`${A}-banner`]:!!a,[`${A}-rtl`]:w===`rtl`},O,o,s,P,M),B=N(y,{aria:!0,data:!0}),V=J.useMemo(()=>typeof m==`object`&&m.closeIcon?m.closeIcon:h||(g===void 0?typeof T==`object`&&T.closeIcon?T.closeIcon:E:g),[g,m,T,h,E]),H=J.useMemo(()=>{let e=m??T;if(typeof e==`object`){let{closeIcon:t}=e;return Q(e,[`closeIcon`])}return{}},[m,T]);return j(J.createElement(D,{visible:!b,motionName:`${A}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:f},({className:t,style:r},a)=>J.createElement(`div`,Object.assign({id:v,ref:ce(S,a),"data-show":!b,className:(0,Y.default)(z,t),style:Object.assign(Object.assign(Object.assign({},k),c),r),onMouseEnter:l,onMouseLeave:u,onClick:d,role:`alert`},B),R?J.createElement(ge,{description:n,icon:e.icon,prefixCls:A,type:I}):null,J.createElement(`div`,{className:`${A}-content`},i?J.createElement(`div`,{className:`${A}-message`},i):null,n?J.createElement(`div`,{className:`${A}-description`},n):null),_?J.createElement(`div`,{className:`${A}-action`},_):null,J.createElement(_e,{isClosable:L,prefixCls:A,closeIcon:V,handleClose:F,ariaProps:H}))))});function ye(e,t,n){return t=G(t),P(e,re()?Reflect.construct(t,n||[],G(e).constructor):t.apply(e,n))}var be=function(e){function t(){var e;return O(this,t),e=ye(this,t,arguments),e.state={error:void 0,info:{componentStack:``}},e}return L(t,e),I(t,[{key:`componentDidCatch`,value:function(e,t){this.setState({error:e,info:t})}},{key:`render`,value:function(){let{message:e,description:t,id:n,children:r}=this.props,{error:i,info:a}=this.state,o=a?.componentStack||null,s=e===void 0?(i||``).toString():e,c=t===void 0?o:t;return i?J.createElement(ve,{id:n,type:`error`,message:s,description:J.createElement(`pre`,{style:{fontSize:`0.9em`,overflowX:`auto`}},c)}):r}}])}(J.Component),xe=ve;xe.ErrorBoundary=be;var Se={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`},Ce=J.forwardRef(function(e,t){return J.createElement(ee,V({},e,{ref:t,icon:Se}))}),we=(0,J.createContext)(null),Te=function(e){var t=e.activeTabOffset,n=e.horizontal,r=e.rtl,i=e.indicator,a=i===void 0?{}:i,o=a.size,s=a.align,c=s===void 0?`center`:s,l=R((0,J.useState)(),2),u=l[0],d=l[1],f=(0,J.useRef)(),p=J.useCallback(function(e){return typeof o==`function`?o(e):typeof o==`number`?o:e},[o]);function m(){k.cancel(f.current)}return(0,J.useEffect)(function(){var e={};if(t)if(n){e.width=p(t.width);var i=r?`right`:`left`;c===`start`&&(e[i]=t[i]),c===`center`&&(e[i]=t[i]+t.width/2,e.transform=r?`translateX(50%)`:`translateX(-50%)`),c===`end`&&(e[i]=t[i]+t.width,e.transform=`translateX(-100%)`)}else e.height=p(t.height),c===`start`&&(e.top=t.top),c===`center`&&(e.top=t.top+t.height/2,e.transform=`translateY(-50%)`),c===`end`&&(e.top=t.top+t.height,e.transform=`translateY(-100%)`);return m(),f.current=k(function(){u&&e&&Object.keys(e).every(function(t){var n=e[t],r=u[t];return typeof n==`number`&&typeof r==`number`?Math.round(n)===Math.round(r):n===r})||d(e)}),m},[JSON.stringify(t),n,r,c,p]),{style:u}},Ee={width:0,height:0,left:0,top:0};function De(e,t,n){return(0,J.useMemo)(function(){for(var n=new Map,r=t.get(e[0]?.key)||Ee,i=r.left+r.width,a=0;a<e.length;a+=1){var o=e[a].key,s=t.get(o);s||=t.get(e[a-1]?.key)||Ee;var c=n.get(o)||f({},s);c.right=i-c.left-c.width,n.set(o,c)}return n},[e.map(function(e){return e.key}).join(`_`),t,n])}function Oe(e,t){var n=J.useRef(e),r=R(J.useState({}),2)[1];function i(e){var i=typeof e==`function`?e(n.current):e;i!==n.current&&t(i,n.current),n.current=i,r({})}return[n.current,i]}var ke=.1,Ae=.01,je=20,Me=.995**je;function Ne(e,t){var n=R((0,J.useState)(),2),r=n[0],i=n[1],a=R((0,J.useState)(0),2),o=a[0],s=a[1],c=R((0,J.useState)(0),2),l=c[0],u=c[1],d=R((0,J.useState)(),2),f=d[0],p=d[1],m=(0,J.useRef)();function h(e){var t=e.touches[0],n=t.screenX,r=t.screenY;i({x:n,y:r}),window.clearInterval(m.current)}function g(e){if(r){var n=e.touches[0],a=n.screenX,c=n.screenY;i({x:a,y:c});var l=a-r.x,d=c-r.y;t(l,d);var f=Date.now();s(f),u(f-o),p({x:l,y:d})}}function _(){if(r&&(i(null),p(null),f)){var e=f.x/l,n=f.y/l;if(Math.max(Math.abs(e),Math.abs(n))<ke)return;var a=e,o=n;m.current=window.setInterval(function(){if(Math.abs(a)<Ae&&Math.abs(o)<Ae){window.clearInterval(m.current);return}a*=Me,o*=Me,t(a*je,o*je)},je)}}var v=(0,J.useRef)();function y(e){var n=e.deltaX,r=e.deltaY,i=0,a=Math.abs(n),o=Math.abs(r);a===o?i=v.current===`x`?n:r:a>o?(i=n,v.current=`x`):(i=r,v.current=`y`),t(-i,-i)&&e.preventDefault()}var b=(0,J.useRef)(null);b.current={onTouchStart:h,onTouchMove:g,onTouchEnd:_,onWheel:y},J.useEffect(function(){function t(e){b.current.onTouchStart(e)}function n(e){b.current.onTouchMove(e)}function r(e){b.current.onTouchEnd(e)}function i(e){b.current.onWheel(e)}return document.addEventListener(`touchmove`,n,{passive:!1}),document.addEventListener(`touchend`,r,{passive:!0}),e.current.addEventListener(`touchstart`,t,{passive:!0}),e.current.addEventListener(`wheel`,i,{passive:!1}),function(){document.removeEventListener(`touchmove`,n),document.removeEventListener(`touchend`,r)}},[])}function Pe(e){var t=R((0,J.useState)(0),2),n=t[0],r=t[1],i=(0,J.useRef)(0),a=(0,J.useRef)();return a.current=e,b(function(){var e;(e=a.current)==null||e.call(a)},[n]),function(){i.current===n&&(i.current+=1,r(i.current))}}function Fe(e){var t=(0,J.useRef)([]),n=R((0,J.useState)({}),2)[1],r=(0,J.useRef)(typeof e==`function`?e():e),i=Pe(function(){var e=r.current;t.current.forEach(function(t){e=t(e)}),t.current=[],r.current=e,n({})});function a(e){t.current.push(e),i()}return[r.current,a]}var Ie={width:0,height:0,left:0,top:0,right:0};function Le(e,t,n,r,i,a,o){var s=o.tabs,c=o.tabPosition,l=o.rtl,u,d,f;return[`top`,`bottom`].includes(c)?(u=`width`,d=l?`right`:`left`,f=Math.abs(n)):(u=`height`,d=`top`,f=-n),(0,J.useMemo)(function(){if(!s.length)return[0,0];for(var n=s.length,r=n,i=0;i<n;i+=1){var a=e.get(s[i].key)||Ie;if(Math.floor(a[d]+a[u])>Math.floor(f+t)){r=i-1;break}}for(var o=0,c=n-1;c>=0;--c)if((e.get(s[c].key)||Ie)[d]<f){o=c+1;break}return o>r?[0,-1]:[o,r]},[e,t,r,i,a,f,c,s.map(function(e){return e.key}).join(`_`),l])}function Re(e){var t;return e instanceof Map?(t={},e.forEach(function(e,n){t[n]=e})):t=e,JSON.stringify(t)}var ze=`TABS_DQ`;function Be(e){return String(e).replace(/"/g,ze)}function Ve(e,t,n,r){return!(!n||r||e===!1||e===void 0&&(t===!1||t===null))}var He=J.forwardRef(function(e,t){var n=e.prefixCls,r=e.editable,i=e.locale,a=e.style;return!r||r.showAdd===!1?null:J.createElement(`button`,{ref:t,type:`button`,className:`${n}-nav-add`,style:a,"aria-label":i?.addAriaLabel||`Add tab`,onClick:function(e){r.onEdit(`add`,{event:e})}},r.addIcon||`+`)}),Ue=J.forwardRef(function(e,t){var n=e.position,r=e.prefixCls,i=e.extra;if(!i)return null;var a,s={};return o(i)===`object`&&!J.isValidElement(i)?s=i:s.right=i,n===`right`&&(a=s.right),n===`left`&&(a=s.left),a?J.createElement(`div`,{className:`${r}-extra-content`,ref:t},a):null}),We=J.forwardRef(function(e,t){var n=e.prefixCls,r=e.id,i=e.tabs,a=e.locale,o=e.mobile,s=e.more,c=s===void 0?{}:s,l=e.style,d=e.className,f=e.editable,p=e.tabBarGutter,m=e.rtl,h=e.removeAriaLabel,g=e.onTabClick,_=e.getPopupContainer,v=e.popupClassName,y=R((0,J.useState)(!1),2),b=y[0],x=y[1],S=R((0,J.useState)(null),2),w=S[0],T=S[1],E=c.icon,D=E===void 0?`More`:E,O=`${r}-more-popup`,k=`${n}-dropdown`,A=w===null?null:`${O}-${w}`,j=a?.dropdownAriaLabel;function M(e,t){e.preventDefault(),e.stopPropagation(),f.onEdit(`remove`,{key:t,event:e})}var N=J.createElement(C,{onClick:function(e){var t=e.key,n=e.domEvent;g(t,n),x(!1)},prefixCls:`${k}-menu`,id:O,tabIndex:-1,role:`listbox`,"aria-activedescendant":A,selectedKeys:[w],"aria-label":j===void 0?`expanded dropdown`:j},i.map(function(e){var t=e.closable,n=e.disabled,i=e.closeIcon,a=e.key,o=e.label,s=Ve(t,i,f,n);return J.createElement(H,{key:a,id:`${O}-${a}`,role:`option`,"aria-controls":r&&`${r}-panel-${a}`,disabled:n},J.createElement(`span`,null,o),s&&J.createElement(`button`,{type:`button`,"aria-label":h||`remove`,tabIndex:0,className:`${k}-menu-item-remove`,onClick:function(e){e.stopPropagation(),M(e,a)}},i||f.removeIcon||`×`))}));function P(e){for(var t=i.filter(function(e){return!e.disabled}),n=t.findIndex(function(e){return e.key===w})||0,r=t.length,a=0;a<r;a+=1){n=(n+e+r)%r;var o=t[n];if(!o.disabled){T(o.key);return}}}function F(e){var t=e.which;if(!b){[q.DOWN,q.SPACE,q.ENTER].includes(t)&&(x(!0),e.preventDefault());return}switch(t){case q.UP:P(-1),e.preventDefault();break;case q.DOWN:P(1),e.preventDefault();break;case q.ESC:x(!1);break;case q.SPACE:case q.ENTER:w!==null&&g(w,e);break}}(0,J.useEffect)(function(){var e=document.getElementById(A);e&&e.scrollIntoView&&e.scrollIntoView(!1)},[w]),(0,J.useEffect)(function(){b||T(null)},[b]);var I=u({},m?`marginRight`:`marginLeft`,p);i.length||(I.visibility=`hidden`,I.order=1);var L=(0,Y.default)(u({},`${k}-rtl`,m)),B=o?null:J.createElement(z,V({prefixCls:k,overlay:N,visible:i.length?b:!1,onVisibleChange:x,overlayClassName:(0,Y.default)(L,v),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:_},c),J.createElement(`button`,{type:`button`,className:`${n}-nav-more`,style:I,"aria-haspopup":`listbox`,"aria-controls":O,id:`${r}-more`,"aria-expanded":b,onKeyDown:F},D));return J.createElement(`div`,{className:(0,Y.default)(`${n}-nav-operations`,d),style:l,ref:t},B,J.createElement(He,{prefixCls:n,locale:a,editable:f}))}),Ge=J.memo(We,function(e,t){return t.tabMoving}),Ke=function(e){var t=e.prefixCls,n=e.id,r=e.active,i=e.focus,a=e.tab,o=a.key,s=a.label,c=a.disabled,l=a.closeIcon,d=a.icon,f=e.closable,p=e.renderWrapper,m=e.removeAriaLabel,h=e.editable,g=e.onClick,_=e.onFocus,v=e.onBlur,y=e.onKeyDown,b=e.onMouseDown,x=e.onMouseUp,S=e.style,C=e.tabCount,w=e.currentPosition,T=`${t}-tab`,E=Ve(f,l,h,c);function D(e){c||g(e)}function O(e){e.preventDefault(),e.stopPropagation(),h.onEdit(`remove`,{key:o,event:e})}var k=J.useMemo(function(){return d&&typeof s==`string`?J.createElement(`span`,null,s):s},[s,d]),A=J.useRef(null);J.useEffect(function(){i&&A.current&&A.current.focus()},[i]);var j=J.createElement(`div`,{key:o,"data-node-key":Be(o),className:(0,Y.default)(T,u(u(u(u({},`${T}-with-remove`,E),`${T}-active`,r),`${T}-disabled`,c),`${T}-focus`,i)),style:S,onClick:D},J.createElement(`div`,{ref:A,role:`tab`,"aria-selected":r,id:n&&`${n}-tab-${o}`,className:`${T}-btn`,"aria-controls":n&&`${n}-panel-${o}`,"aria-disabled":c,tabIndex:c?null:r?0:-1,onClick:function(e){e.stopPropagation(),D(e)},onKeyDown:y,onMouseDown:b,onMouseUp:x,onFocus:_,onBlur:v},i&&J.createElement(`div`,{"aria-live":`polite`,style:{width:0,height:0,position:`absolute`,overflow:`hidden`,opacity:0}},`Tab ${w} of ${C}`),d&&J.createElement(`span`,{className:`${T}-icon`},d),s&&k),E&&J.createElement(`button`,{type:`button`,role:`tab`,"aria-label":m||`remove`,tabIndex:r?0:-1,className:`${T}-remove`,onClick:function(e){e.stopPropagation(),O(e)}},l||h.removeIcon||`×`));return p?p(j):j},qe=function(e,t){var n=e.offsetWidth,r=e.offsetHeight,i=e.offsetTop,a=e.offsetLeft,o=e.getBoundingClientRect(),s=o.width,c=o.height,l=o.left,u=o.top;return Math.abs(s-n)<1?[s,c,l-t.left,u-t.top]:[n,r,a,i]},Je=function(e){var t=e.current||{},n=t.offsetWidth,r=n===void 0?0:n,i=t.offsetHeight,a=i===void 0?0:i;if(e.current){var o=e.current.getBoundingClientRect(),s=o.width,c=o.height;if(Math.abs(s-r)<1)return[s,c]}return[r,a]},Ye=function(e,t){return e[+!t]},Xe=J.forwardRef(function(e,t){var n=e.className,r=e.style,i=e.id,a=e.animated,o=e.activeKey,s=e.rtl,c=e.extra,d=e.editable,p=e.locale,m=e.tabPosition,h=e.tabBarGutter,g=e.children,_=e.onTabClick,y=e.onTabScroll,b=e.indicator,x=J.useContext(we),S=x.prefixCls,C=x.tabs,w=(0,J.useRef)(null),T=(0,J.useRef)(null),E=(0,J.useRef)(null),D=(0,J.useRef)(null),O=(0,J.useRef)(null),k=(0,J.useRef)(null),A=(0,J.useRef)(null),j=m===`top`||m===`bottom`,M=R(Oe(0,function(e,t){j&&y&&y({direction:e>t?`left`:`right`})}),2),N=M[0],P=M[1],F=R(Oe(0,function(e,t){!j&&y&&y({direction:e>t?`top`:`bottom`})}),2),I=F[0],L=F[1],z=R((0,J.useState)([0,0]),2),B=z[0],H=z[1],U=R((0,J.useState)([0,0]),2),ee=U[0],G=U[1],te=R((0,J.useState)([0,0]),2),ne=te[0],re=te[1],q=R((0,J.useState)([0,0]),2),ie=q[0],ae=q[1],oe=R(Fe(new Map),2),se=oe[0],ce=oe[1],le=De(C,se,ee[0]),ue=Ye(B,j),de=Ye(ee,j),X=Ye(ne,j),fe=Ye(ie,j),pe=Math.floor(ue)<Math.floor(de+X),Z=pe?ue-fe:ue-X,me=`${S}-nav-operations-hidden`,Q=0,he=0;j&&s?(Q=0,he=Math.max(0,de-Z)):(Q=Math.min(0,Z-de),he=0);function ge(e){return e<Q?Q:e>he?he:e}var _e=(0,J.useRef)(null),ve=R((0,J.useState)(),2),ye=ve[0],be=ve[1];function xe(){be(Date.now())}function Se(){_e.current&&clearTimeout(_e.current)}Ne(D,function(e,t){function n(e,t){e(function(e){return ge(e+t)})}return pe?(j?n(P,e):n(L,t),Se(),xe(),!0):!1}),(0,J.useEffect)(function(){return Se(),ye&&(_e.current=setTimeout(function(){be(0)},100)),Se},[ye]);var Ce=R(Le(le,Z,j?N:I,de,X,fe,f(f({},e),{},{tabs:C})),2),Ee=Ce[0],ke=Ce[1],Ae=v(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:o,t=le.get(e)||{width:0,height:0,left:0,right:0,top:0};if(j){var n=N;s?t.right<N?n=t.right:t.right+t.width>N+Z&&(n=t.right+t.width-Z):t.left<-N?n=-t.left:t.left+t.width>-N+Z&&(n=-(t.left+t.width-Z)),L(0),P(ge(n))}else{var r=I;t.top<-I?r=-t.top:t.top+t.height>-I+Z&&(r=-(t.top+t.height-Z)),P(0),L(ge(r))}}),je=R((0,J.useState)(),2),Me=je[0],Ie=je[1],ze=R((0,J.useState)(!1),2),We=ze[0],Xe=ze[1],$=C.filter(function(e){return!e.disabled}).map(function(e){return e.key}),Ze=function(e){var t=$.indexOf(Me||o),n=$.length,r=$[(t+e+n)%n];Ie(r)},Qe=function(e,t){var n=$.indexOf(e),r=C.find(function(t){return t.key===e});Ve(r?.closable,r?.closeIcon,d,r?.disabled)&&(t.preventDefault(),t.stopPropagation(),d.onEdit(`remove`,{key:e,event:t}),n===$.length-1?Ze(-1):Ze(1))},$e=function(e,t){Xe(!0),t.button===1&&Qe(e,t)},et=function(e){var t=e.code,n=s&&j,r=$[0],i=$[$.length-1];switch(t){case`ArrowLeft`:j&&Ze(n?1:-1);break;case`ArrowRight`:j&&Ze(n?-1:1);break;case`ArrowUp`:e.preventDefault(),j||Ze(-1);break;case`ArrowDown`:e.preventDefault(),j||Ze(1);break;case`Home`:e.preventDefault(),Ie(r);break;case`End`:e.preventDefault(),Ie(i);break;case`Enter`:case`Space`:e.preventDefault(),_(Me??o,e);break;case`Backspace`:case`Delete`:Qe(Me,e);break}},tt={};j?tt[s?`marginRight`:`marginLeft`]=h:tt.marginTop=h;var nt=C.map(function(e,t){var n=e.key;return J.createElement(Ke,{id:i,prefixCls:S,key:n,tab:e,style:t===0?void 0:tt,closable:e.closable,editable:d,active:n===o,focus:n===Me,renderWrapper:g,removeAriaLabel:p?.removeAriaLabel,tabCount:$.length,currentPosition:t+1,onClick:function(e){_(n,e)},onKeyDown:et,onFocus:function(){We||Ie(n),Ae(n),xe(),D.current&&(s||(D.current.scrollLeft=0),D.current.scrollTop=0)},onBlur:function(){Ie(void 0)},onMouseDown:function(e){return $e(n,e)},onMouseUp:function(){Xe(!1)}})}),rt=function(){return ce(function(){var e=new Map,t=O.current?.getBoundingClientRect();return C.forEach(function(n){var r=n.key,i=O.current?.querySelector(`[data-node-key="${Be(r)}"]`);if(i){var a=R(qe(i,t),4),o=a[0],s=a[1],c=a[2],l=a[3];e.set(r,{width:o,height:s,left:c,top:l})}}),e})};(0,J.useEffect)(function(){rt()},[C.map(function(e){return e.key}).join(`_`)]);var it=Pe(function(){var e=Je(w),t=Je(T),n=Je(E);H([e[0]-t[0]-n[0],e[1]-t[1]-n[1]]);var r=Je(A);re(r),ae(Je(k));var i=Je(O);G([i[0]-r[0],i[1]-r[1]]),rt()}),at=C.slice(0,Ee),ot=C.slice(ke+1),st=[].concat(K(at),K(ot)),ct=le.get(o),lt=Te({activeTabOffset:ct,horizontal:j,indicator:b,rtl:s}).style;(0,J.useEffect)(function(){Ae()},[o,Q,he,Re(ct),Re(le),j]),(0,J.useEffect)(function(){it()},[s]);var ut=!!st.length,dt=`${S}-nav-wrap`,ft,pt,mt,ht;return j?s?(pt=N>0,ft=N!==he):(ft=N<0,pt=N!==Q):(mt=I<0,ht=I!==Q),J.createElement(W,{onResize:it},J.createElement(`div`,{ref:l(t,w),role:`tablist`,"aria-orientation":j?`horizontal`:`vertical`,className:(0,Y.default)(`${S}-nav`,n),style:r,onKeyDown:function(){xe()}},J.createElement(Ue,{ref:T,position:`left`,extra:c,prefixCls:S}),J.createElement(W,{onResize:it},J.createElement(`div`,{className:(0,Y.default)(dt,u(u(u(u({},`${dt}-ping-left`,ft),`${dt}-ping-right`,pt),`${dt}-ping-top`,mt),`${dt}-ping-bottom`,ht)),ref:D},J.createElement(W,{onResize:it},J.createElement(`div`,{ref:O,className:`${S}-nav-list`,style:{transform:`translate(${N}px, ${I}px)`,transition:ye?`none`:void 0}},nt,J.createElement(He,{ref:A,prefixCls:S,locale:p,editable:d,style:f(f({},nt.length===0?void 0:tt),{},{visibility:ut?`hidden`:null})}),J.createElement(`div`,{className:(0,Y.default)(`${S}-ink-bar`,u({},`${S}-ink-bar-animated`,a.inkBar)),style:lt}))))),J.createElement(Ge,V({},e,{removeAriaLabel:p?.removeAriaLabel,ref:k,prefixCls:S,tabs:st,className:!ut&&me,tabMoving:!!ye})),J.createElement(Ue,{ref:E,position:`right`,extra:c,prefixCls:S})))}),$=J.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,i=e.style,a=e.id,o=e.active,s=e.tabKey,c=e.children;return J.createElement(`div`,{id:a&&`${a}-panel-${s}`,role:`tabpanel`,tabIndex:o?0:-1,"aria-labelledby":a&&`${a}-tab-${s}`,"aria-hidden":!o,style:i,className:(0,Y.default)(n,o&&`${n}-active`,r),ref:t},c)}),Ze=[`renderTabBar`],Qe=[`label`,`key`],$e=function(e){var t=e.renderTabBar,n=ae(e,Ze),r=J.useContext(we).tabs;return t?t(f(f({},n),{},{panes:r.map(function(e){var t=e.label,n=e.key,r=ae(e,Qe);return J.createElement($,V({tab:t,key:n,tabKey:n},r))})}),Xe):J.createElement(Xe,n)},et=[`key`,`forceRender`,`style`,`className`,`destroyInactiveTabPane`],tt=function(e){var t=e.id,n=e.activeKey,r=e.animated,i=e.tabPosition,a=e.destroyInactiveTabPane,o=J.useContext(we),s=o.prefixCls,c=o.tabs,l=r.tabPane,d=`${s}-tabpane`;return J.createElement(`div`,{className:(0,Y.default)(`${s}-content-holder`)},J.createElement(`div`,{className:(0,Y.default)(`${s}-content`,`${s}-content-${i}`,u({},`${s}-content-animated`,l))},c.map(function(e){var i=e.key,o=e.forceRender,s=e.style,c=e.className,u=e.destroyInactiveTabPane,p=ae(e,et),m=i===n;return J.createElement(D,V({key:i,visible:m,forceRender:o,removeOnLeave:!!(a||u),leavedClassName:`${d}-hidden`},r.tabPaneMotion),function(e,n){var r=e.style,a=e.className;return J.createElement($,V({},p,{prefixCls:d,id:t,tabKey:i,animated:l,active:m,style:f(f({},s),r),className:(0,Y.default)(c,a),ref:n}))})})))};function nt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},t=e===!1?{inkBar:!1,tabPane:!1}:e===!0?{inkBar:!0,tabPane:!1}:f({inkBar:!0},o(e)===`object`?e:{});return t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}var rt=[`id`,`prefixCls`,`className`,`items`,`direction`,`activeKey`,`defaultActiveKey`,`editable`,`animated`,`tabPosition`,`tabBarGutter`,`tabBarStyle`,`tabBarExtraContent`,`locale`,`more`,`destroyInactiveTabPane`,`renderTabBar`,`onChange`,`onTabClick`,`onTabScroll`,`getPopupContainer`,`popupClassName`,`indicator`],it=0,at=J.forwardRef(function(e,t){var n=e.id,r=e.prefixCls,i=r===void 0?`rc-tabs`:r,a=e.className,s=e.items,c=e.direction,l=e.activeKey,d=e.defaultActiveKey,p=e.editable,m=e.animated,g=e.tabPosition,_=g===void 0?`top`:g,v=e.tabBarGutter,y=e.tabBarStyle,b=e.tabBarExtraContent,x=e.locale,S=e.more,C=e.destroyInactiveTabPane,w=e.renderTabBar,T=e.onChange,E=e.onTabClick,D=e.onTabScroll,O=e.getPopupContainer,k=e.popupClassName,A=e.indicator,j=ae(e,rt),M=J.useMemo(function(){return(s||[]).filter(function(e){return e&&o(e)===`object`&&`key`in e})},[s]),N=c===`rtl`,P=nt(m),F=R((0,J.useState)(!1),2),I=F[0],L=F[1];(0,J.useEffect)(function(){L(oe())},[]);var z=R(h(function(){return M[0]?.key},{value:l,defaultValue:d}),2),B=z[0],H=z[1],U=R((0,J.useState)(function(){return M.findIndex(function(e){return e.key===B})}),2),W=U[0],ee=U[1];(0,J.useEffect)(function(){var e=M.findIndex(function(e){return e.key===B});e===-1&&(e=Math.max(0,Math.min(W,M.length-1)),H(M[e]?.key)),ee(e)},[M.map(function(e){return e.key}).join(`_`),B,W]);var G=R(h(null,{value:n}),2),K=G[0],te=G[1];(0,J.useEffect)(function(){n||(te(`rc-tabs-${it}`),it+=1)},[]);function ne(e,t){E?.(e,t);var n=e!==B;H(e),n&&T?.(e)}var re={id:K,activeKey:B,animated:P,tabPosition:_,rtl:N,mobile:I},q=f(f({},re),{},{editable:p,locale:x,more:S,tabBarGutter:v,onTabClick:ne,onTabScroll:D,extra:b,style:y,panes:null,getPopupContainer:O,popupClassName:k,indicator:A});return J.createElement(we.Provider,{value:{tabs:M,prefixCls:i}},J.createElement(`div`,V({ref:t,id:n,className:(0,Y.default)(i,`${i}-${_}`,u(u(u({},`${i}-mobile`,I),`${i}-editable`,p),`${i}-rtl`,N),a)},j),J.createElement($e,V({},q,{renderTabBar:w})),J.createElement(tt,V({destroyInactiveTabPane:C},re,{animated:P}))))}),ot={motionAppear:!1,motionEnter:!0,motionLeave:!0};function st(e,t={inkBar:!0,tabPane:!1}){let n;return n=t===!1?{inkBar:!1,tabPane:!1}:t===!0?{inkBar:!0,tabPane:!0}:Object.assign({inkBar:!0},typeof t==`object`?t:{}),n.tabPane&&(n.tabPaneMotion=Object.assign(Object.assign({},ot),{motionName:w(e,`switch`)})),n}var ct=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 lt(e){return e.filter(e=>e)}function ut(e,t){return e?e.map(e=>{let t=e.destroyOnHidden??e.destroyInactiveTabPane;return Object.assign(Object.assign({},e),{destroyInactiveTabPane:t})}):lt(U(t).map(e=>{if(J.isValidElement(e)){let{key:t,props:n}=e,r=n||{},{tab:i}=r,a=ct(r,[`tab`]);return Object.assign(Object.assign({key:String(t)},a),{label:i})}return null}))}var dt=e=>{let{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}`}}}}},[y(e,`slide-up`),y(e,`slide-down`)]]},ft=e=>{let{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:i,colorBorderSecondary:o,itemSelectedColor:s}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:r,border:`${a(e.lineWidth)} ${e.lineType} ${o}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:s,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:c(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:a(i)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:a(i)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${a(e.borderRadiusLG)} 0 0 ${a(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 ${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},pt=e=>{let{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return{[`${t}-dropdown`]:Object.assign(Object.assign({},d(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:`${a(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({},_),{display:`flex`,alignItems:`center`,minWidth:e.tabsDropdownWidth,margin:0,padding:`${a(e.paddingXXS)} ${a(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`}}})}})}},mt=e=>{let{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:i,verticalItemPadding:o,verticalItemMargin:s,calc:c}=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:`${a(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:c(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:o,textAlign:`center`},[`${t}-tab + ${t}-tab`]:{margin:s},[`${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:a(c(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${a(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:c(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${a(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},ht=e=>{let{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:o,horizontalItemPaddingSM:s,horizontalItemPaddingLG:c}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:s,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:c,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 ${a(e.borderRadius)} ${a(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${a(e.borderRadius)} ${a(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${a(e.borderRadius)} ${a(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${a(e.borderRadius)} 0 0 ${a(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:o,minHeight:o}}}}}},gt=e=>{let{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:a,horizontalItemPadding:o,itemSelectedColor:s,itemColor:l}=e,u=`${t}-tab`;return{[u]:{position:`relative`,WebkitTouchCallout:`none`,WebkitTapHighlightColor:`transparent`,display:`inline-flex`,alignItems:`center`,padding:o,fontSize:e.titleFontSize,background:`transparent`,border:0,outline:`none`,cursor:`pointer`,color:l,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:`none`,transition:`all ${e.motionDurationSlow}`,[`${u}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":Object.assign({flex:`none`,lineHeight:1,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}},ue(e)),"&:hover":{color:r},[`&${u}-active ${u}-btn`]:{color:s,textShadow:e.tabsActiveTextShadow},[`&${u}-focus ${u}-btn:focus-visible`]:c(e),[`&${u}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`},[`&${u}-disabled ${u}-btn, &${u}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${u}-remove ${i}`]:{margin:0,verticalAlign:`middle`},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${u} + ${u}`]:{margin:{_skip_check_:!0,value:a}}}},_t=e=>{let{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:o}=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:a(e.marginSM)}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:a(e.marginXS)},marginLeft:{_skip_check_:!0,value:a(o(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`}}}}},vt=e=>{let{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:i,itemHoverColor:o,itemActiveColor:s,colorBorderSecondary:c}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},d(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:`${a(e.lineWidth)} ${e.lineType} ${c}`,borderRadius:`${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)} 0 0`,outline:`none`,cursor:`pointer`,color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:o},"&:active, &:focus:not(:focus-visible)":{color:s}},ue(e,-3))},[`${t}-extra-content`]:{flex:`none`},[`${t}-ink-bar`]:{position:`absolute`,background:e.inkBarColor,pointerEvents:`none`}}),gt(e)),{[`${t}-content`]:{position:`relative`,width:`100%`},[`${t}-content-holder`]:{flex:`auto`,minWidth:0,minHeight:0},[`${t}-tabpane`]:Object.assign(Object.assign({},ue(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`}}}}}},yt=j(`Tabs`,e=>{let t=B(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:`0 0 0.25px currentcolor`,tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${a(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${a(e.horizontalItemGutter)}`});return[ht(t),_t(t),mt(t),pt(t),ft(t),vt(t),dt(t)]},e=>{let{cardHeight:t,cardHeightSM:n,cardHeightLG:r,controlHeight:i,controlHeightLG:a}=e,o=t||a,s=n||i,c=r||a+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:o,cardHeightSM:s,cardHeightLG:c,cardPadding:`${(o-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(s-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(c-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}}),bt=()=>null,xt=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},St=J.forwardRef((e,t)=>{let{type:n,className:r,rootClassName:i,size:a,onEdit:o,hideAdd:s,centered:c,addIcon:l,removeIcon:u,moreIcon:d,more:f,popupClassName:m,children:h,items:g,animated:_,style:v,indicatorSize:y,indicator:b,destroyInactiveTabPane:S,destroyOnHidden:C}=e,w=xt(e,[`type`,`className`,`rootClassName`,`size`,`onEdit`,`hideAdd`,`centered`,`addIcon`,`removeIcon`,`moreIcon`,`more`,`popupClassName`,`children`,`items`,`animated`,`style`,`indicatorSize`,`indicator`,`destroyInactiveTabPane`,`destroyOnHidden`]),{prefixCls:T}=w,{direction:E,tabs:D,getPrefixCls:O,getPopupContainer:k}=J.useContext(x),A=O(`tabs`,T),j=M(A),[N,P,I]=yt(A,j),L=J.useRef(null);J.useImperativeHandle(t,()=>({nativeElement:L.current}));let R;n===`editable-card`&&(R={onEdit:(e,{key:t,event:n})=>{o?.(e===`add`?n:t,e)},removeIcon:u??D?.removeIcon??J.createElement(F,null),addIcon:(l??D?.addIcon)||J.createElement(Ce,null),showAdd:s!==!0});let z=O(),B=p(a),V=ut(g,h),H=st(A,_),U=Object.assign(Object.assign({},D?.style),v),W={align:b?.align??D?.indicator?.align,size:b?.size??y??D?.indicator?.size??D?.indicatorSize};return N(J.createElement(at,Object.assign({ref:L,direction:E,getPopupContainer:k},w,{items:V,className:(0,Y.default)({[`${A}-${B}`]:B,[`${A}-card`]:[`card`,`editable-card`].includes(n),[`${A}-editable-card`]:n===`editable-card`,[`${A}-centered`]:c},D?.className,r,i,P,I,j),popupClassName:(0,Y.default)(m,P,I,j),style:U,editable:R,more:Object.assign({icon:D?.more?.icon??D?.moreIcon??d??J.createElement(le,null),transitionName:`${z}-slide-up`},f),prefixCls:A,animated:H,indicator:W,destroyInactiveTabPane:C??S})))});St.TabPane=bt;var Ct=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},wt=e=>{var{prefixCls:t,className:n,hoverable:r=!0}=e,i=Ct(e,[`prefixCls`,`className`,`hoverable`]);let{getPrefixCls:a}=J.useContext(x),o=a(`card`,t),s=(0,Y.default)(`${o}-grid`,n,{[`${o}-grid-hoverable`]:r});return J.createElement(`div`,Object.assign({},i,{className:s}))},Tt=e=>{let{antCls:t,componentCls:n,headerHeight:r,headerPadding:i,tabsMarginBottom:o}=e;return Object.assign(Object.assign({display:`flex`,justifyContent:`center`,flexDirection:`column`,minHeight:r,marginBottom:-1,padding:`0 ${a(i)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${a(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)} 0 0`},S()),{"&-wrapper":{width:`100%`,display:`flex`,alignItems:`center`},"&-title":Object.assign(Object.assign({display:`inline-block`,flex:1},_),{[`
- > ${n}-typography,
- > ${n}-typography-edit-content
- `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:`both`,marginBottom:o,color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize,"&-bar":{borderBottom:`${a(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})},Et=e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:r,lineWidth:i}=e;return{width:`33.33%`,padding:t,border:0,borderRadius:0,boxShadow:`
- ${a(i)} 0 0 0 ${n},
- 0 ${a(i)} 0 0 ${n},
- ${a(i)} ${a(i)} 0 0 ${n},
- ${a(i)} 0 0 0 ${n} inset,
- 0 ${a(i)} 0 0 ${n} inset;
- `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:`relative`,zIndex:1,boxShadow:r}}},Dt=e=>{let{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:i,colorBorderSecondary:o,actionsBg:s}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:`none`,background:s,borderTop:`${a(e.lineWidth)} ${e.lineType} ${o}`,display:`flex`,borderRadius:`0 0 ${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)}`},S()),{"& > li":{margin:r,color:e.colorTextDescription,textAlign:`center`,"> span":{position:`relative`,display:`block`,minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,"&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:`inline-block`,width:`100%`,color:e.colorIcon,lineHeight:a(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:a(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${a(e.lineWidth)} ${e.lineType} ${o}`}}})},Ot=e=>Object.assign(Object.assign({margin:`${a(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:`flex`},S()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:`hidden`,flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},_),"&-description":{color:e.colorTextDescription}}),kt=e=>{let{componentCls:t,colorFillAlter:n,headerPadding:r,bodyPadding:i}=e;return{[`${t}-head`]:{padding:`0 ${a(r)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${a(e.padding)} ${a(i)}`}}},At=e=>{let{componentCls:t}=e;return{overflow:`hidden`,[`${t}-body`]:{userSelect:`none`}}},jt=e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:r,colorBorderSecondary:i,boxShadowTertiary:o,bodyPadding:s,extraColor:c}=e;return{[t]:Object.assign(Object.assign({},d(e)),{position:`relative`,background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:o},[`${t}-head`]:Tt(e),[`${t}-extra`]:{marginInlineStart:`auto`,color:c,fontWeight:`normal`,fontSize:e.fontSize},[`${t}-body`]:{padding:s,borderRadius:`0 0 ${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)}`},[`${t}-grid`]:Et(e),[`${t}-cover`]:{"> *":{display:`block`,width:`100%`,borderRadius:`${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:Dt(e),[`${t}-meta`]:Ot(e)}),[`${t}-bordered`]:{border:`${a(e.lineWidth)} ${e.lineType} ${i}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:`pointer`,transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:`transparent`,boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:`flex`,flexWrap:`wrap`},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:r}}},[`${t}-type-inner`]:kt(e),[`${t}-loading`]:At(e),[`${t}-rtl`]:{direction:`rtl`}}},Mt=e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:i,headerFontSizeSM:o}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${a(r)}`,fontSize:o,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:`flex`,alignItems:`center`}}}}},Nt=j(`Card`,e=>{let t=B(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[jt(t),Mt(t)]},e=>({headerBg:`transparent`,headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,headerHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:e.bodyPadding??e.paddingLG,headerPadding:e.headerPadding??e.paddingLG})),Pt=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},Ft=e=>{let{actionClasses:t,actions:n=[],actionStyle:r}=e;return J.createElement(`ul`,{className:t,style:r},n.map((e,t)=>{let r=`action-${t}`;return J.createElement(`li`,{style:{width:`${100/n.length}%`},key:r},J.createElement(`span`,null,e))}))},It=J.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,extra:o,headStyle:s={},bodyStyle:c={},title:l,loading:u,bordered:d,variant:f,size:m,type:h,cover:g,actions:_,tabList:v,children:y,activeTabKey:b,defaultActiveTabKey:S,tabBarExtraContent:C,hoverable:w,tabProps:D={},classNames:O,styles:k}=e,A=Pt(e,[`prefixCls`,`className`,`rootClassName`,`style`,`extra`,`headStyle`,`bodyStyle`,`title`,`loading`,`bordered`,`variant`,`size`,`type`,`cover`,`actions`,`tabList`,`children`,`activeTabKey`,`defaultActiveTabKey`,`tabBarExtraContent`,`hoverable`,`tabProps`,`classNames`,`styles`]),{getPrefixCls:j,direction:M,card:N}=J.useContext(x),[P]=T(`card`,f,d),F=t=>{var n;(n=e.onTabChange)==null||n.call(e,t)},I=e=>(0,Y.default)(N?.classNames?.[e],O?.[e]),L=e=>Object.assign(Object.assign({},N?.styles?.[e]),k?.[e]),R=J.useMemo(()=>{let e=!1;return J.Children.forEach(y,t=>{t?.type===wt&&(e=!0)}),e},[y]),z=j(`card`,n),[B,V,H]=Nt(z),U=J.createElement(ie,{loading:!0,active:!0,paragraph:{rows:4},title:!1},y),W=b!==void 0,ee=Object.assign(Object.assign({},D),{[W?`activeKey`:`defaultActiveKey`]:W?b:S,tabBarExtraContent:C}),G,K=p(m),te=!K||K==="default"?`large`:K,ne=v?J.createElement(St,Object.assign({size:te},ee,{className:`${z}-head-tabs`,onChange:F,items:v.map(e=>{var{tab:t}=e,n=Pt(e,[`tab`]);return Object.assign({label:t},n)})})):null;if(l||o||ne){let e=(0,Y.default)(`${z}-head`,I(`header`)),t=(0,Y.default)(`${z}-head-title`,I(`title`)),n=(0,Y.default)(`${z}-extra`,I(`extra`)),r=Object.assign(Object.assign({},s),L(`header`));G=J.createElement(`div`,{className:e,style:r},J.createElement(`div`,{className:`${z}-head-wrapper`},l&&J.createElement(`div`,{className:t,style:L(`title`)},l),o&&J.createElement(`div`,{className:n,style:L(`extra`)},o)),ne)}let re=(0,Y.default)(`${z}-cover`,I(`cover`)),q=g?J.createElement(`div`,{className:re,style:L(`cover`)},g):null,ae=(0,Y.default)(`${z}-body`,I(`body`)),oe=Object.assign(Object.assign({},c),L(`body`)),se=J.createElement(`div`,{className:ae,style:oe},u?U:y),ce=(0,Y.default)(`${z}-actions`,I(`actions`)),le=_?.length?J.createElement(Ft,{actionClasses:ce,actionStyle:L(`actions`),actions:_}):null,ue=E(A,[`onTabChange`]),de=(0,Y.default)(z,N?.className,{[`${z}-loading`]:u,[`${z}-bordered`]:P!==`borderless`,[`${z}-hoverable`]:w,[`${z}-contain-grid`]:R,[`${z}-contain-tabs`]:v?.length,[`${z}-${K}`]:K,[`${z}-type-${h}`]:!!h,[`${z}-rtl`]:M===`rtl`},r,i,V,H),X=Object.assign(Object.assign({},N?.style),a);return B(J.createElement(`div`,Object.assign({ref:t},ue,{className:de,style:X}),G,q,se,le))}),Lt=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},Rt=e=>{let{prefixCls:t,className:n,avatar:r,title:i,description:a}=e,o=Lt(e,[`prefixCls`,`className`,`avatar`,`title`,`description`]),{getPrefixCls:s}=J.useContext(x),c=s(`card`,t),l=(0,Y.default)(`${c}-meta`,n),u=r?J.createElement(`div`,{className:`${c}-meta-avatar`},r):null,d=i?J.createElement(`div`,{className:`${c}-meta-title`},i):null,f=a?J.createElement(`div`,{className:`${c}-meta-description`},a):null,p=d||f?J.createElement(`div`,{className:`${c}-meta-detail`},d,f):null;return J.createElement(`div`,Object.assign({},o,{className:l}),u,p)},zt=It;zt.Grid=wt,zt.Meta=Rt;var Bt=(0,J.createContext)({}),Vt=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 Ht(e){return e===`auto`?`1 1 auto`:typeof e==`number`?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}var Ut=[`xs`,`sm`,`md`,`lg`,`xl`,`xxl`],Wt=J.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r}=J.useContext(x),{gutter:i,wrap:a}=J.useContext(Bt),{prefixCls:o,span:s,order:c,offset:l,push:u,pull:d,className:f,children:p,flex:m,style:h}=e,g=Vt(e,[`prefixCls`,`span`,`order`,`offset`,`push`,`pull`,`className`,`children`,`flex`,`style`]),_=n(`col`,o),[v,y,b]=A(_),S={},C={};Ut.forEach(t=>{let n={},i=e[t];typeof i==`number`?n.span=i:typeof i==`object`&&(n=i||{}),delete g[t],C=Object.assign(Object.assign({},C),{[`${_}-${t}-${n.span}`]:n.span!==void 0,[`${_}-${t}-order-${n.order}`]:n.order||n.order===0,[`${_}-${t}-offset-${n.offset}`]:n.offset||n.offset===0,[`${_}-${t}-push-${n.push}`]:n.push||n.push===0,[`${_}-${t}-pull-${n.pull}`]:n.pull||n.pull===0,[`${_}-rtl`]:r===`rtl`}),n.flex&&(C[`${_}-${t}-flex`]=!0,S[`--${_}-${t}-flex`]=Ht(n.flex))});let w=(0,Y.default)(_,{[`${_}-${s}`]:s!==void 0,[`${_}-order-${c}`]:c,[`${_}-offset-${l}`]:l,[`${_}-push-${u}`]:u,[`${_}-pull-${d}`]:d},f,C,y,b),T={};if(i?.[0]){let e=typeof i[0]==`number`?`${i[0]/2}px`:`calc(${i[0]} / 2)`;T.paddingLeft=e,T.paddingRight=e}return m&&(T.flex=Ht(m),a===!1&&!T.minWidth&&(T.minWidth=0)),v(J.createElement(`div`,Object.assign({},g,{style:Object.assign(Object.assign(Object.assign({},T),h),S),className:w,ref:t}),p))});function Gt(e,t){let n=[void 0,void 0],r=Array.isArray(e)?e:[e,void 0],i=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0};return r.forEach((e,t)=>{if(typeof e==`object`&&e)for(let r=0;r<m.length;r++){let a=m[r];if(i[a]&&e[a]!==void 0){n[t]=e[a];break}}else n[t]=e}),n}var Kt=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 qt(e,t){let[n,r]=J.useState(typeof e==`string`?e:``),i=()=>{if(typeof e==`string`&&r(e),typeof e==`object`)for(let n=0;n<m.length;n++){let i=m[n];if(!t||!t[i])continue;let a=e[i];if(a!==void 0){r(a);return}}};return J.useEffect(()=>{i()},[JSON.stringify(e),t]),n}var Jt=J.forwardRef((e,t)=>{let{prefixCls:n,justify:r,align:i,className:a,style:o,children:c,gutter:l=0,wrap:u}=e,d=Kt(e,[`prefixCls`,`justify`,`align`,`className`,`style`,`children`,`gutter`,`wrap`]),{getPrefixCls:f,direction:p}=J.useContext(x),m=s(!0,null),h=qt(i,m),g=qt(r,m),_=f(`row`,n),[v,y,b]=te(_),S=Gt(l,m),C=(0,Y.default)(_,{[`${_}-no-wrap`]:u===!1,[`${_}-${g}`]:g,[`${_}-${h}`]:h,[`${_}-rtl`]:p===`rtl`},a,y,b),w={};if(S?.[0]){let e=typeof S[0]==`number`?`${S[0]/-2}px`:`calc(${S[0]} / -2)`;w.marginLeft=e,w.marginRight=e}let[T,E]=S;w.rowGap=E;let D=J.useMemo(()=>({gutter:[T,E],wrap:u}),[T,E,u]);return v(J.createElement(Bt.Provider,{value:D},J.createElement(`div`,Object.assign({},d,{className:C,style:Object.assign(Object.assign({},w),o),ref:t}),c)))});function Yt(){return s()}var Xt={useBreakpoint:Yt};export{St as a,zt as i,Jt as n,xe as o,Wt as r,ye as s,Xt as t};
|