|
- "use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[899],{64317:function($e,oe,r){var s=r(1413),a=r(91),A=r(22270),B=r(67294),q=r(66758),X=r(80042),J=r(85893),re=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],Q=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],C=function(S,b){var U=S.fieldProps,p=S.children,d=S.params,c=S.proFieldProps,v=S.mode,g=S.valueEnum,F=S.request,V=S.showSearch,E=S.options,w=(0,a.Z)(S,re),G=(0,B.useContext)(q.Z);return(0,J.jsx)(X.Z,(0,s.Z)((0,s.Z)({valueEnum:(0,A.h)(g),request:F,params:d,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,s.Z)({options:E,mode:v,showSearch:V,getPopupContainer:G.getPopupContainer},U),ref:b,proFieldProps:c},w),{},{children:p}))},ae=B.forwardRef(function(z,S){var b=z.fieldProps,U=z.children,p=z.params,d=z.proFieldProps,c=z.mode,v=z.valueEnum,g=z.request,F=z.options,V=(0,a.Z)(z,Q),E=(0,s.Z)({options:F,mode:c||"multiple",labelInValue:!0,showSearch:!0,suffixIcon:null,autoClearSearchValue:!0,optionLabelProp:"label"},b),w=(0,B.useContext)(q.Z);return(0,J.jsx)(X.Z,(0,s.Z)((0,s.Z)({valueEnum:(0,A.h)(v),request:g,params:p,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,s.Z)({getPopupContainer:w.getPopupContainer},E),ref:S,proFieldProps:d},V),{},{children:U}))}),le=B.forwardRef(C),K=ae,D=le;D.SearchSelect=K,D.displayName="ProFormComponent",oe.Z=D},5966:function($e,oe,r){var s=r(97685),a=r(1413),A=r(91),B=r(21770),q=r(8232),X=r(55241),J=r(97435),re=r(67294),Q=r(80042),C=r(85893),ae=["fieldProps","proFieldProps"],le=["fieldProps","proFieldProps"],K="text",D=function(p){var d=p.fieldProps,c=p.proFieldProps,v=(0,A.Z)(p,ae);return(0,C.jsx)(Q.Z,(0,a.Z)({valueType:K,fieldProps:d,filedConfig:{valueType:K},proFieldProps:c},v))},z=function(p){var d=(0,B.Z)(p.open||!1,{value:p.open,onChange:p.onOpenChange}),c=(0,s.Z)(d,2),v=c[0],g=c[1];return(0,C.jsx)(q.Z.Item,{shouldUpdate:!0,noStyle:!0,children:function(V){var E,w=V.getFieldValue(p.name||[]);return(0,C.jsx)(X.Z,(0,a.Z)((0,a.Z)({getPopupContainer:function(T){return T&&T.parentNode?T.parentNode:T},onOpenChange:function(T){return g(T)},content:(0,C.jsxs)("div",{style:{padding:"4px 0"},children:[(E=p.statusRender)===null||E===void 0?void 0:E.call(p,w),p.strengthText?(0,C.jsx)("div",{style:{marginTop:10},children:(0,C.jsx)("span",{children:p.strengthText})}):null]}),overlayStyle:{width:240},placement:"rightTop"},p.popoverProps),{},{open:v,children:p.children}))}})},S=function(p){var d=p.fieldProps,c=p.proFieldProps,v=(0,A.Z)(p,le),g=(0,re.useState)(!1),F=(0,s.Z)(g,2),V=F[0],E=F[1];return d!=null&&d.statusRender&&v.name?(0,C.jsx)(z,{name:v.name,statusRender:d==null?void 0:d.statusRender,popoverProps:d==null?void 0:d.popoverProps,strengthText:d==null?void 0:d.strengthText,open:V,onOpenChange:E,children:(0,C.jsx)("div",{children:(0,C.jsx)(Q.Z,(0,a.Z)({valueType:"password",fieldProps:(0,a.Z)((0,a.Z)({},(0,J.Z)(d,["statusRender","popoverProps","strengthText"])),{},{onBlur:function(G){var T;d==null||(T=d.onBlur)===null||T===void 0||T.call(d,G),E(!1)},onClick:function(G){var T;d==null||(T=d.onClick)===null||T===void 0||T.call(d,G),E(!0)}}),proFieldProps:c,filedConfig:{valueType:K}},v))})}):(0,C.jsx)(Q.Z,(0,a.Z)({valueType:"password",fieldProps:d,proFieldProps:c,filedConfig:{valueType:K}},v))},b=D;b.Password=S,b.displayName="ProFormComponent",oe.Z=b},2236:function($e,oe,r){r.d(oe,{S:function(){return p}});var s=r(1413),a=r(4942),A=r(71002),B=r(91),q=r(12044),X=r(28459),J=r(93967),re=r.n(J),Q=r(97435),C=r(67294),ae=r(73935),le=r(76509),K=r(98082),D=function(c){return(0,a.Z)({},c.componentCls,{position:"fixed",insetInlineEnd:0,bottom:0,zIndex:99,display:"flex",alignItems:"center",width:"100%",paddingInline:24,paddingBlock:0,boxSizing:"border-box",lineHeight:"64px",backgroundColor:(0,K.uK)(c.colorBgElevated,.6),borderBlockStart:"1px solid ".concat(c.colorSplit),"-webkit-backdrop-filter":"blur(8px)",backdropFilter:"blur(8px)",color:c.colorText,transition:"all 0.2s ease 0s","&-left":{flex:1,color:c.colorText},"&-right":{color:c.colorText,"> *":{marginInlineEnd:8,"&:last-child":{marginBlock:0,marginInline:0}}}})};function z(d){return(0,K.Xj)("ProLayoutFooterToolbar",function(c){var v=(0,s.Z)((0,s.Z)({},c),{},{componentCls:".".concat(d)});return[D(v)]})}function S(d,c){var v=c.stylish;return(0,K.Xj)("ProLayoutFooterToolbarStylish",function(g){var F=(0,s.Z)((0,s.Z)({},g),{},{componentCls:".".concat(d)});return v?[(0,a.Z)({},"".concat(F.componentCls),v==null?void 0:v(F))]:[]})}var b=r(85893),U=["children","className","extra","portalDom","style","renderContent"],p=function(c){var v=c.children,g=c.className,F=c.extra,V=c.portalDom,E=V===void 0?!0:V,w=c.style,G=c.renderContent,T=(0,B.Z)(c,U),pe=(0,C.useContext)(X.ZP.ConfigContext),ve=pe.getPrefixCls,n=pe.getTargetContainer,u=c.prefixCls||ve("pro"),m="".concat(u,"-footer-bar"),t=z(m),e=t.wrapSSR,l=t.hashId,o=(0,C.useContext)(le.X),i=(0,C.useMemo)(function(){var j=o.hasSiderMenu,y=o.isMobile,P=o.siderWidth;if(j)return P?y?"100%":"calc(100% - ".concat(P,"px)"):"100%"},[o.collapsed,o.hasSiderMenu,o.isMobile,o.siderWidth]),f=(0,C.useMemo)(function(){return(typeof window=="undefined"?"undefined":(0,A.Z)(window))===void 0||(typeof document=="undefined"?"undefined":(0,A.Z)(document))===void 0?null:(n==null?void 0:n())||document.body},[]),x=S("".concat(m,".").concat(m,"-stylish"),{stylish:c.stylish}),$=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"".concat(m,"-left ").concat(l).trim(),children:F}),(0,b.jsx)("div",{className:"".concat(m,"-right ").concat(l).trim(),children:v})]});(0,C.useEffect)(function(){return!o||!(o!=null&&o.setHasFooterToolbar)?function(){}:(o==null||o.setHasFooterToolbar(!0),function(){var j;o==null||(j=o.setHasFooterToolbar)===null||j===void 0||j.call(o,!1)})},[]);var h=(0,b.jsx)("div",(0,s.Z)((0,s.Z)({className:re()(g,l,m,(0,a.Z)({},"".concat(m,"-stylish"),!!c.stylish)),style:(0,s.Z)({width:i},w)},(0,Q.Z)(T,["prefixCls"])),{},{children:G?G((0,s.Z)((0,s.Z)((0,s.Z)({},c),o),{},{leftWidth:i}),$):$})),I=!(0,q.j)()||!E||!f?h:(0,ae.createPortal)(h,f,m);return x.wrapSSR(e((0,b.jsx)(C.Fragment,{children:I},m)))}},2487:function($e,oe,r){r.d(oe,{Z:function(){return m}});var s=r(74902),a=r(67294),A=r(93967),B=r.n(A),q=r(38780),X=r(74443),J=r(53124),re=r(88258),Q=r(98675),C=r(92820),ae=r(25378),le=r(22564),K=r(74330);const D=a.createContext({}),z=D.Consumer;var S=r(96159),b=r(21584),U=function(t,e){var l={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(l[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(l[o[i]]=t[o[i]]);return l};const p=t=>{var{prefixCls:e,className:l,avatar:o,title:i,description:f}=t,x=U(t,["prefixCls","className","avatar","title","description"]);const{getPrefixCls:$}=(0,a.useContext)(J.E_),h=$("list",e),I=B()(`${h}-item-meta`,l),j=a.createElement("div",{className:`${h}-item-meta-content`},i&&a.createElement("h4",{className:`${h}-item-meta-title`},i),f&&a.createElement("div",{className:`${h}-item-meta-description`},f));return a.createElement("div",Object.assign({},x,{className:I}),o&&a.createElement("div",{className:`${h}-item-meta-avatar`},o),(i||f)&&j)},c=a.forwardRef((t,e)=>{const{prefixCls:l,children:o,actions:i,extra:f,styles:x,className:$,classNames:h,colStyle:I}=t,j=U(t,["prefixCls","children","actions","extra","styles","className","classNames","colStyle"]),{grid:y,itemLayout:P}=(0,a.useContext)(D),{getPrefixCls:ie,list:O}=(0,a.useContext)(J.E_),Y=L=>{var N,k;return B()((k=(N=O==null?void 0:O.item)===null||N===void 0?void 0:N.classNames)===null||k===void 0?void 0:k[L],h==null?void 0:h[L])},se=L=>{var N,k;return Object.assign(Object.assign({},(k=(N=O==null?void 0:O.item)===null||N===void 0?void 0:N.styles)===null||k===void 0?void 0:k[L]),x==null?void 0:x[L])},_=()=>{let L=!1;return a.Children.forEach(o,N=>{typeof N=="string"&&(L=!0)}),L&&a.Children.count(o)>1},ne=()=>P==="vertical"?!!f:!_(),W=ie("list",l),Z=i&&i.length>0&&a.createElement("ul",{className:B()(`${W}-item-action`,Y("actions")),key:"actions",style:se("actions")},i.map((L,N)=>a.createElement("li",{key:`${W}-item-action-${N}`},L,N!==i.length-1&&a.createElement("em",{className:`${W}-item-action-split`})))),me=y?"div":"li",ue=a.createElement(me,Object.assign({},j,y?{}:{ref:e},{className:B()(`${W}-item`,{[`${W}-item-no-flex`]:!ne()},$)}),P==="vertical"&&f?[a.createElement("div",{className:`${W}-item-main`,key:"content"},o,Z),a.createElement("div",{className:B()(`${W}-item-extra`,Y("extra")),key:"extra",style:se("extra")},f)]:[o,Z,(0,S.Tm)(f,{key:"extra"})]);return y?a.createElement(b.Z,{ref:e,flex:1,style:I},ue):ue});c.Meta=p;var v=c,g=r(85088),F=r(14747),V=r(27036),E=r(45503);const w=t=>{const{listBorderedCls:e,componentCls:l,paddingLG:o,margin:i,itemPaddingSM:f,itemPaddingLG:x,marginLG:$,borderRadiusLG:h}=t;return{[`${e}`]:{border:`${(0,g.bf)(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderRadius:h,[`${l}-header,${l}-footer,${l}-item`]:{paddingInline:o},[`${l}-pagination`]:{margin:`${(0,g.bf)(i)} ${(0,g.bf)($)}`}},[`${e}${l}-sm`]:{[`${l}-item,${l}-header,${l}-footer`]:{padding:f}},[`${e}${l}-lg`]:{[`${l}-item,${l}-header,${l}-footer`]:{padding:x}}}},G=t=>{const{componentCls:e,screenSM:l,screenMD:o,marginLG:i,marginSM:f,margin:x}=t;return{[`@media screen and (max-width:${o}px)`]:{[`${e}`]:{[`${e}-item`]:{[`${e}-item-action`]:{marginInlineStart:i}}},[`${e}-vertical`]:{[`${e}-item`]:{[`${e}-item-extra`]:{marginInlineStart:i}}}},[`@media screen and (max-width: ${l}px)`]:{[`${e}`]:{[`${e}-item`]:{flexWrap:"wrap",[`${e}-action`]:{marginInlineStart:f}}},[`${e}-vertical`]:{[`${e}-item`]:{flexWrap:"wrap-reverse",[`${e}-item-main`]:{minWidth:t.contentWidth},[`${e}-item-extra`]:{margin:`auto auto ${(0,g.bf)(x)}`}}}}}},T=t=>{const{componentCls:e,antCls:l,controlHeight:o,minHeight:i,paddingSM:f,marginLG:x,padding:$,itemPadding:h,colorPrimary:I,itemPaddingSM:j,itemPaddingLG:y,paddingXS:P,margin:ie,colorText:O,colorTextDescription:Y,motionDurationSlow:se,lineWidth:_,headerBg:ne,footerBg:W,emptyTextPadding:Z,metaMarginBottom:me,avatarMarginRight:ue,titleMarginBottom:L,descriptionFontSize:N}=t;return{[`${e}`]:Object.assign(Object.assign({},(0,F.Wf)(t)),{position:"relative","*":{outline:"none"},[`${e}-header`]:{background:ne},[`${e}-footer`]:{background:W},[`${e}-header, ${e}-footer`]:{paddingBlock:f},[`${e}-pagination`]:{marginBlockStart:x,[`${l}-pagination-options`]:{textAlign:"start"}},[`${e}-spin`]:{minHeight:i,textAlign:"center"},[`${e}-items`]:{margin:0,padding:0,listStyle:"none"},[`${e}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:h,color:O,[`${e}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${e}-item-meta-avatar`]:{marginInlineEnd:ue},[`${e}-item-meta-content`]:{flex:"1 0",width:0,color:O},[`${e}-item-meta-title`]:{margin:`0 0 ${(0,g.bf)(t.marginXXS)} 0`,color:O,fontSize:t.fontSize,lineHeight:t.lineHeight,"> a":{color:O,transition:`all ${se}`,"&:hover":{color:I}}},[`${e}-item-meta-description`]:{color:Y,fontSize:N,lineHeight:t.lineHeight}},[`${e}-item-action`]:{flex:"0 0 auto",marginInlineStart:t.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${(0,g.bf)(P)}`,color:Y,fontSize:t.fontSize,lineHeight:t.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${e}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:_,height:t.calc(t.fontHeight).sub(t.calc(t.marginXXS).mul(2)).equal(),transform:"translateY(-50%)",backgroundColor:t.colorSplit}}},[`${e}-empty`]:{padding:`${(0,g.bf)($)} 0`,color:Y,fontSize:t.fontSizeSM,textAlign:"center"},[`${e}-empty-text`]:{padding:Z,color:t.colorTextDisabled,fontSize:t.fontSize,textAlign:"center"},[`${e}-item-no-flex`]:{display:"block"}}),[`${e}-grid ${l}-col > ${e}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:ie,paddingBlock:0,borderBlockEnd:"none"},[`${e}-vertical ${e}-item`]:{alignItems:"initial",[`${e}-item-main`]:{display:"block",flex:1},[`${e}-item-extra`]:{marginInlineStart:x},[`${e}-item-meta`]:{marginBlockEnd:me,[`${e}-item-meta-title`]:{marginBlockStart:0,marginBlockEnd:L,color:O,fontSize:t.fontSizeLG,lineHeight:t.lineHeightLG}},[`${e}-item-action`]:{marginBlockStart:$,marginInlineStart:"auto","> li":{padding:`0 ${(0,g.bf)($)}`,"&:first-child":{paddingInlineStart:0}}}},[`${e}-split ${e}-item`]:{borderBlockEnd:`${(0,g.bf)(t.lineWidth)} ${t.lineType} ${t.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${e}-split ${e}-header`]:{borderBlockEnd:`${(0,g.bf)(t.lineWidth)} ${t.lineType} ${t.colorSplit}`},[`${e}-split${e}-empty ${e}-footer`]:{borderTop:`${(0,g.bf)(t.lineWidth)} ${t.lineType} ${t.colorSplit}`},[`${e}-loading ${e}-spin-nested-loading`]:{minHeight:o},[`${e}-split${e}-something-after-last-item ${l}-spin-container > ${e}-items > ${e}-item:last-child`]:{borderBlockEnd:`${(0,g.bf)(t.lineWidth)} ${t.lineType} ${t.colorSplit}`},[`${e}-lg ${e}-item`]:{padding:y},[`${e}-sm ${e}-item`]:{padding:j},[`${e}:not(${e}-vertical)`]:{[`${e}-item-no-flex`]:{[`${e}-item-action`]:{float:"right"}}}}},pe=t=>({contentWidth:220,itemPadding:`${(0,g.bf)(t.paddingContentVertical)} 0`,itemPaddingSM:`${(0,g.bf)(t.paddingContentVerticalSM)} ${(0,g.bf)(t.paddingContentHorizontal)}`,itemPaddingLG:`${(0,g.bf)(t.paddingContentVerticalLG)} ${(0,g.bf)(t.paddingContentHorizontalLG)}`,headerBg:"transparent",footerBg:"transparent",emptyTextPadding:t.padding,metaMarginBottom:t.padding,avatarMarginRight:t.padding,titleMarginBottom:t.paddingSM,descriptionFontSize:t.fontSize});var ve=(0,V.I$)("List",t=>{const e=(0,E.TS)(t,{listBorderedCls:`${t.componentCls}-bordered`,minHeight:t.controlHeightLG});return[T(e),w(e),G(e)]},pe),n=function(t,e){var l={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(l[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(l[o[i]]=t[o[i]]);return l};function u(t){var{pagination:e=!1,prefixCls:l,bordered:o=!1,split:i=!0,className:f,rootClassName:x,style:$,children:h,itemLayout:I,loadMore:j,grid:y,dataSource:P=[],size:ie,header:O,footer:Y,loading:se=!1,rowKey:_,renderItem:ne,locale:W}=t,Z=n(t,["pagination","prefixCls","bordered","split","className","rootClassName","style","children","itemLayout","loadMore","grid","dataSource","size","header","footer","loading","rowKey","renderItem","locale"]);const me=e&&typeof e=="object"?e:{},[ue,L]=a.useState(me.defaultCurrent||1),[N,k]=a.useState(me.defaultPageSize||10),{getPrefixCls:Oe,renderEmpty:he,direction:ye,list:ge}=a.useContext(J.E_),Se={current:1,total:0},ce=M=>(H,te)=>{var je;L(H),k(te),e&&((je=e==null?void 0:e[M])===null||je===void 0||je.call(e,H,te))},Te=ce("onChange"),de=ce("onShowSizeChange"),xe=(M,H)=>{if(!ne)return null;let te;return typeof _=="function"?te=_(M):_?te=M[_]:te=M.key,te||(te=`list-item-${H}`),a.createElement(a.Fragment,{key:te},ne(M,H))},Ce=()=>!!(j||e||Y),R=Oe("list",l),[Fe,Le,De]=ve(R);let fe=se;typeof fe=="boolean"&&(fe={spinning:fe});const Ie=!!(fe!=null&&fe.spinning),We=(0,Q.Z)(ie);let Pe="";switch(We){case"large":Pe="lg";break;case"small":Pe="sm";break;default:break}const Re=B()(R,{[`${R}-vertical`]:I==="vertical",[`${R}-${Pe}`]:Pe,[`${R}-split`]:i,[`${R}-bordered`]:o,[`${R}-loading`]:Ie,[`${R}-grid`]:!!y,[`${R}-something-after-last-item`]:Ce(),[`${R}-rtl`]:ye==="rtl"},ge==null?void 0:ge.className,f,x,Le,De),ee=(0,q.Z)(Se,{total:P.length,current:ue,pageSize:N},e||{}),Ze=Math.ceil(ee.total/ee.pageSize);ee.current>Ze&&(ee.current=Ze);const Ne=e&&a.createElement("div",{className:B()(`${R}-pagination`)},a.createElement(le.Z,Object.assign({align:"end"},ee,{onChange:Te,onShowSizeChange:de})));let Me=(0,s.Z)(P);e&&P.length>(ee.current-1)*ee.pageSize&&(Me=(0,s.Z)(P).splice((ee.current-1)*ee.pageSize,ee.pageSize));const He=Object.keys(y||{}).some(M=>["xs","sm","md","lg","xl","xxl"].includes(M)),ze=(0,ae.Z)(He),be=a.useMemo(()=>{for(let M=0;M<X.c4.length;M+=1){const H=X.c4[M];if(ze[H])return H}},[ze]),Ae=a.useMemo(()=>{if(!y)return;const M=be&&y[be]?y[be]:y.column;if(M)return{width:`${100/M}%`,maxWidth:`${100/M}%`}},[JSON.stringify(y),be]);let Be=Ie&&a.createElement("div",{style:{minHeight:53}});if(Me.length>0){const M=Me.map((H,te)=>xe(H,te));Be=y?a.createElement(C.Z,{gutter:y.gutter},a.Children.map(M,H=>a.createElement("div",{key:H==null?void 0:H.key,style:Ae},H))):a.createElement("ul",{className:`${R}-items`},M)}else!h&&!Ie&&(Be=a.createElement("div",{className:`${R}-empty-text`},(W==null?void 0:W.emptyText)||(he==null?void 0:he("List"))||a.createElement(re.Z,{componentName:"List"})));const Ee=ee.position||"bottom",Ke=a.useMemo(()=>({grid:y,itemLayout:I}),[JSON.stringify(y),I]);return Fe(a.createElement(D.Provider,{value:Ke},a.createElement("div",Object.assign({style:Object.assign(Object.assign({},ge==null?void 0:ge.style),$),className:Re},Z),(Ee==="top"||Ee==="both")&&Ne,O&&a.createElement("div",{className:`${R}-header`},O),a.createElement(K.Z,Object.assign({},fe),Be,h),Y&&a.createElement("div",{className:`${R}-footer`},Y),j||(Ee==="bottom"||Ee==="both")&&Ne)))}u.Item=v;var m=u},66309:function($e,oe,r){r.d(oe,{Z:function(){return ve}});var s=r(67294),a=r(93967),A=r.n(a),B=r(98423),q=r(98787),X=r(69760),J=r(96159),re=r(45353),Q=r(53124),C=r(85088),ae=r(10274),le=r(14747),K=r(45503),D=r(27036);const z=n=>{const{paddingXXS:u,lineWidth:m,tagPaddingHorizontal:t,componentCls:e,calc:l}=n,o=l(t).sub(m).equal(),i=l(u).sub(m).equal();return{[e]:Object.assign(Object.assign({},(0,le.Wf)(n)),{display:"inline-block",height:"auto",marginInlineEnd:n.marginXS,paddingInline:o,fontSize:n.tagFontSize,lineHeight:n.tagLineHeight,whiteSpace:"nowrap",background:n.defaultBg,border:`${(0,C.bf)(n.lineWidth)} ${n.lineType} ${n.colorBorder}`,borderRadius:n.borderRadiusSM,opacity:1,transition:`all ${n.motionDurationMid}`,textAlign:"start",position:"relative",[`&${e}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:n.defaultColor},[`${e}-close-icon`]:{marginInlineStart:i,fontSize:n.tagIconSize,color:n.colorTextDescription,cursor:"pointer",transition:`all ${n.motionDurationMid}`,"&:hover":{color:n.colorTextHeading}},[`&${e}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${n.iconCls}-close, ${n.iconCls}-close:hover`]:{color:n.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${e}-checkable-checked):hover`]:{color:n.colorPrimary,backgroundColor:n.colorFillSecondary},"&:active, &-checked":{color:n.colorTextLightSolid},"&-checked":{backgroundColor:n.colorPrimary,"&:hover":{backgroundColor:n.colorPrimaryHover}},"&:active":{backgroundColor:n.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${n.iconCls} + span, > span + ${n.iconCls}`]:{marginInlineStart:o}}),[`${e}-borderless`]:{borderColor:"transparent",background:n.tagBorderlessBg}}},S=n=>{const{lineWidth:u,fontSizeIcon:m,calc:t}=n,e=n.fontSizeSM;return(0,K.TS)(n,{tagFontSize:e,tagLineHeight:(0,C.bf)(t(n.lineHeightSM).mul(e).equal()),tagIconSize:t(m).sub(t(u).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:n.defaultBg})},b=n=>({defaultBg:new ae.C(n.colorFillQuaternary).onBackground(n.colorBgContainer).toHexString(),defaultColor:n.colorText});var U=(0,D.I$)("Tag",n=>{const u=S(n);return z(u)},b),p=function(n,u){var m={};for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&u.indexOf(t)<0&&(m[t]=n[t]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var e=0,t=Object.getOwnPropertySymbols(n);e<t.length;e++)u.indexOf(t[e])<0&&Object.prototype.propertyIsEnumerable.call(n,t[e])&&(m[t[e]]=n[t[e]]);return m},c=s.forwardRef((n,u)=>{const{prefixCls:m,style:t,className:e,checked:l,onChange:o,onClick:i}=n,f=p(n,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:x,tag:$}=s.useContext(Q.E_),h=O=>{o==null||o(!l),i==null||i(O)},I=x("tag",m),[j,y,P]=U(I),ie=A()(I,`${I}-checkable`,{[`${I}-checkable-checked`]:l},$==null?void 0:$.className,e,y,P);return j(s.createElement("span",Object.assign({},f,{ref:u,style:Object.assign(Object.assign({},t),$==null?void 0:$.style),className:ie,onClick:h})))}),v=r(98719);const g=n=>(0,v.Z)(n,(u,m)=>{let{textColor:t,lightBorderColor:e,lightColor:l,darkColor:o}=m;return{[`${n.componentCls}${n.componentCls}-${u}`]:{color:t,background:l,borderColor:e,"&-inverse":{color:n.colorTextLightSolid,background:o,borderColor:o},[`&${n.componentCls}-borderless`]:{borderColor:"transparent"}}}});var F=(0,D.bk)(["Tag","preset"],n=>{const u=S(n);return g(u)},b);function V(n){return typeof n!="string"?n:n.charAt(0).toUpperCase()+n.slice(1)}const E=(n,u,m)=>{const t=V(m);return{[`${n.componentCls}${n.componentCls}-${u}`]:{color:n[`color${m}`],background:n[`color${t}Bg`],borderColor:n[`color${t}Border`],[`&${n.componentCls}-borderless`]:{borderColor:"transparent"}}}};var w=(0,D.bk)(["Tag","status"],n=>{const u=S(n);return[E(u,"success","Success"),E(u,"processing","Info"),E(u,"error","Error"),E(u,"warning","Warning")]},b),G=function(n,u){var m={};for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&u.indexOf(t)<0&&(m[t]=n[t]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var e=0,t=Object.getOwnPropertySymbols(n);e<t.length;e++)u.indexOf(t[e])<0&&Object.prototype.propertyIsEnumerable.call(n,t[e])&&(m[t[e]]=n[t[e]]);return m};const pe=s.forwardRef((n,u)=>{const{prefixCls:m,className:t,rootClassName:e,style:l,children:o,icon:i,color:f,onClose:x,bordered:$=!0,visible:h}=n,I=G(n,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:j,direction:y,tag:P}=s.useContext(Q.E_),[ie,O]=s.useState(!0),Y=(0,B.Z)(I,["closeIcon","closable"]);s.useEffect(()=>{h!==void 0&&O(h)},[h]);const se=(0,q.o2)(f),_=(0,q.yT)(f),ne=se||_,W=Object.assign(Object.assign({backgroundColor:f&&!ne?f:void 0},P==null?void 0:P.style),l),Z=j("tag",m),[me,ue,L]=U(Z),N=A()(Z,P==null?void 0:P.className,{[`${Z}-${f}`]:ne,[`${Z}-has-color`]:f&&!ne,[`${Z}-hidden`]:!ie,[`${Z}-rtl`]:y==="rtl",[`${Z}-borderless`]:!$},t,e,ue,L),k=ce=>{ce.stopPropagation(),x==null||x(ce),!ce.defaultPrevented&&O(!1)},[,Oe]=(0,X.Z)((0,X.w)(n),(0,X.w)(P),{closable:!1,closeIconRender:ce=>{const Te=s.createElement("span",{className:`${Z}-close-icon`,onClick:k},ce);return(0,J.wm)(ce,Te,de=>({onClick:xe=>{var Ce;(Ce=de==null?void 0:de.onClick)===null||Ce===void 0||Ce.call(de,xe),k(xe)},className:A()(de==null?void 0:de.className,`${Z}-close-icon`)}))}}),he=typeof I.onClick=="function"||o&&o.type==="a",ye=i||null,ge=ye?s.createElement(s.Fragment,null,ye,o&&s.createElement("span",null,o)):o,Se=s.createElement("span",Object.assign({},Y,{ref:u,className:N,style:W}),ge,Oe,se&&s.createElement(F,{key:"preset",prefixCls:Z}),_&&s.createElement(w,{key:"status",prefixCls:Z}));return me(he?s.createElement(re.Z,{component:"Tag"},Se):Se)});pe.CheckableTag=c;var ve=pe}}]);
|