Files
weiguang-jewelry-ledger/新账系统/web/dist/assets/card-NznhFUfe.js
T

12 lines
45 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{$n as t,An as n,B as r,Cn as i,En as a,Ft as o,Jt as s,Kn as c,Kt as l,On as u,Ot as d,Qn as f,Qt as p,Rt as m,St as h,Vn as g,Vt as _,Wt as v,Xn as y,Xt as b,Zn as x,_t as S,cn as C,in as w,kn as T,kt as E,nn as D,qn as O,qt as k,tn as A,tr as j,wn as M,xt as N}from"./index-CPt4N9y-.js";import{c as P,i as F,p as I,r as L,u as R}from"./input-D3_oYg2w.js";import{C as z,T as B,y as V}from"./TextArea-D9hZdiQK.js";var H=e(j()),U=e(t()),W={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`},G=H.forwardRef(function(e,t){return H.createElement(m,f({},e,{ref:t,icon:W}))}),K=(0,H.createContext)(null),q=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=(0,H.useState)(),d=u(l,2),f=d[0],p=d[1],m=(0,H.useRef)(),h=H.useCallback(function(e){return typeof o==`function`?o(e):typeof o==`number`?o:e},[o]);function g(){T.cancel(m.current)}return(0,H.useEffect)(function(){var e={};if(t){if(n){e.width=h(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=h(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 g(),m.current=T(function(){f&&e&&Object.keys(e).every(function(t){var n=e[t],r=f[t];return typeof n==`number`&&typeof r==`number`?Math.round(n)===Math.round(r):n===r})||p(e)}),g},[JSON.stringify(t),n,r,c,h]),{style:f}},J={width:0,height:0,left:0,top:0};function ee(e,t,n){return(0,H.useMemo)(function(){for(var n=new Map,r=t.get(e[0]?.key)||J,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)||J;var l=n.get(o)||c({},s);l.right=i-l.left-l.width,n.set(o,l)}return n},[e.map(function(e){return e.key}).join(`_`),t,n])}function Y(e,t){var n=H.useRef(e),r=H.useState({}),i=u(r,2)[1];function a(e){var r=typeof e==`function`?e(n.current):e;r!==n.current&&t(r,n.current),n.current=r,i({})}return[n.current,a]}var te=.1,ne=.01,re=20,ie=.995**re;function ae(e,t){var n=(0,H.useState)(),r=u(n,2),i=r[0],a=r[1],o=(0,H.useState)(0),s=u(o,2),c=s[0],l=s[1],d=(0,H.useState)(0),f=u(d,2),p=f[0],m=f[1],h=(0,H.useState)(),g=u(h,2),_=g[0],v=g[1],y=(0,H.useRef)();function b(e){var t=e.touches[0];a({x:t.screenX,y:t.screenY}),window.clearInterval(y.current)}function x(e){if(i){var n=e.touches[0],r=n.screenX,o=n.screenY;a({x:r,y:o});var s=r-i.x,u=o-i.y;t(s,u);var d=Date.now();l(d),m(d-c),v({x:s,y:u})}}function S(){if(i&&(a(null),v(null),_)){var e=_.x/p,n=_.y/p;if(Math.max(Math.abs(e),Math.abs(n))<te)return;var r=e,o=n;y.current=window.setInterval(function(){Math.abs(r)<ne&&Math.abs(o)<ne?window.clearInterval(y.current):(r*=ie,o*=ie,t(r*re,o*re))},re)}}var C=(0,H.useRef)();function w(e){var n=e.deltaX,r=e.deltaY,i=0,a=Math.abs(n),o=Math.abs(r);a===o?i=C.current===`x`?n:r:a>o?(i=n,C.current=`x`):(i=r,C.current=`y`),t(-i,-i)&&e.preventDefault()}var T=(0,H.useRef)(null);T.current={onTouchStart:b,onTouchMove:x,onTouchEnd:S,onWheel:w},H.useEffect(function(){function t(e){T.current.onTouchStart(e)}function n(e){T.current.onTouchMove(e)}function r(e){T.current.onTouchEnd(e)}function i(e){T.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 oe(e){var t=(0,H.useState)(0),n=u(t,2),r=n[0],a=n[1],o=(0,H.useRef)(0),s=(0,H.useRef)();return s.current=e,i(function(){var e;(e=s.current)==null||e.call(s)},[r]),function(){o.current===r&&(o.current+=1,a(o.current))}}function se(e){var t=(0,H.useRef)([]),n=(0,H.useState)({}),r=u(n,2)[1],i=(0,H.useRef)(typeof e==`function`?e():e),a=oe(function(){var e=i.current;t.current.forEach(function(t){e=t(e)}),t.current=[],i.current=e,r({})});function o(e){t.current.push(e),a()}return[i.current,o]}var ce={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,H.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)||ce;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)||ce)[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 ue(e){var t;return e instanceof Map?(t={},e.forEach(function(e,n){t[n]=e})):t=e,JSON.stringify(t)}var de=`TABS_DQ`;function fe(e){return String(e).replace(/"/g,de)}function pe(e,t,n,r){return!(!n||r||e===!1||e===void 0&&(t===!1||t===null))}var me=H.forwardRef(function(e,t){var n=e.prefixCls,r=e.editable,i=e.locale,a=e.style;return!r||r.showAdd===!1?null:H.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||`+`)}),he=H.forwardRef(function(e,t){var n=e.position,r=e.prefixCls,i=e.extra;if(!i)return null;var a,o={};return x(i)===`object`&&!H.isValidElement(i)?o=i:o.right=i,n===`right`&&(a=o.right),n===`left`&&(a=o.left),a?H.createElement(`div`,{className:`${r}-extra-content`,ref:t},a):null}),ge=H.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,p=e.className,m=e.editable,h=e.tabBarGutter,g=e.rtl,_=e.removeAriaLabel,v=e.onTabClick,y=e.getPopupContainer,b=e.popupClassName,x=(0,H.useState)(!1),S=u(x,2),C=S[0],w=S[1],T=(0,H.useState)(null),E=u(T,2),D=E[0],k=E[1],A=c.icon,j=A===void 0?`More`:A,M=`${r}-more-popup`,N=`${n}-dropdown`,I=D===null?null:`${M}-${D}`,L=a?.dropdownAriaLabel;function z(e,t){e.preventDefault(),e.stopPropagation(),m.onEdit(`remove`,{key:t,event:e})}var B=H.createElement(F,{onClick:function(e){v(e.key,e.domEvent),w(!1)},prefixCls:`${N}-menu`,id:M,tabIndex:-1,role:`listbox`,"aria-activedescendant":I,selectedKeys:[D],"aria-label":L===void 0?`expanded dropdown`:L},i.map(function(e){var t=e.closable,n=e.disabled,i=e.closeIcon,a=e.key,o=e.label,s=pe(t,i,m,n);return H.createElement(P,{key:a,id:`${M}-${a}`,role:`option`,"aria-controls":r&&`${r}-panel-${a}`,disabled:n},H.createElement(`span`,null,o),s&&H.createElement(`button`,{type:`button`,"aria-label":_||`remove`,tabIndex:0,className:`${N}-menu-item-remove`,onClick:function(e){e.stopPropagation(),z(e,a)}},i||m.removeIcon||`×`))}));function V(e){for(var t=i.filter(function(e){return!e.disabled}),n=t.findIndex(function(e){return e.key===D})||0,r=t.length,a=0;a<r;a+=1){n=(n+e+r)%r;var o=t[n];if(!o.disabled){k(o.key);return}}}function W(e){var t=e.which;if(!C)[d.DOWN,d.SPACE,d.ENTER].includes(t)&&(w(!0),e.preventDefault());else switch(t){case d.UP:V(-1),e.preventDefault();break;case d.DOWN:V(1),e.preventDefault();break;case d.ESC:w(!1);break;case d.SPACE:case d.ENTER:D!==null&&v(D,e)}}(0,H.useEffect)(function(){var e=document.getElementById(I);e&&e.scrollIntoView&&e.scrollIntoView(!1)},[D]),(0,H.useEffect)(function(){C||k(null)},[C]);var G=O({},g?`marginRight`:`marginLeft`,h);i.length||(G.visibility=`hidden`,G.order=1);var K=(0,U.default)(O({},`${N}-rtl`,g)),q=o?null:H.createElement(R,f({prefixCls:N,overlay:B,visible:i.length?C:!1,onVisibleChange:w,overlayClassName:(0,U.default)(K,b),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:y},c),H.createElement(`button`,{type:`button`,className:`${n}-nav-more`,style:G,"aria-haspopup":`listbox`,"aria-controls":M,id:`${r}-more`,"aria-expanded":C,onKeyDown:W},j));return H.createElement(`div`,{className:(0,U.default)(`${n}-nav-operations`,p),style:l,ref:t},q,H.createElement(me,{prefixCls:n,locale:a,editable:m}))}),_e=H.memo(ge,function(e,t){return t.tabMoving}),ve=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,u=a.icon,d=e.closable,f=e.renderWrapper,p=e.removeAriaLabel,m=e.editable,h=e.onClick,g=e.onFocus,_=e.onBlur,v=e.onKeyDown,y=e.onMouseDown,b=e.onMouseUp,x=e.style,S=e.tabCount,C=e.currentPosition,w=`${t}-tab`,T=pe(d,l,m,c);function E(e){c||h(e)}function D(e){e.preventDefault(),e.stopPropagation(),m.onEdit(`remove`,{key:o,event:e})}var k=H.useMemo(function(){return u&&typeof s==`string`?H.createElement(`span`,null,s):s},[s,u]),A=H.useRef(null);H.useEffect(function(){i&&A.current&&A.current.focus()},[i]);var j=H.createElement(`div`,{key:o,"data-node-key":fe(o),className:(0,U.default)(w,O(O(O(O({},`${w}-with-remove`,T),`${w}-active`,r),`${w}-disabled`,c),`${w}-focus`,i)),style:x,onClick:E},H.createElement(`div`,{ref:A,role:`tab`,"aria-selected":r,id:n&&`${n}-tab-${o}`,className:`${w}-btn`,"aria-controls":n&&`${n}-panel-${o}`,"aria-disabled":c,tabIndex:c?null:r?0:-1,onClick:function(e){e.stopPropagation(),E(e)},onKeyDown:v,onMouseDown:y,onMouseUp:b,onFocus:g,onBlur:_},i&&H.createElement(`div`,{"aria-live":`polite`,style:{width:0,height:0,position:`absolute`,overflow:`hidden`,opacity:0}},`Tab ${C} of ${S}`),u&&H.createElement(`span`,{className:`${w}-icon`},u),s&&k),T&&H.createElement(`button`,{type:`button`,role:`tab`,"aria-label":p||`remove`,tabIndex:r?0:-1,className:`${w}-remove`,onClick:function(e){e.stopPropagation(),D(e)}},l||m.removeIcon||`×`));return f?f(j):j},ye=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]},be=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]},xe=function(e,t){return e[+!t]},Se=H.forwardRef(function(e,t){var r=e.className,i=e.style,a=e.id,o=e.animated,s=e.activeKey,l=e.rtl,d=e.extra,p=e.editable,m=e.locale,h=e.tabPosition,_=e.tabBarGutter,v=e.children,y=e.onTabClick,b=e.onTabScroll,x=e.indicator,S=H.useContext(K),C=S.prefixCls,T=S.tabs,E=(0,H.useRef)(null),D=(0,H.useRef)(null),k=(0,H.useRef)(null),A=(0,H.useRef)(null),j=(0,H.useRef)(null),M=(0,H.useRef)(null),N=(0,H.useRef)(null),P=h===`top`||h===`bottom`,F=Y(0,function(e,t){P&&b&&b({direction:e>t?`left`:`right`})}),I=u(F,2),L=I[0],R=I[1],z=Y(0,function(e,t){!P&&b&&b({direction:e>t?`top`:`bottom`})}),V=u(z,2),W=V[0],G=V[1],J=(0,H.useState)([0,0]),te=u(J,2),ne=te[0],re=te[1],ie=(0,H.useState)([0,0]),ce=u(ie,2),de=ce[0],ge=ce[1],Se=(0,H.useState)([0,0]),Ce=u(Se,2),we=Ce[0],Te=Ce[1],Ee=(0,H.useState)([0,0]),De=u(Ee,2),Oe=De[0],ke=De[1],Ae=se(new Map),je=u(Ae,2),Me=je[0],Ne=je[1],Pe=ee(T,Me,de[0]),Fe=xe(ne,P),Ie=xe(de,P),Le=xe(we,P),Re=xe(Oe,P),ze=Math.floor(Fe)<Math.floor(Ie+Le),X=ze?Fe-Re:Fe-Le,Be=`${C}-nav-operations-hidden`,Z=0,Ve=0;P&&l?(Z=0,Ve=Math.max(0,Ie-X)):(Z=Math.min(0,X-Ie),Ve=0);function He(e){return e<Z?Z:e>Ve?Ve:e}var Ue=(0,H.useRef)(null),We=(0,H.useState)(),Ge=u(We,2),Ke=Ge[0],qe=Ge[1];function Je(){qe(Date.now())}function Ye(){Ue.current&&clearTimeout(Ue.current)}ae(A,function(e,t){function n(e,t){e(function(e){return He(e+t)})}return ze?(P?n(R,e):n(G,t),Ye(),Je(),!0):!1}),(0,H.useEffect)(function(){return Ye(),Ke&&(Ue.current=setTimeout(function(){qe(0)},100)),Ye},[Ke]);var Xe=le(Pe,X,P?L:W,Ie,Le,Re,c(c({},e),{},{tabs:T})),Ze=u(Xe,2),Qe=Ze[0],$e=Ze[1],et=w(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s,t=Pe.get(e)||{width:0,height:0,left:0,right:0,top:0};if(P){var n=L;l?t.right<L?n=t.right:t.right+t.width>L+X&&(n=t.right+t.width-X):t.left<-L?n=-t.left:t.left+t.width>-L+X&&(n=-(t.left+t.width-X)),G(0),R(He(n))}else{var r=W;t.top<-W?r=-t.top:t.top+t.height>-W+X&&(r=-(t.top+t.height-X)),R(0),G(He(r))}}),tt=(0,H.useState)(),nt=u(tt,2),rt=nt[0],it=nt[1],at=(0,H.useState)(!1),ot=u(at,2),st=ot[0],ct=ot[1],Q=T.filter(function(e){return!e.disabled}).map(function(e){return e.key}),$=function(e){var t=Q.indexOf(rt||s),n=Q.length;it(Q[(t+e+n)%n])},lt=function(e,t){var n=Q.indexOf(e),r=T.find(function(t){return t.key===e});pe(r?.closable,r?.closeIcon,p,r?.disabled)&&(t.preventDefault(),t.stopPropagation(),p.onEdit(`remove`,{key:e,event:t}),n===Q.length-1?$(-1):$(1))},ut=function(e,t){ct(!0),t.button===1&&lt(e,t)},dt=function(e){var t=e.code,n=l&&P,r=Q[0],i=Q[Q.length-1];switch(t){case`ArrowLeft`:P&&$(n?1:-1);break;case`ArrowRight`:P&&$(n?-1:1);break;case`ArrowUp`:e.preventDefault(),P||$(-1);break;case`ArrowDown`:e.preventDefault(),P||$(1);break;case`Home`:e.preventDefault(),it(r);break;case`End`:e.preventDefault(),it(i);break;case`Enter`:case`Space`:e.preventDefault(),y(rt??s,e);break;case`Backspace`:case`Delete`:lt(rt,e)}},ft={};P?ft[l?`marginRight`:`marginLeft`]=_:ft.marginTop=_;var pt=T.map(function(e,t){var n=e.key;return H.createElement(ve,{id:a,prefixCls:C,key:n,tab:e,style:t===0?void 0:ft,closable:e.closable,editable:p,active:n===s,focus:n===rt,renderWrapper:v,removeAriaLabel:m?.removeAriaLabel,tabCount:Q.length,currentPosition:t+1,onClick:function(e){y(n,e)},onKeyDown:dt,onFocus:function(){st||it(n),et(n),Je(),A.current&&(l||(A.current.scrollLeft=0),A.current.scrollTop=0)},onBlur:function(){it(void 0)},onMouseDown:function(e){return ut(n,e)},onMouseUp:function(){ct(!1)}})}),mt=function(){return Ne(function(){var e=new Map,t=j.current?.getBoundingClientRect();return T.forEach(function(n){var r=n.key,i=j.current?.querySelector(`[data-node-key="${fe(r)}"]`);if(i){var a=ye(i,t),o=u(a,4),s=o[0],c=o[1],l=o[2],d=o[3];e.set(r,{width:s,height:c,left:l,top:d})}}),e})};(0,H.useEffect)(function(){mt()},[T.map(function(e){return e.key}).join(`_`)]);var ht=oe(function(){var e=be(E),t=be(D),n=be(k);re([e[0]-t[0]-n[0],e[1]-t[1]-n[1]]);var r=be(N);Te(r),ke(be(M));var i=be(j);ge([i[0]-r[0],i[1]-r[1]]),mt()}),gt=T.slice(0,Qe),_t=T.slice($e+1),vt=[].concat(n(gt),n(_t)),yt=Pe.get(s),bt=q({activeTabOffset:yt,horizontal:P,indicator:x,rtl:l}).style;(0,H.useEffect)(function(){et()},[s,Z,Ve,ue(yt),ue(Pe),P]),(0,H.useEffect)(function(){ht()},[l]);var xt=!!vt.length,St=`${C}-nav-wrap`,Ct,wt,Tt,Et;return P?l?(wt=L>0,Ct=L!==Ve):(Ct=L<0,wt=L!==Z):(Tt=W<0,Et=W!==Z),H.createElement(B,{onResize:ht},H.createElement(`div`,{ref:g(t,E),role:`tablist`,"aria-orientation":P?`horizontal`:`vertical`,className:(0,U.default)(`${C}-nav`,r),style:i,onKeyDown:function(){Je()}},H.createElement(he,{ref:D,position:`left`,extra:d,prefixCls:C}),H.createElement(B,{onResize:ht},H.createElement(`div`,{className:(0,U.default)(St,O(O(O(O({},`${St}-ping-left`,Ct),`${St}-ping-right`,wt),`${St}-ping-top`,Tt),`${St}-ping-bottom`,Et)),ref:A},H.createElement(B,{onResize:ht},H.createElement(`div`,{ref:j,className:`${C}-nav-list`,style:{transform:`translate(${L}px, ${W}px)`,transition:Ke?`none`:void 0}},pt,H.createElement(me,{ref:N,prefixCls:C,locale:m,editable:p,style:c(c({},pt.length===0?void 0:ft),{},{visibility:xt?`hidden`:null})}),H.createElement(`div`,{className:(0,U.default)(`${C}-ink-bar`,O({},`${C}-ink-bar-animated`,o.inkBar)),style:bt}))))),H.createElement(_e,f({},e,{removeAriaLabel:m?.removeAriaLabel,ref:M,prefixCls:C,tabs:vt,className:!xt&&Be,tabMoving:!!Ke})),H.createElement(he,{ref:k,position:`right`,extra:d,prefixCls:C})))}),Ce=H.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 H.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,U.default)(n,o&&`${n}-active`,r),ref:t},c)}),we=[`renderTabBar`],Te=[`label`,`key`],Ee=function(e){var t=e.renderTabBar,n=a(e,we),r=H.useContext(K).tabs;return t?t(c(c({},n),{},{panes:r.map(function(e){var t=e.label,n=e.key,r=a(e,Te);return H.createElement(Ce,f({tab:t,key:n,tabKey:n},r))})}),Se):H.createElement(Se,n)},De=[`key`,`forceRender`,`style`,`className`,`destroyInactiveTabPane`],Oe=function(e){var t=e.id,n=e.activeKey,r=e.animated,i=e.tabPosition,o=e.destroyInactiveTabPane,s=H.useContext(K),l=s.prefixCls,u=s.tabs,d=r.tabPane,p=`${l}-tabpane`;return H.createElement(`div`,{className:(0,U.default)(`${l}-content-holder`)},H.createElement(`div`,{className:(0,U.default)(`${l}-content`,`${l}-content-${i}`,O({},`${l}-content-animated`,d))},u.map(function(e){var i=e.key,s=e.forceRender,l=e.style,u=e.className,m=e.destroyInactiveTabPane,h=a(e,De),g=i===n;return H.createElement(_,f({key:i,visible:g,forceRender:s,removeOnLeave:!!(o||m),leavedClassName:`${p}-hidden`},r.tabPaneMotion),function(e,n){var r=e.style,a=e.className;return H.createElement(Ce,f({},h,{prefixCls:p,id:t,tabKey:i,animated:d,active:g,style:c(c({},l),r),className:(0,U.default)(u,a),ref:n}))})})))};function ke(){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}:c({inkBar:!0},x(e)===`object`?e:{});return t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}var Ae=[`id`,`prefixCls`,`className`,`items`,`direction`,`activeKey`,`defaultActiveKey`,`editable`,`animated`,`tabPosition`,`tabBarGutter`,`tabBarStyle`,`tabBarExtraContent`,`locale`,`more`,`destroyInactiveTabPane`,`renderTabBar`,`onChange`,`onTabClick`,`onTabScroll`,`getPopupContainer`,`popupClassName`,`indicator`],je=0,Me=H.forwardRef(function(e,t){var n=e.id,r=e.prefixCls,i=r===void 0?`rc-tabs`:r,o=e.className,s=e.items,l=e.direction,d=e.activeKey,p=e.defaultActiveKey,m=e.editable,h=e.animated,g=e.tabPosition,_=g===void 0?`top`:g,v=e.tabBarGutter,y=e.tabBarStyle,b=e.tabBarExtraContent,S=e.locale,C=e.more,w=e.destroyInactiveTabPane,T=e.renderTabBar,E=e.onChange,k=e.onTabClick,A=e.onTabScroll,j=e.getPopupContainer,M=e.popupClassName,N=e.indicator,P=a(e,Ae),F=H.useMemo(function(){return(s||[]).filter(function(e){return e&&x(e)===`object`&&`key`in e})},[s]),I=l===`rtl`,L=ke(h),R=(0,H.useState)(!1),B=u(R,2),V=B[0],W=B[1];(0,H.useEffect)(function(){W(z())},[]);var G=D(function(){return F[0]?.key},{value:d,defaultValue:p}),q=u(G,2),J=q[0],ee=q[1],Y=(0,H.useState)(function(){return F.findIndex(function(e){return e.key===J})}),te=u(Y,2),ne=te[0],re=te[1];(0,H.useEffect)(function(){var e=F.findIndex(function(e){return e.key===J});e===-1&&(e=Math.max(0,Math.min(ne,F.length-1)),ee(F[e]?.key)),re(e)},[F.map(function(e){return e.key}).join(`_`),J,ne]);var ie=D(null,{value:n}),ae=u(ie,2),oe=ae[0],se=ae[1];(0,H.useEffect)(function(){n||(se(`rc-tabs-${je}`),je+=1)},[]);function ce(e,t){k?.(e,t);var n=e!==J;ee(e),n&&E?.(e)}var le={id:oe,activeKey:J,animated:L,tabPosition:_,rtl:I,mobile:V},ue=c(c({},le),{},{editable:m,locale:S,more:C,tabBarGutter:v,onTabClick:ce,onTabScroll:A,extra:b,style:y,panes:null,getPopupContainer:j,popupClassName:M,indicator:N});return H.createElement(K.Provider,{value:{tabs:F,prefixCls:i}},H.createElement(`div`,f({ref:t,id:n,className:(0,U.default)(i,`${i}-${_}`,O(O(O({},`${i}-mobile`,V),`${i}-editable`,m),`${i}-rtl`,I),o)},P),H.createElement(Ee,f({},ue,{renderTabBar:T})),H.createElement(Oe,f({destroyInactiveTabPane:w},le,{animated:L}))))}),Ne={motionAppear:!1,motionEnter:!0,motionLeave:!0};function Pe(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({},Ne),{motionName:h(e,`switch`)})),n}var Fe=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 Ie(e){return e.filter(e=>e)}function Le(e,t){return e?e.map(e=>{let t=e.destroyOnHidden??e.destroyInactiveTabPane;return Object.assign(Object.assign({},e),{destroyInactiveTabPane:t})}):Ie(y(t).map(e=>{if(H.isValidElement(e)){let{key:t,props:n}=e,r=n||{},{tab:i}=r,a=Fe(r,[`tab`]);return Object.assign(Object.assign({key:String(t)},a),{label:i})}return null}))}var Re=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}`}}}}},[I(e,`slide-up`),I(e,`slide-down`)]]},ze=e=>{let{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:i,colorBorderSecondary:a,itemSelectedColor:o}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:r,border:`${M(e.lineWidth)} ${e.lineType} ${a}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:o,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:k(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:M(i)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${M(e.borderRadiusLG)} ${M(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${M(e.borderRadiusLG)} ${M(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:M(i)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${M(e.borderRadiusLG)} 0 0 ${M(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 ${M(e.borderRadiusLG)} ${M(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},X=e=>{let{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return{[`${t}-dropdown`]:Object.assign(Object.assign({},b(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:`${M(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({},p),{display:`flex`,alignItems:`center`,minWidth:e.tabsDropdownWidth,margin:0,padding:`${M(e.paddingXXS)} ${M(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`}}})}})}},Be=e=>{let{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:i,verticalItemPadding:a,verticalItemMargin:o,calc:s}=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:`${M(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:s(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:a,textAlign:`center`},[`${t}-tab + ${t}-tab`]:{margin:o},[`${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:M(s(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${M(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:s(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${M(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},Z=e=>{let{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:a,horizontalItemPaddingSM:o,horizontalItemPaddingLG:s}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:o,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:s,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 ${M(e.borderRadius)} ${M(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${M(e.borderRadius)} ${M(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${M(e.borderRadius)} ${M(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${M(e.borderRadius)} 0 0 ${M(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:a,minHeight:a}}}}}},Ve=e=>{let{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:a,horizontalItemPadding:o,itemSelectedColor:c,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}},s(e)),"&:hover":{color:r},[`&${u}-active ${u}-btn`]:{color:c,textShadow:e.tabsActiveTextShadow},[`&${u}-focus ${u}-btn:focus-visible`]:k(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}}}},He=e=>{let{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:a}=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:M(e.marginSM)}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:M(e.marginXS)},marginLeft:{_skip_check_:!0,value:M(a(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`}}}}},Ue=e=>{let{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:i,itemHoverColor:a,itemActiveColor:o,colorBorderSecondary:c}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},b(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:`${M(e.lineWidth)} ${e.lineType} ${c}`,borderRadius:`${M(e.borderRadiusLG)} ${M(e.borderRadiusLG)} 0 0`,outline:`none`,cursor:`pointer`,color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:a},"&:active, &:focus:not(:focus-visible)":{color:o}},s(e,-3))},[`${t}-extra-content`]:{flex:`none`},[`${t}-ink-bar`]:{position:`absolute`,background:e.inkBarColor,pointerEvents:`none`}}),Ve(e)),{[`${t}-content`]:{position:`relative`,width:`100%`},[`${t}-content-holder`]:{flex:`auto`,minWidth:0,minHeight:0},[`${t}-tabpane`]:Object.assign(Object.assign({},s(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`}}}}}},We=v(`Tabs`,e=>{let t=A(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:`0 0 0.25px currentcolor`,tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${M(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${M(e.horizontalItemGutter)}`});return[Z(t),He(t),Be(t),X(t),ze(t),Ue(t),Re(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}}),Ge=()=>null,Ke=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},qe=H.forwardRef((e,t)=>{let{type:n,className:r,rootClassName:i,size:a,onEdit:s,hideAdd:c,centered:l,addIcon:u,removeIcon:d,moreIcon:f,more:p,popupClassName:m,children:h,items:g,animated:_,style:v,indicatorSize:y,indicator:b,destroyInactiveTabPane:x,destroyOnHidden:w}=e,T=Ke(e,[`type`,`className`,`rootClassName`,`size`,`onEdit`,`hideAdd`,`centered`,`addIcon`,`removeIcon`,`moreIcon`,`more`,`popupClassName`,`children`,`items`,`animated`,`style`,`indicatorSize`,`indicator`,`destroyInactiveTabPane`,`destroyOnHidden`]),{prefixCls:D}=T,{direction:O,tabs:k,getPrefixCls:A,getPopupContainer:j}=H.useContext(C),M=A(`tabs`,D),N=E(M),[P,F,I]=We(M,N),R=H.useRef(null);H.useImperativeHandle(t,()=>({nativeElement:R.current}));let z;n===`editable-card`&&(z={onEdit:(e,{key:t,event:n})=>{s?.(e===`add`?n:t,e)},removeIcon:d??k?.removeIcon??H.createElement(o,null),addIcon:(u??k?.addIcon)||H.createElement(G,null),showAdd:c!==!0});let B=A(),V=S(a),W=Le(g,h),K=Pe(M,_),q=Object.assign(Object.assign({},k?.style),v),J={align:b?.align??k?.indicator?.align,size:b?.size??y??k?.indicator?.size??k?.indicatorSize};return P(H.createElement(Me,Object.assign({ref:R,direction:O,getPopupContainer:j},T,{items:W,className:(0,U.default)({[`${M}-${V}`]:V,[`${M}-card`]:[`card`,`editable-card`].includes(n),[`${M}-editable-card`]:n===`editable-card`,[`${M}-centered`]:l},k?.className,r,i,F,I,N),popupClassName:(0,U.default)(m,F,I,N),style:q,editable:z,more:Object.assign({icon:k?.more?.icon??k?.moreIcon??f??H.createElement(L,null),transitionName:`${B}-slide-up`},p),prefixCls:M,animated:K,indicator:J,destroyInactiveTabPane:w??x})))});qe.TabPane=Ge;var Je=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},Ye=e=>{var{prefixCls:t,className:n,hoverable:r=!0}=e,i=Je(e,[`prefixCls`,`className`,`hoverable`]);let{getPrefixCls:a}=H.useContext(C),o=a(`card`,t),s=(0,U.default)(`${o}-grid`,n,{[`${o}-grid-hoverable`]:r});return H.createElement(`div`,Object.assign({},i,{className:s}))},Xe=e=>{let{antCls:t,componentCls:n,headerHeight:r,headerPadding:i,tabsMarginBottom:a}=e;return Object.assign(Object.assign({display:`flex`,justifyContent:`center`,flexDirection:`column`,minHeight:r,marginBottom:-1,padding:`0 ${M(i)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${M(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${M(e.borderRadiusLG)} ${M(e.borderRadiusLG)} 0 0`},l()),{"&-wrapper":{width:`100%`,display:`flex`,alignItems:`center`},"&-title":Object.assign(Object.assign({display:`inline-block`,flex:1},p),{[`
> ${n}-typography,
> ${n}-typography-edit-content
`]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:`both`,marginBottom:a,color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize,"&-bar":{borderBottom:`${M(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})},Ze=e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:r,lineWidth:i}=e;return{width:`33.33%`,padding:t,border:0,borderRadius:0,boxShadow:`
${M(i)} 0 0 0 ${n},
0 ${M(i)} 0 0 ${n},
${M(i)} ${M(i)} 0 0 ${n},
${M(i)} 0 0 0 ${n} inset,
0 ${M(i)} 0 0 ${n} inset;
`,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:`relative`,zIndex:1,boxShadow:r}}},Qe=e=>{let{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:i,colorBorderSecondary:a,actionsBg:o}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:`none`,background:o,borderTop:`${M(e.lineWidth)} ${e.lineType} ${a}`,display:`flex`,borderRadius:`0 0 ${M(e.borderRadiusLG)} ${M(e.borderRadiusLG)}`},l()),{"& > 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:M(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:M(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${M(e.lineWidth)} ${e.lineType} ${a}`}}})},$e=e=>Object.assign(Object.assign({margin:`${M(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:`flex`},l()),{"&-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},p),"&-description":{color:e.colorTextDescription}}),et=e=>{let{componentCls:t,colorFillAlter:n,headerPadding:r,bodyPadding:i}=e;return{[`${t}-head`]:{padding:`0 ${M(r)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${M(e.padding)} ${M(i)}`}}},tt=e=>{let{componentCls:t}=e;return{overflow:`hidden`,[`${t}-body`]:{userSelect:`none`}}},nt=e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:r,colorBorderSecondary:i,boxShadowTertiary:a,bodyPadding:o,extraColor:s}=e;return{[t]:Object.assign(Object.assign({},b(e)),{position:`relative`,background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:a},[`${t}-head`]:Xe(e),[`${t}-extra`]:{marginInlineStart:`auto`,color:s,fontWeight:`normal`,fontSize:e.fontSize},[`${t}-body`]:{padding:o,borderRadius:`0 0 ${M(e.borderRadiusLG)} ${M(e.borderRadiusLG)}`},[`${t}-grid`]:Ze(e),[`${t}-cover`]:{"> *":{display:`block`,width:`100%`,borderRadius:`${M(e.borderRadiusLG)} ${M(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:Qe(e),[`${t}-meta`]:$e(e)}),[`${t}-bordered`]:{border:`${M(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:`${M(e.borderRadiusLG)} ${M(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`]:et(e),[`${t}-loading`]:tt(e),[`${t}-rtl`]:{direction:`rtl`}}},rt=e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:i,headerFontSizeSM:a}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${M(r)}`,fontSize:a,[`> ${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`}}}}},it=v(`Card`,e=>{let t=A(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[nt(t),rt(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})),at=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},ot=e=>{let{actionClasses:t,actions:n=[],actionStyle:r}=e;return H.createElement(`ul`,{className:t,style:r},n.map((e,t)=>{let r=`action-${t}`;return H.createElement(`li`,{style:{width:`${100/n.length}%`},key:r},H.createElement(`span`,null,e))}))},st=H.forwardRef((e,t)=>{let{prefixCls:n,className:i,rootClassName:a,style:o,extra:s,headStyle:c={},bodyStyle:l={},title:u,loading:d,bordered:f,variant:p,size:m,type:h,cover:g,actions:_,tabList:v,children:y,activeTabKey:b,defaultActiveTabKey:x,tabBarExtraContent:w,hoverable:T,tabProps:E={},classNames:D,styles:O}=e,k=at(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:A,direction:j,card:M}=H.useContext(C),[P]=V(`card`,p,f),F=t=>{var n;(n=e.onTabChange)==null||n.call(e,t)},I=e=>(0,U.default)(M?.classNames?.[e],D?.[e]),L=e=>Object.assign(Object.assign({},M?.styles?.[e]),O?.[e]),R=H.useMemo(()=>{let e=!1;return H.Children.forEach(y,t=>{t?.type===Ye&&(e=!0)}),e},[y]),z=A(`card`,n),[B,W,G]=it(z),K=H.createElement(r,{loading:!0,active:!0,paragraph:{rows:4},title:!1},y),q=b!==void 0,J=Object.assign(Object.assign({},E),{[q?`activeKey`:`defaultActiveKey`]:q?b:x,tabBarExtraContent:w}),ee,Y=S(m),te=!Y||Y==="default"?`large`:Y,ne=v?H.createElement(qe,Object.assign({size:te},J,{className:`${z}-head-tabs`,onChange:F,items:v.map(e=>{var{tab:t}=e,n=at(e,[`tab`]);return Object.assign({label:t},n)})})):null;if(u||s||ne){let e=(0,U.default)(`${z}-head`,I(`header`)),t=(0,U.default)(`${z}-head-title`,I(`title`)),n=(0,U.default)(`${z}-extra`,I(`extra`)),r=Object.assign(Object.assign({},c),L(`header`));ee=H.createElement(`div`,{className:e,style:r},H.createElement(`div`,{className:`${z}-head-wrapper`},u&&H.createElement(`div`,{className:t,style:L(`title`)},u),s&&H.createElement(`div`,{className:n,style:L(`extra`)},s)),ne)}let re=(0,U.default)(`${z}-cover`,I(`cover`)),ie=g?H.createElement(`div`,{className:re,style:L(`cover`)},g):null,ae=(0,U.default)(`${z}-body`,I(`body`)),oe=Object.assign(Object.assign({},l),L(`body`)),se=H.createElement(`div`,{className:ae,style:oe},d?K:y),ce=(0,U.default)(`${z}-actions`,I(`actions`)),le=_?.length?H.createElement(ot,{actionClasses:ce,actionStyle:L(`actions`),actions:_}):null,ue=N(k,[`onTabChange`]),de=(0,U.default)(z,M?.className,{[`${z}-loading`]:d,[`${z}-bordered`]:P!==`borderless`,[`${z}-hoverable`]:T,[`${z}-contain-grid`]:R,[`${z}-contain-tabs`]:v?.length,[`${z}-${Y}`]:Y,[`${z}-type-${h}`]:!!h,[`${z}-rtl`]:j===`rtl`},i,a,W,G),fe=Object.assign(Object.assign({},M?.style),o);return B(H.createElement(`div`,Object.assign({ref:t},ue,{className:de,style:fe}),ee,ie,se,le))}),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},Q=e=>{let{prefixCls:t,className:n,avatar:r,title:i,description:a}=e,o=ct(e,[`prefixCls`,`className`,`avatar`,`title`,`description`]),{getPrefixCls:s}=H.useContext(C),c=s(`card`,t),l=(0,U.default)(`${c}-meta`,n),u=r?H.createElement(`div`,{className:`${c}-meta-avatar`},r):null,d=i?H.createElement(`div`,{className:`${c}-meta-title`},i):null,f=a?H.createElement(`div`,{className:`${c}-meta-description`},a):null,p=d||f?H.createElement(`div`,{className:`${c}-meta-detail`},d,f):null;return H.createElement(`div`,Object.assign({},o,{className:l}),u,p)},$=st;$.Grid=Ye,$.Meta=Q;export{G as n,$ as t};