👨🏻‍💻👩🏻‍💻 Use Ant Design like a Pro!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

24 lines
27 KiB

(globalThis.utooChunk_ant_design_pro||(globalThis.utooChunk_ant_design_pro=[])).push(["object"==typeof document?document.currentScript:void 0,97679,e=>{"use strict";let t;var a=e.i(191788);e.i(636832);var r=e.i(222776),r=r,n=e.i(108154),i=e.i(325336),l=e.i(56926),o=e.i(56206),s=e.i(259165),d=e.i(351212),u=e.i(499997);let c=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
pointer-events: none !important;
`,p=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],f={};function m(){return(m=Object.assign.bind()).apply(this,arguments)}let g=a.forwardRef((e,r)=>{let{prefixCls:n,defaultValue:i,value:g,autoSize:x,onResize:h,className:$,style:b,disabled:y,onChange:v,onInternalAutoSize:S,...w}=e,[E,C]=(0,l.default)(i,g),z=a.useRef();a.useImperativeHandle(r,()=>({textArea:z.current}));let[R,N]=a.useMemo(()=>x&&"object"==typeof x?[x.minRows,x.maxRows]:[],[x]),I=!!x,[T,A]=a.useState(2),[H,W]=a.useState(),k=()=>{A(0)};(0,d.default)(()=>{I&&k()},[g,R,N,I]),(0,d.default)(()=>{if(0===T)A(1);else if(1===T){let e=function(e,a=!1,r=null,n=null){let i,l,o;t||((t=document.createElement("textarea")).setAttribute("tab-index","-1"),t.setAttribute("aria-hidden","true"),t.setAttribute("name","hiddenTextarea"),document.body.appendChild(t)),e.getAttribute("wrap")?t.setAttribute("wrap",e.getAttribute("wrap")):t.removeAttribute("wrap");let{paddingSize:s,borderSize:d,boxSizing:u,sizingStyle:m}=function(e,t=!1){let a=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&f[a])return f[a];let r=window.getComputedStyle(e),n=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),i=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),l=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),o={sizingStyle:p.map(e=>`${e}:${r.getPropertyValue(e)}`).join(";"),paddingSize:i,borderSize:l,boxSizing:n};return t&&a&&(f[a]=o),o}(e,a);t.setAttribute("style",`${m};${c}`),t.value=e.value||e.placeholder||"";let g=t.scrollHeight;if("border-box"===u?g+=d:"content-box"===u&&(g-=s),null!==r||null!==n){t.value=" ";let e=t.scrollHeight-s;null!==r&&(l=e*r,"border-box"===u&&(l=l+s+d),g=Math.max(l,g)),null!==n&&(o=e*n,"border-box"===u&&(o=o+s+d),i=g>o?"":"hidden",g=Math.min(o,g))}let x={height:g,overflowY:i,resize:"none"};return l&&(x.minHeight=l),o&&(x.maxHeight=o),x}(z.current,!1,R,N);A(2),W(e)}},[T]);let F=a.useRef(),L=()=>{u.default.cancel(F.current)};a.useEffect(()=>L,[]);let M={...b,...I?H:null};return(0===T||1===T)&&(M.overflowY="hidden",M.overflowX="hidden"),a.createElement(s.default,{onResize:e=>{2===T&&(h?.(e),x&&(L(),F.current=(0,u.default)(()=>{k()})))},disabled:!(x||h)},a.createElement("textarea",m({},w,{ref:z,style:M,className:(0,o.clsx)(n,$,{[`${n}-disabled`]:y}),disabled:y,value:E??"",onChange:e=>{C(e.target.value),v?.(e)}})))});function x(){return(x=Object.assign.bind()).apply(this,arguments)}let h=a.default.forwardRef(({defaultValue:e,value:t,onFocus:s,onBlur:d,onChange:u,allowClear:c,maxLength:p,onCompositionStart:f,onCompositionEnd:m,suffix:h,prefixCls:$="rc-textarea",showCount:b,count:y,className:v,style:S,disabled:w,hidden:E,classNames:C,styles:z,onResize:R,onClear:N,onPressEnter:I,readOnly:T,autoSize:A,onKeyDown:H,...W},k)=>{let F,[L,M]=(0,l.default)(e,t),P=null==L?"":String(L),[B,G]=a.default.useState(!1),j=a.default.useRef(!1),[q,D]=a.default.useState(null),O=(0,a.useRef)(null),V=(0,a.useRef)(null),X=()=>V.current?.textArea,_=()=>{X().focus()};(0,a.useImperativeHandle)(k,()=>({resizableTextArea:V.current,focus:_,blur:()=>{X().blur()},nativeElement:O.current?.nativeElement||X()})),(0,a.useEffect)(()=>{G(e=>!w&&e)},[w]);let[K,U]=a.default.useState(null);a.default.useEffect(()=>{K&&X().setSelectionRange(...K)},[K]);let Y=(0,n.default)(y,b),J=Y.max??p,Q=Number(J)>0,Z=Y.strategy(P),ee=!!J&&Z>J,et=(e,t)=>{let a=t;!j.current&&Y.exceedFormatter&&Y.max&&Y.strategy(t)>Y.max&&(a=Y.exceedFormatter(t,{max:Y.max}),t!==a&&U([X().selectionStart||0,X().selectionEnd||0])),M(a),(0,i.resolveOnChange)(e.currentTarget,e,u,a)},ea=h;Y.show&&(F=Y.showFormatter?Y.showFormatter({value:P,count:Z,maxLength:J}):`${Z}${Q?` / ${J}`:""}`,ea=a.default.createElement(a.default.Fragment,null,ea,a.default.createElement("span",{className:(0,o.clsx)(`${$}-data-count`,C?.count),style:z?.count},F)));let er=!A&&!b&&!c;return a.default.createElement(r.default,{ref:O,value:P,allowClear:c,handleReset:e=>{M(""),_(),(0,i.resolveOnChange)(X(),e,u)},suffix:ea,prefixCls:$,classNames:{...C,affixWrapper:(0,o.clsx)(C?.affixWrapper,{[`${$}-show-count`]:b,[`${$}-textarea-allow-clear`]:c})},disabled:w,focused:B,className:(0,o.clsx)(v,ee&&`${$}-out-of-range`),style:{...S,...q&&!er?{height:"auto"}:{}},dataAttrs:{affixWrapper:{"data-count":"string"==typeof F?F:void 0}},hidden:E,readOnly:T,onClear:N},a.default.createElement(g,x({},W,{autoSize:A,maxLength:p,onKeyDown:e=>{"Enter"===e.key&&I&&!e.nativeEvent.isComposing&&I(e),H?.(e)},onChange:e=>{et(e,e.target.value)},onFocus:e=>{G(!0),s?.(e)},onBlur:e=>{G(!1),d?.(e)},onCompositionStart:e=>{j.current=!0,f?.(e)},onCompositionEnd:e=>{j.current=!1,et(e,e.currentTarget.value),m?.(e)},className:(0,o.clsx)(C?.textarea),style:{resize:S?.resize,...z?.textarea},disabled:w,prefixCls:$,onResize:e=>{R?.(e),X()?.style.height&&D(!0)},ref:V,readOnly:T})))});var $=e.i(782041),b=e.i(430898),y=e.i(640684),v=e.i(993175),S=e.i(82038),w=e.i(749919),E=e.i(625263),C=e.i(873627),z=e.i(536995),R=e.i(688490),N=e.i(312744),I=e.i(428170),T=e.i(352050),A=e.i(104616),H=e.i(636261),W=(0,T.genStyleHooks)(["Input","TextArea"],e=>(e=>{let{componentCls:t,paddingLG:a}=e,r=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical",[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[r]:{position:"relative","&-show-count":{[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
&-allow-clear > ${t},
&-affix-wrapper${r}-has-feedback ${t}
`]:{paddingInlineEnd:a},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}})((0,A.mergeToken)(e,(0,H.initInputToken)(e))),H.initComponentToken,{resetFont:!1});let k=(0,a.forwardRef)((e,t)=>{let{prefixCls:r,bordered:n=!0,size:i,disabled:l,status:s,allowClear:d,classNames:u,rootClassName:c,className:p,style:f,styles:m,variant:g,showCount:x,onMouseDown:T,onResize:A,...H}=e,{getPrefixCls:k,direction:F,allowClear:L,autoComplete:M,className:P,style:B,classNames:G,styles:j}=(0,v.useComponentConfig)("textArea"),q=a.useContext(S.default),{status:D,hasFeedback:O,feedbackIcon:V}=a.useContext(C.FormItemInputContext),X=(0,y.getMergedStatus)(D,s),[_,K]=(0,b.useMergeSemantic)([G,u],[j,m],{props:e}),U=a.useRef(null);a.useImperativeHandle(t,()=>({resizableTextArea:U.current?.resizableTextArea,focus:e=>{(0,N.triggerFocus)(U.current?.resizableTextArea?.textArea,e)},blur:()=>U.current?.blur(),nativeElement:U.current?.nativeElement||null}));let Y=k("input",r),J=(0,w.default)(Y),[Q,Z]=(0,I.useSharedStyle)(Y,c);W(Y,J);let{compactSize:ee,compactItemClassnames:et}=(0,R.useCompactItemContext)(Y,F),ea=(0,E.default)(e=>i??ee??e),[er,en]=(0,z.default)("textArea",g,n),ei=(0,$.default)(d??L),[el,eo]=a.useState(!1),[es,ed]=a.useState(!1);return a.createElement(h,{autoComplete:M,...H,style:{...K.root,...B,...f},styles:K,disabled:l??q,allowClear:ei,className:(0,o.clsx)(Z,J,p,c,et,P,_.root,{[`${Y}-textarea-affix-wrapper-resize-dirty`]:es}),classNames:{..._,textarea:(0,o.clsx)({[`${Y}-sm`]:"small"===ea,[`${Y}-lg`]:"large"===ea},Q,_.textarea,el&&`${Y}-mouse-active`),variant:(0,o.clsx)({[`${Y}-${er}`]:en},(0,y.getStatusClassNames)(Y,X)),affixWrapper:(0,o.clsx)(`${Y}-textarea-affix-wrapper`,{[`${Y}-affix-wrapper-rtl`]:"rtl"===F,[`${Y}-affix-wrapper-sm`]:"small"===ea,[`${Y}-affix-wrapper-lg`]:"large"===ea,[`${Y}-textarea-show-count`]:x||e.count?.show},Q)},prefixCls:Y,suffix:O&&a.createElement("span",{className:`${Y}-textarea-suffix`},V),showCount:x,ref:U,onResize:e=>{if(A?.(e),el&&"function"==typeof getComputedStyle){let e=U.current?.nativeElement?.querySelector("textarea");e&&"both"===getComputedStyle(e).resize&&ed(!0)}},onMouseDown:e=>{eo(!0),T?.(e);let t=()=>{eo(!1),document.removeEventListener("mouseup",t)};document.addEventListener("mouseup",t)}})});e.s(["default",()=>k],97679)},98826,e=>{"use strict";var t=e.i(353944);e.i(191788);var a=e.i(391398);e.s(["PageLoading",0,({isLoading:e,pastDelay:r,timedOut:n,error:i,retry:l,...o})=>(0,a.jsx)("div",{style:{paddingBlockStart:100,textAlign:"center"},children:(0,a.jsx)(t.Spin,{size:"large",...o})})])},106555,e=>{"use strict";var t=e.i(379049),a=e.i(56206),r=e.i(191788),n=e.i(814432),i=e.i(889590),l=e.i(391398);e.s(["GridContent",0,e=>{let o=(0,r.useContext)(n.RouteContext),{children:s,contentWidth:d,className:u,style:c}=e,{getPrefixCls:p}=(0,r.useContext)(t.ConfigProvider.ConfigContext),f=e.prefixCls||p("pro"),m=d||o.contentWidth,g=`${f}-grid-content`,{wrapSSR:x,hashId:h}=(0,i.useStyle)("ProLayoutGridContent",e=>[{[({...e,componentCls:`.${g}`}).componentCls]:{boxSizing:"border-box",width:"100%","&-wide":{maxWidth:1152,margin:"0 auto"}}}]),$="Fixed"===m&&"top"===o.layout;return x((0,l.jsx)("div",{className:(0,a.clsx)(g,h,u,{[`${g}-wide`]:$}),style:c,"data-testid":"pro-grid-content",children:(0,l.jsx)("div",{className:(0,a.clsx)(`${f}-grid-content-children`,h),children:s})}))}],106555)},132259,e=>{"use strict";var t=e.i(313213);e.s(["Space",()=>t.default])},154165,e=>{"use strict";var t=e.i(934854),a=(e,a={})=>!(0,t.isNonNullable)(e)&&a?.skipEmpty?[]:Array.isArray(e)?e:[e];e.s(["default",()=>a])},360618,e=>{"use strict";var t=e.i(439214);e.s(["PlusOutlined",()=>t.default])},439214,e=>{"use strict";var t=e.i(191788),a={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"},r=e.i(117716);function n(){return(n=Object.assign.bind()).apply(this,arguments)}let i=t.forwardRef((e,i)=>t.createElement(r.default,n({},e,{ref:i,icon:a})));e.s(["default",()=>i],439214)},454895,e=>{"use strict";var t=e.i(267226);e.s(["Tabs",()=>t.default])},636832,325336,222776,108154,782041,e=>{"use strict";var t=e.i(56206),a=e.i(191788);function r(e){return!!(e.addonBefore||e.addonAfter)}function n(e){return!!(e.prefix||e.suffix||e.allowClear)}function i(e,t,a){let r=t.cloneNode(!0),n=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=a,"number"==typeof t.selectionStart&&"number"==typeof t.selectionEnd&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=(...e)=>{t.setSelectionRange(...e)},n}function l(e,t,a,r){if(!a)return;let n=t;"click"===t.type?a(n=i(t,e,"")):"file"!==e.type&&void 0!==r?a(n=i(t,e,r)):a(n)}function o(){return(o=Object.assign.bind()).apply(this,arguments)}e.s(["hasAddon",0,r,"hasPrefixSuffix",0,n,"resolveOnChange",0,l],325336);let s=a.default.forwardRef((e,i)=>{let{inputElement:l,children:s,prefixCls:d,prefix:u,suffix:c,addonBefore:p,addonAfter:f,className:m,style:g,disabled:x,readOnly:h,focused:$,triggerFocus:b,allowClear:y,value:v,handleReset:S,hidden:w,classes:E,classNames:C,dataAttrs:z,styles:R,components:N,onClear:I}=e,T=s??l,A=N?.affixWrapper||"span",H=N?.groupWrapper||"span",W=N?.wrapper||"span",k=N?.groupAddon||"span",F=(0,a.useRef)(null),L=n(e),M=(0,a.cloneElement)(T,{value:v,className:(0,t.clsx)(T.props?.className,!L&&C?.variant)||null}),P=(0,a.useRef)(null);if(a.default.useImperativeHandle(i,()=>({nativeElement:P.current||F.current})),L){let e=null;if(y){let r=!x&&!h&&v,n=`${d}-clear-icon`,i="object"==typeof y&&y?.clearIcon?y.clearIcon:"✖";e=a.default.createElement("button",{type:"button",tabIndex:-1,onClick:e=>{S?.(e),I?.()},onMouseDown:e=>e.preventDefault(),className:(0,t.clsx)(n,{[`${n}-hidden`]:!r,[`${n}-has-suffix`]:!!c})},i)}let r=`${d}-affix-wrapper`,n=(0,t.clsx)(r,{[`${d}-disabled`]:x,[`${r}-disabled`]:x,[`${r}-focused`]:$,[`${r}-readonly`]:h,[`${r}-input-with-clear-btn`]:c&&y&&v},E?.affixWrapper,C?.affixWrapper,C?.variant),i=(c||y)&&a.default.createElement("span",{className:(0,t.clsx)(`${d}-suffix`,C?.suffix),style:R?.suffix},e,c);M=a.default.createElement(A,o({className:n,style:R?.affixWrapper,onClick:e=>{F.current?.contains(e.target)&&b?.()}},z?.affixWrapper,{ref:F}),u&&a.default.createElement("span",{className:(0,t.clsx)(`${d}-prefix`,C?.prefix),style:R?.prefix},u),M,i)}if(r(e)){let e=`${d}-group`,r=`${e}-addon`,n=`${e}-wrapper`,i=(0,t.clsx)(`${d}-wrapper`,e,E?.wrapper,C?.wrapper),l=(0,t.clsx)(n,{[`${n}-disabled`]:x},E?.group,C?.groupWrapper);M=a.default.createElement(H,{className:l,ref:P},a.default.createElement(W,{className:i},p&&a.default.createElement(k,{className:r},p),M,f&&a.default.createElement(k,{className:r},f)))}return a.default.cloneElement(M,{className:(0,t.clsx)(M.props?.className,m)||null,style:{...M.props?.style,...g},hidden:w})});e.s(["default",()=>s],222776);var d=e.i(56926),u=e.i(77682);function c(e,t){return a.useMemo(()=>{let a={};t&&(a.show="object"==typeof t&&t.formatter?t.formatter:!!t);let{show:r,...n}=a={...a,...e};return{...n,show:!!r,showFormatter:"function"==typeof r?r:void 0,strategy:n.strategy||(e=>e.length)}},[e,t])}e.s(["default",0,c],108154);var p=e.i(312744);function f(){return(f=Object.assign.bind()).apply(this,arguments)}let m=(0,a.forwardRef)((e,r)=>{let n,{autoComplete:i,onChange:o,onFocus:m,onBlur:g,onPressEnter:x,onKeyDown:h,onKeyUp:$,prefixCls:b="rc-input",disabled:y,htmlSize:v,className:S,maxLength:w,suffix:E,showCount:C,count:z,type:R="text",classes:N,classNames:I,styles:T,onCompositionStart:A,onCompositionEnd:H,...W}=e,[k,F]=(0,a.useState)(!1),L=(0,a.useRef)(!1),M=(0,a.useRef)(!1),P=(0,a.useRef)(null),B=(0,a.useRef)(null),G=e=>{P.current&&(0,p.triggerFocus)(P.current,e)},[j,q]=(0,d.default)(e.defaultValue,e.value),D=null==j?"":String(j),[O,V]=(0,a.useState)(null),X=c(z,C),_=X.max||w,K=X.strategy(D),U=!!_&&K>_;(0,a.useImperativeHandle)(r,()=>({focus:G,blur:()=>{P.current?.blur()},setSelectionRange:(e,t,a)=>{P.current?.setSelectionRange(e,t,a)},select:()=>{P.current?.select()},input:P.current,nativeElement:B.current?.nativeElement||P.current})),(0,a.useEffect)(()=>{M.current&&(M.current=!1),F(e=>(!e||!y)&&e)},[y]);let Y=(e,t,a)=>{let r=t;if(!L.current&&X.exceedFormatter&&X.max&&X.strategy(t)>X.max)r=X.exceedFormatter(t,{max:X.max}),t!==r&&V([P.current?.selectionStart||0,P.current?.selectionEnd||0]);else if("compositionEnd"===a.source)return;q(r),P.current&&l(P.current,e,o,r)};(0,a.useEffect)(()=>{O&&P.current?.setSelectionRange(...O)},[O]);let J=U&&`${b}-out-of-range`;return a.default.createElement(s,f({},W,{prefixCls:b,className:(0,t.clsx)(S,J),handleReset:e=>{q(""),G(),P.current&&l(P.current,e,o)},value:D,focused:k,triggerFocus:G,suffix:(()=>{let e=Number(_)>0;if(E||X.show){let r=X.showFormatter?X.showFormatter({value:D,count:K,maxLength:_}):`${K}${e?` / ${_}`:""}`;return a.default.createElement(a.default.Fragment,null,X.show&&a.default.createElement("span",{className:(0,t.clsx)(`${b}-show-count-suffix`,{[`${b}-show-count-has-suffix`]:!!E},I?.count),style:{...T?.count}},r),E)}return null})(),disabled:y,classes:N,classNames:I,styles:T,ref:B}),(n=(0,u.default)(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]),a.default.createElement("input",f({autoComplete:i},n,{onChange:e=>{Y(e,e.target.value,{source:"change"})},onFocus:e=>{F(!0),m?.(e)},onBlur:e=>{M.current&&(M.current=!1),F(!1),g?.(e)},onKeyDown:e=>{!x||"Enter"!==e.key||M.current||e.nativeEvent.isComposing||(M.current=!0,x(e)),h?.(e)},onKeyUp:e=>{"Enter"===e.key&&(M.current=!1),$?.(e)},className:(0,t.clsx)(b,{[`${b}-disabled`]:y},I?.input),style:T?.input,ref:P,size:v,type:R,onCompositionStart:e=>{L.current=!0,A?.(e)},onCompositionEnd:e=>{L.current=!1,Y(e,e.currentTarget.value,{source:"compositionEnd"}),H?.(e)}}))))});e.s(["default",()=>m],636832);var g=e.i(876352),x=e.i(934854),h=e=>{let t;return(0,x.isPlainObject)(e)&&e?.clearIcon?t=e:e&&(t={clearIcon:a.default.createElement(g.default,null)}),t};e.s(["default",()=>h],782041)},814432,e=>{"use strict";let t=(0,e.i(191788).createContext)({});e.s(["RouteContext",0,t])},946077,e=>{"use strict";var t=e.i(191788);e.i(957562);var a=e.i(191248),r=e.i(531983),n=e.i(56206),i=e.i(430898),l=e.i(993175),o=e.i(625263),s=e.i(536995),d=e.i(106422),u=e.i(267226),c=({prefixCls:e,className:a,hoverable:r=!0,...i})=>{let{getPrefixCls:o}=t.useContext(l.ConfigContext),s=o("card",e),d=(0,n.clsx)(`${s}-grid`,a,{[`${s}-grid-hoverable`]:r});return t.createElement("div",{...i,className:d})};e.i(290586);var p=e.i(774778),f=e.i(307441),m=e.i(352050),g=e.i(104616),x=(0,m.genStyleHooks)("Card",e=>{let t=(0,g.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:a,cardHeadPadding:r,colorBorderSecondary:n,boxShadowTertiary:i,bodyPadding:l,extraColor:o,motionDurationMid:s}=e;return{[t]:{...(0,f.resetComponent)(e),position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:i},[`${t}-head`]:(e=>{let{antCls:t,componentCls:a,headerHeight:r,headerPadding:n,tabsMarginBottom:i}=e;return{display:"flex",justifyContent:"center",flexDirection:"column",minHeight:r,marginBottom:-1,padding:`0 ${(0,p.unit)(n)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,p.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,p.unit)(e.borderRadiusLG)} ${(0,p.unit)(e.borderRadiusLG)} 0 0`,...(0,f.clearFix)(),"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":{display:"inline-block",flex:1,...f.textEllipsis,[`
> ${a}-typography,
> ${a}-typography-edit-content
`]:{insetInlineStart:0,marginTop:0,marginBottom:0}},[`${t}-tabs-top`]:{clear:"both",marginBottom:i,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,p.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}}})(e),[`${t}-extra`]:{marginInlineStart:"auto",color:o,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:l,borderRadius:`0 0 ${(0,p.unit)(e.borderRadiusLG)} ${(0,p.unit)(e.borderRadiusLG)}`,"&:first-child":{borderStartStartRadius:e.borderRadiusLG,borderStartEndRadius:e.borderRadiusLG},"&:not(:last-child)":{borderEndStartRadius:0,borderEndEndRadius:0}},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:a,cardShadow:r,lineWidth:n}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:`
${(0,p.unit)(n)} 0 0 0 ${a},
0 ${(0,p.unit)(n)} 0 0 ${a},
${(0,p.unit)(n)} ${(0,p.unit)(n)} 0 0 ${a},
${(0,p.unit)(n)} 0 0 0 ${a} inset,
0 ${(0,p.unit)(n)} 0 0 ${a} inset;
`,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:r}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,p.unit)(e.borderRadiusLG)} ${(0,p.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:a,actionsLiMargin:r,cardActionsIconSize:n,colorBorderSecondary:i,actionsBg:l}=e;return{margin:0,padding:0,listStyle:"none",background:l,borderTop:`${(0,p.unit)(e.lineWidth)} ${e.lineType} ${i}`,display:"flex",borderRadius:`0 0 ${(0,p.unit)(e.borderRadiusLG)} ${(0,p.unit)(e.borderRadiusLG)}`,...(0,f.clearFix)(),"& > 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), > ${a}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,p.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${a}`]:{fontSize:n,lineHeight:(0,p.unit)(e.calc(n).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,p.unit)(e.lineWidth)} ${e.lineType} ${i}`}}}})(e),[`${t}-meta`]:{margin:`${(0,p.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex",...(0,f.clearFix)(),"&-avatar":{paddingInlineEnd:e.padding},"&-section":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,...f.textEllipsis},"&-description":{color:e.colorTextDescription}}},[`${t}-bordered`]:{border:`${(0,p.unit)(e.lineWidth)} ${e.lineType} ${n}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:["box-shadow","border-color"].map(e=>`${e} ${s}`).join(", "),"&:hover":{borderColor:"transparent",boxShadow:a}},[`${t}-contain-grid`]:{borderRadius:`${(0,p.unit)(e.borderRadiusLG)} ${(0,p.unit)(e.borderRadiusLG)} 0 0 `,[`&:not(:has(> ${t}-head))`]:{borderRadius: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`]:(e=>{let{componentCls:t,colorFillAlter:a,headerPadding:r,bodyPadding:n}=e;return{[`${t}-head`]:{padding:`0 ${(0,p.unit)(r)}`,background:a,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,p.unit)(e.padding)} ${(0,p.unit)(n)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:a,headerPaddingSM:r,headerHeightSM:n,headerFontSizeSM:i}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:n,padding:`0 ${(0,p.unit)(r)}`,fontSize:i,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:a}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>({headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,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}));let h=e=>{let{actionClasses:a,actions:r=[],actionStyle:n}=e;return t.createElement("ul",{className:a,style:n},r.map((e,a)=>{let n=`action-${a}`;return t.createElement("li",{style:{width:`${100/r.length}%`},key:n},t.createElement("span",null,e))}))},$=t.forwardRef((e,p)=>{let f,{prefixCls:m,className:g,rootClassName:$,style:b,extra:y,headStyle:v={},bodyStyle:S={},title:w,loading:E,bordered:C,variant:z,size:R,type:N,cover:I,actions:T,tabList:A,children:H,activeTabKey:W,defaultActiveTabKey:k,tabBarExtraContent:F,hoverable:L,tabProps:M={},classNames:P,styles:B,...G}=e,{getPrefixCls:j,direction:q,className:D,style:O,classNames:V,styles:X}=(0,l.useComponentConfig)("card"),[_]=(0,s.default)("card",z,C),K=(0,o.default)(R),U={...e,size:K,variant:_},[Y,J]=(0,i.useMergeSemantic)([V,P],[X,B],{props:U}),Q=t.useMemo(()=>(0,r.toArray)(H),[H]),Z=t.useMemo(()=>Q.some(e=>t.isValidElement(e)&&e.type===c),[Q]),ee=j("card",m),[et,ea]=x(ee),er=t.createElement(d.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},H),en=void 0!==W,ei={...M,[en?"activeKey":"defaultActiveKey"]:en?W:k,tabBarExtraContent:F},el=A?t.createElement(u.default,{size:"small"!==K?"large":K,...ei,className:`${ee}-head-tabs`,onChange:t=>{e.onTabChange?.(t)},items:A.map(({tab:e,...t})=>({label:e,...t}))}):null;if(w||y||el){let e=(0,n.clsx)(`${ee}-head`,Y.header),a=(0,n.clsx)(`${ee}-head-title`,Y.title),r=(0,n.clsx)(`${ee}-extra`,Y.extra),i={...v,...J.header};f=t.createElement("div",{className:e,style:i},t.createElement("div",{className:`${ee}-head-wrapper`},w&&t.createElement("div",{className:a,style:J.title},w),y&&t.createElement("div",{className:r,style:J.extra},y)),el)}let eo=(0,n.clsx)(`${ee}-cover`,Y.cover),es=I?t.createElement("div",{className:eo,style:J.cover},I):null,ed=(0,n.clsx)(`${ee}-body`,Y.body),eu={...S,...J.body},ec=E||Q.length?t.createElement("div",{className:ed,style:eu},E?er:H):null,ep=(0,n.clsx)(`${ee}-actions`,Y.actions),ef=T?.length?t.createElement(h,{actionClasses:ep,actionStyle:J.actions,actions:T}):null,em=(0,a.omit)(G,["onTabChange"]),eg=(0,n.clsx)(ee,D,{[`${ee}-loading`]:E,[`${ee}-bordered`]:"borderless"!==_,[`${ee}-hoverable`]:L,[`${ee}-contain-grid`]:Z,[`${ee}-contain-tabs`]:A?.length,[`${ee}-small`]:"small"===K,[`${ee}-type-${N}`]:!!N,[`${ee}-rtl`]:"rtl"===q},g,$,et,ea,Y.root),ex={...J.root,...O,...b};return t.createElement("div",{ref:p,...em,className:eg,style:ex},f,es,ec,ef)});$.Grid=c,$.Meta=e=>{let{prefixCls:a,className:r,avatar:o,title:s,description:d,style:u,classNames:c,styles:p,...f}=e,{getPrefixCls:m,className:g,style:x,classNames:h,styles:$}=(0,l.useComponentConfig)("cardMeta"),b=m("card",a),y=`${b}-meta`,[v,S]=(0,i.useMergeSemantic)([h,c],[$,p],{props:e}),w=(0,n.clsx)(y,r,g,v.root),E={...x,...S.root,...u},C=(0,n.clsx)(`${y}-avatar`,v.avatar),z=(0,n.clsx)(`${y}-title`,v.title),R=(0,n.clsx)(`${y}-description`,v.description),N=(0,n.clsx)(`${y}-section`,v.section),I=o?t.createElement("div",{className:C,style:S.avatar},o):null,T=s?t.createElement("div",{className:z,style:S.title},s):null,A=d?t.createElement("div",{className:R,style:S.description},d):null,H=T||A?t.createElement("div",{className:N,style:S.section},T,A):null;return t.createElement("div",{...f,className:w,style:E},I,H)},e.s(["Card",()=>$],946077)}]);