-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2885.async.js
More file actions
3 lines (3 loc) · 22.2 KB
/
2885.async.js
File metadata and controls
3 lines (3 loc) · 22.2 KB
1
2
3
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2885],{40056:function($e,ae,a){a.d(ae,{Z:function(){return h}});var s=a(67294),ee=a(89739),K=a(4340),R=a(97937),ne=a(21640),F=a(78860),re=a(93967),Q=a.n(re),U=a(29372),G=a(64217),ie=a(42550),k=a(96159),se=a(53124),V=a(11568),ce=a(14747),Y=a(83559);const W=(r,o,l,i,u)=>({background:r,border:`${(0,V.bf)(i.lineWidth)} ${i.lineType} ${o}`,[`${u}-icon`]:{color:l}}),w=r=>{const{componentCls:o,motionDurationSlow:l,marginXS:i,marginSM:u,fontSize:v,fontSizeLG:S,lineHeight:C,borderRadiusLG:O,motionEaseInOutCirc:E,withDescriptionIconSize:B,colorText:Z,colorTextHeading:z,withDescriptionPadding:P,defaultPadding:$}=r;return{[o]:Object.assign(Object.assign({},(0,ce.Wf)(r)),{position:"relative",display:"flex",alignItems:"center",padding:$,wordWrap:"break-word",borderRadius:O,[`&${o}-rtl`]:{direction:"rtl"},[`${o}-content`]:{flex:1,minWidth:0},[`${o}-icon`]:{marginInlineEnd:i,lineHeight:0},"&-description":{display:"none",fontSize:v,lineHeight:C},"&-message":{color:z},[`&${o}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${l} ${E}, opacity ${l} ${E},
padding-top ${l} ${E}, padding-bottom ${l} ${E},
margin-bottom ${l} ${E}`},[`&${o}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${o}-with-description`]:{alignItems:"flex-start",padding:P,[`${o}-icon`]:{marginInlineEnd:u,fontSize:B,lineHeight:0},[`${o}-message`]:{display:"block",marginBottom:i,color:z,fontSize:S},[`${o}-description`]:{display:"block",color:Z}},[`${o}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},j=r=>{const{componentCls:o,colorSuccess:l,colorSuccessBorder:i,colorSuccessBg:u,colorWarning:v,colorWarningBorder:S,colorWarningBg:C,colorError:O,colorErrorBorder:E,colorErrorBg:B,colorInfo:Z,colorInfoBorder:z,colorInfoBg:P}=r;return{[o]:{"&-success":W(u,i,l,r,o),"&-info":W(P,z,Z,r,o),"&-warning":W(C,S,v,r,o),"&-error":Object.assign(Object.assign({},W(B,E,O,r,o)),{[`${o}-description > pre`]:{margin:0,padding:0}})}}},de=r=>{const{componentCls:o,iconCls:l,motionDurationMid:i,marginXS:u,fontSizeIcon:v,colorIcon:S,colorIconHover:C}=r;return{[o]:{"&-action":{marginInlineStart:u},[`${o}-close-icon`]:{marginInlineStart:u,padding:0,overflow:"hidden",fontSize:v,lineHeight:(0,V.bf)(v),backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${l}-close`]:{color:S,transition:`color ${i}`,"&:hover":{color:C}}},"&-close-text":{color:S,transition:`color ${i}`,"&:hover":{color:C}}}}},p=r=>({withDescriptionIconSize:r.fontSizeHeading3,defaultPadding:`${r.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${r.paddingMD}px ${r.paddingContentHorizontalLG}px`});var y=(0,Y.I$)("Alert",r=>[w(r),j(r),de(r)],p),A=function(r,o){var l={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&o.indexOf(i)<0&&(l[i]=r[i]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,i=Object.getOwnPropertySymbols(r);u<i.length;u++)o.indexOf(i[u])<0&&Object.prototype.propertyIsEnumerable.call(r,i[u])&&(l[i[u]]=r[i[u]]);return l};const N={success:ee.Z,info:F.Z,error:K.Z,warning:ne.Z},x=r=>{const{icon:o,prefixCls:l,type:i}=r,u=N[i]||null;return o?(0,k.wm)(o,s.createElement("span",{className:`${l}-icon`},o),()=>({className:Q()(`${l}-icon`,{[o.props.className]:o.props.className})})):s.createElement(u,{className:`${l}-icon`})},H=r=>{const{isClosable:o,prefixCls:l,closeIcon:i,handleClose:u,ariaProps:v}=r,S=i===!0||i===void 0?s.createElement(R.Z,null):i;return o?s.createElement("button",Object.assign({type:"button",onClick:u,className:`${l}-close-icon`,tabIndex:0},v),S):null};var J=s.forwardRef((r,o)=>{const{description:l,prefixCls:i,message:u,banner:v,className:S,rootClassName:C,style:O,onMouseEnter:E,onMouseLeave:B,onClick:Z,afterClose:z,showIcon:P,closable:$,closeText:b,closeIcon:M,action:le,id:T}=r,q=A(r,["description","prefixCls","message","banner","className","rootClassName","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action","id"]),[L,he]=s.useState(!1),me=s.useRef(null);s.useImperativeHandle(o,()=>({nativeElement:me.current}));const{getPrefixCls:fe,direction:ve,alert:f}=s.useContext(se.E_),I=fe("alert",i),[Se,_,pe]=y(I),Ce=D=>{var X;he(!0),(X=r.onClose)===null||X===void 0||X.call(r,D)},ye=s.useMemo(()=>r.type!==void 0?r.type:v?"warning":"info",[r.type,v]),xe=s.useMemo(()=>typeof $=="object"&&$.closeIcon||b?!0:typeof $=="boolean"?$:M!==!1&&M!==null&&M!==void 0?!0:!!(f!=null&&f.closable),[b,M,$,f==null?void 0:f.closable]),be=v&&P===void 0?!0:P,Ee=Q()(I,`${I}-${ye}`,{[`${I}-with-description`]:!!l,[`${I}-no-icon`]:!be,[`${I}-banner`]:!!v,[`${I}-rtl`]:ve==="rtl"},f==null?void 0:f.className,S,C,pe,_),Oe=(0,G.Z)(q,{aria:!0,data:!0}),Pe=s.useMemo(()=>{var D,X;return typeof $=="object"&&$.closeIcon?$.closeIcon:b||(M!==void 0?M:typeof(f==null?void 0:f.closable)=="object"&&(!((D=f==null?void 0:f.closable)===null||D===void 0)&&D.closeIcon)?(X=f==null?void 0:f.closable)===null||X===void 0?void 0:X.closeIcon:f==null?void 0:f.closeIcon)},[M,$,b,f==null?void 0:f.closeIcon]),Me=s.useMemo(()=>{const D=$!=null?$:f==null?void 0:f.closable;if(typeof D=="object"){const{closeIcon:X}=D;return A(D,["closeIcon"])}return{}},[$,f==null?void 0:f.closable]);return Se(s.createElement(U.ZP,{visible:!L,motionName:`${I}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:D=>({maxHeight:D.offsetHeight}),onLeaveEnd:z},(D,X)=>{let{className:Ie,style:Ne}=D;return s.createElement("div",Object.assign({id:T,ref:(0,ie.sQ)(me,X),"data-show":!L,className:Q()(Ee,Ie),style:Object.assign(Object.assign(Object.assign({},f==null?void 0:f.style),O),Ne),onMouseEnter:E,onMouseLeave:B,onClick:Z,role:"alert"},Oe),be?s.createElement(x,{description:l,icon:r.icon,prefixCls:I,type:ye}):null,s.createElement("div",{className:`${I}-content`},u?s.createElement("div",{className:`${I}-message`},u):null,l?s.createElement("div",{className:`${I}-description`},l):null),le?s.createElement("div",{className:`${I}-action`},le):null,s.createElement(H,{isClosable:xe,prefixCls:I,closeIcon:Pe,handleClose:Ce,ariaProps:Me}))}))}),ge=a(15671),te=a(43144),oe=a(61120),t=a(78814),m=a(82963);function e(r,o,l){return o=(0,oe.Z)(o),(0,m.Z)(r,(0,t.Z)()?Reflect.construct(o,l||[],(0,oe.Z)(r).constructor):o.apply(r,l))}var n=a(60136),g=function(r){function o(){var l;return(0,ge.Z)(this,o),l=e(this,o,arguments),l.state={error:void 0,info:{componentStack:""}},l}return(0,n.Z)(o,r),(0,te.Z)(o,[{key:"componentDidCatch",value:function(i,u){this.setState({error:i,info:u})}},{key:"render",value:function(){const{message:i,description:u,id:v,children:S}=this.props,{error:C,info:O}=this.state,E=(O==null?void 0:O.componentStack)||null,B=typeof i=="undefined"?(C||"").toString():i,Z=typeof u=="undefined"?E:u;return C?s.createElement(J,{id:v,type:"error",message:B,description:s.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},Z)}):S}}])}(s.Component);const d=J;d.ErrorBoundary=g;var h=d},85576:function($e,ae,a){a.d(ae,{Z:function(){return de}});var s=a(56080),ee=a(38657),K=a(56745),R=a(67294),ne=a(93967),F=a.n(ne),re=a(40974),Q=a(8745),U=a(53124),G=a(35792),ie=a(32409),k=a(4941),se=a(71194),V=function(p,y){var A={};for(var N in p)Object.prototype.hasOwnProperty.call(p,N)&&y.indexOf(N)<0&&(A[N]=p[N]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var x=0,N=Object.getOwnPropertySymbols(p);x<N.length;x++)y.indexOf(N[x])<0&&Object.prototype.propertyIsEnumerable.call(p,N[x])&&(A[N[x]]=p[N[x]]);return A};const ce=p=>{const{prefixCls:y,className:A,closeIcon:N,closable:x,type:H,title:ue,children:J,footer:ge}=p,te=V(p,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:oe}=R.useContext(U.E_),t=oe(),m=y||oe("modal"),e=(0,G.Z)(t),[n,c,g]=(0,se.ZP)(m,e),d=`${m}-confirm`;let h={};return H?h={closable:x!=null?x:!1,title:"",footer:"",children:R.createElement(ie.O,Object.assign({},p,{prefixCls:m,confirmPrefixCls:d,rootPrefixCls:t,content:J}))}:h={closable:x!=null?x:!0,title:ue,footer:ge!==null&&R.createElement(k.$,Object.assign({},p)),children:J},n(R.createElement(re.s,Object.assign({prefixCls:m,className:F()(c,`${m}-pure-panel`,H&&d,H&&`${d}-${H}`,A,g,e)},te,{closeIcon:(0,k.b)(m,N),closable:x},h)))};var Y=(0,Q.i)(ce),W=a(94423);function w(p){return(0,s.ZP)((0,s.uW)(p))}const j=K.Z;j.useModal=W.Z,j.info=function(y){return(0,s.ZP)((0,s.cw)(y))},j.success=function(y){return(0,s.ZP)((0,s.vq)(y))},j.error=function(y){return(0,s.ZP)((0,s.AQ)(y))},j.warning=w,j.warn=w,j.confirm=function(y){return(0,s.ZP)((0,s.Au)(y))},j.destroyAll=function(){for(;ee.Z.length;){const y=ee.Z.pop();y&&y()}},j.config=s.ai,j._InternalPanelDoNotUseOrYouWillBeFired=Y;var de=j},72269:function($e,ae,a){a.d(ae,{Z:function(){return m}});var s=a(67294),ee=a(50888),K=a(93967),R=a.n(K),ne=a(87462),F=a(4942),re=a(97685),Q=a(45987),U=a(21770),G=a(15105),ie=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],k=s.forwardRef(function(e,n){var c,g=e.prefixCls,d=g===void 0?"rc-switch":g,h=e.className,r=e.checked,o=e.defaultChecked,l=e.disabled,i=e.loadingIcon,u=e.checkedChildren,v=e.unCheckedChildren,S=e.onClick,C=e.onChange,O=e.onKeyDown,E=(0,Q.Z)(e,ie),B=(0,U.Z)(!1,{value:r,defaultValue:o}),Z=(0,re.Z)(B,2),z=Z[0],P=Z[1];function $(T,q){var L=z;return l||(L=T,P(L),C==null||C(L,q)),L}function b(T){T.which===G.Z.LEFT?$(!1,T):T.which===G.Z.RIGHT&&$(!0,T),O==null||O(T)}function M(T){var q=$(!z,T);S==null||S(q,T)}var le=R()(d,h,(c={},(0,F.Z)(c,"".concat(d,"-checked"),z),(0,F.Z)(c,"".concat(d,"-disabled"),l),c));return s.createElement("button",(0,ne.Z)({},E,{type:"button",role:"switch","aria-checked":z,disabled:l,className:le,ref:n,onKeyDown:b,onClick:M}),i,s.createElement("span",{className:"".concat(d,"-inner")},s.createElement("span",{className:"".concat(d,"-inner-checked")},u),s.createElement("span",{className:"".concat(d,"-inner-unchecked")},v)))});k.displayName="Switch";var se=k,V=a(45353),ce=a(53124),Y=a(98866),W=a(98675),w=a(11568),j=a(10274),de=a(14747),p=a(83559),y=a(83262);const A=e=>{const{componentCls:n,trackHeightSM:c,trackPadding:g,trackMinWidthSM:d,innerMinMarginSM:h,innerMaxMarginSM:r,handleSizeSM:o,calc:l}=e,i=`${n}-inner`,u=(0,w.bf)(l(o).add(l(g).mul(2)).equal()),v=(0,w.bf)(l(r).mul(2).equal());return{[n]:{[`&${n}-small`]:{minWidth:d,height:c,lineHeight:(0,w.bf)(c),[`${n}-inner`]:{paddingInlineStart:r,paddingInlineEnd:h,[`${i}-checked, ${i}-unchecked`]:{minHeight:c},[`${i}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${v})`,marginInlineEnd:`calc(100% - ${u} + ${v})`},[`${i}-unchecked`]:{marginTop:l(c).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${n}-handle`]:{width:o,height:o},[`${n}-loading-icon`]:{top:l(l(o).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${n}-checked`]:{[`${n}-inner`]:{paddingInlineStart:h,paddingInlineEnd:r,[`${i}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${i}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${v})`,marginInlineEnd:`calc(-100% + ${u} - ${v})`}},[`${n}-handle`]:{insetInlineStart:`calc(100% - ${(0,w.bf)(l(o).add(g).equal())})`}},[`&:not(${n}-disabled):active`]:{[`&:not(${n}-checked) ${i}`]:{[`${i}-unchecked`]:{marginInlineStart:l(e.marginXXS).div(2).equal(),marginInlineEnd:l(e.marginXXS).mul(-1).div(2).equal()}},[`&${n}-checked ${i}`]:{[`${i}-checked`]:{marginInlineStart:l(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:l(e.marginXXS).div(2).equal()}}}}}}},N=e=>{const{componentCls:n,handleSize:c,calc:g}=e;return{[n]:{[`${n}-loading-icon${e.iconCls}`]:{position:"relative",top:g(g(c).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${n}-checked ${n}-loading-icon`]:{color:e.switchColor}}}},x=e=>{const{componentCls:n,trackPadding:c,handleBg:g,handleShadow:d,handleSize:h,calc:r}=e,o=`${n}-handle`;return{[n]:{[o]:{position:"absolute",top:c,insetInlineStart:c,width:h,height:h,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:g,borderRadius:r(h).div(2).equal(),boxShadow:d,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${n}-checked ${o}`]:{insetInlineStart:`calc(100% - ${(0,w.bf)(r(h).add(c).equal())})`},[`&:not(${n}-disabled):active`]:{[`${o}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${n}-checked ${o}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},H=e=>{const{componentCls:n,trackHeight:c,trackPadding:g,innerMinMargin:d,innerMaxMargin:h,handleSize:r,calc:o}=e,l=`${n}-inner`,i=(0,w.bf)(o(r).add(o(g).mul(2)).equal()),u=(0,w.bf)(o(h).mul(2).equal());return{[n]:{[l]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:h,paddingInlineEnd:d,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${l}-checked, ${l}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:c},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${i} - ${u})`,marginInlineEnd:`calc(100% - ${i} + ${u})`},[`${l}-unchecked`]:{marginTop:o(c).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${n}-checked ${l}`]:{paddingInlineStart:d,paddingInlineEnd:h,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${i} + ${u})`,marginInlineEnd:`calc(-100% + ${i} - ${u})`}},[`&:not(${n}-disabled):active`]:{[`&:not(${n}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:o(g).mul(2).equal(),marginInlineEnd:o(g).mul(-1).mul(2).equal()}},[`&${n}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:o(g).mul(-1).mul(2).equal(),marginInlineEnd:o(g).mul(2).equal()}}}}}},ue=e=>{const{componentCls:n,trackHeight:c,trackMinWidth:g}=e;return{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,de.Wf)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:g,height:c,lineHeight:(0,w.bf)(c),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${n}-disabled)`]:{background:e.colorTextTertiary}}),(0,de.Qy)(e)),{[`&${n}-checked`]:{background:e.switchColor,[`&:hover:not(${n}-disabled)`]:{background:e.colorPrimaryHover}},[`&${n}-loading, &${n}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${n}-rtl`]:{direction:"rtl"}})}},J=e=>{const{fontSize:n,lineHeight:c,controlHeight:g,colorWhite:d}=e,h=n*c,r=g/2,o=2,l=h-o*2,i=r-o*2;return{trackHeight:h,trackHeightSM:r,trackMinWidth:l*2+o*4,trackMinWidthSM:i*2+o*2,trackPadding:o,handleBg:d,handleSize:l,handleSizeSM:i,handleShadow:`0 2px 4px 0 ${new j.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:l/2,innerMaxMargin:l+o+o*2,innerMinMarginSM:i/2,innerMaxMarginSM:i+o+o*2}};var ge=(0,p.I$)("Switch",e=>{const n=(0,y.IX)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[ue(n),H(n),x(n),N(n),A(n)]},J),te=function(e,n){var c={};for(var g in e)Object.prototype.hasOwnProperty.call(e,g)&&n.indexOf(g)<0&&(c[g]=e[g]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,g=Object.getOwnPropertySymbols(e);d<g.length;d++)n.indexOf(g[d])<0&&Object.prototype.propertyIsEnumerable.call(e,g[d])&&(c[g[d]]=e[g[d]]);return c};const t=s.forwardRef((e,n)=>{const{prefixCls:c,size:g,disabled:d,loading:h,className:r,rootClassName:o,style:l,checked:i,value:u,defaultChecked:v,defaultValue:S,onChange:C}=e,O=te(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[E,B]=(0,U.Z)(!1,{value:i!=null?i:u,defaultValue:v!=null?v:S}),{getPrefixCls:Z,direction:z,switch:P}=s.useContext(ce.E_),$=s.useContext(Y.Z),b=(d!=null?d:$)||h,M=Z("switch",c),le=s.createElement("div",{className:`${M}-handle`},h&&s.createElement(ee.Z,{className:`${M}-loading-icon`})),[T,q,L]=ge(M),he=(0,W.Z)(g),me=R()(P==null?void 0:P.className,{[`${M}-small`]:he==="small",[`${M}-loading`]:h,[`${M}-rtl`]:z==="rtl"},r,o,q,L),fe=Object.assign(Object.assign({},P==null?void 0:P.style),l),ve=function(){B(arguments.length<=0?void 0:arguments[0]),C==null||C.apply(void 0,arguments)};return T(s.createElement(V.Z,{component:"Switch"},s.createElement(se,Object.assign({},O,{checked:E,onChange:ve,prefixCls:M,className:me,style:fe,disabled:b,ref:n,loadingIcon:le}))))});t.__ANT_SWITCH=!0;var m=t},66309:function($e,ae,a){a.d(ae,{Z:function(){return oe}});var s=a(67294),ee=a(93967),K=a.n(ee),R=a(98423),ne=a(98787),F=a(69760),re=a(96159),Q=a(45353),U=a(53124),G=a(11568),ie=a(10274),k=a(14747),se=a(83262),V=a(83559);const ce=t=>{const{paddingXXS:m,lineWidth:e,tagPaddingHorizontal:n,componentCls:c,calc:g}=t,d=g(n).sub(e).equal(),h=g(m).sub(e).equal();return{[c]:Object.assign(Object.assign({},(0,k.Wf)(t)),{display:"inline-block",height:"auto",marginInlineEnd:t.marginXS,paddingInline:d,fontSize:t.tagFontSize,lineHeight:t.tagLineHeight,whiteSpace:"nowrap",background:t.defaultBg,border:`${(0,G.bf)(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderRadius:t.borderRadiusSM,opacity:1,transition:`all ${t.motionDurationMid}`,textAlign:"start",position:"relative",[`&${c}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:t.defaultColor},[`${c}-close-icon`]:{marginInlineStart:h,fontSize:t.tagIconSize,color:t.colorTextDescription,cursor:"pointer",transition:`all ${t.motionDurationMid}`,"&:hover":{color:t.colorTextHeading}},[`&${c}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${t.iconCls}-close, ${t.iconCls}-close:hover`]:{color:t.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${c}-checkable-checked):hover`]:{color:t.colorPrimary,backgroundColor:t.colorFillSecondary},"&:active, &-checked":{color:t.colorTextLightSolid},"&-checked":{backgroundColor:t.colorPrimary,"&:hover":{backgroundColor:t.colorPrimaryHover}},"&:active":{backgroundColor:t.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${t.iconCls} + span, > span + ${t.iconCls}`]:{marginInlineStart:d}}),[`${c}-borderless`]:{borderColor:"transparent",background:t.tagBorderlessBg}}},Y=t=>{const{lineWidth:m,fontSizeIcon:e,calc:n}=t,c=t.fontSizeSM;return(0,se.IX)(t,{tagFontSize:c,tagLineHeight:(0,G.bf)(n(t.lineHeightSM).mul(c).equal()),tagIconSize:n(e).sub(n(m).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:t.defaultBg})},W=t=>({defaultBg:new ie.C(t.colorFillQuaternary).onBackground(t.colorBgContainer).toHexString(),defaultColor:t.colorText});var w=(0,V.I$)("Tag",t=>{const m=Y(t);return ce(m)},W),j=function(t,m){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&m.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,n=Object.getOwnPropertySymbols(t);c<n.length;c++)m.indexOf(n[c])<0&&Object.prototype.propertyIsEnumerable.call(t,n[c])&&(e[n[c]]=t[n[c]]);return e},p=s.forwardRef((t,m)=>{const{prefixCls:e,style:n,className:c,checked:g,onChange:d,onClick:h}=t,r=j(t,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:o,tag:l}=s.useContext(U.E_),i=E=>{d==null||d(!g),h==null||h(E)},u=o("tag",e),[v,S,C]=w(u),O=K()(u,`${u}-checkable`,{[`${u}-checkable-checked`]:g},l==null?void 0:l.className,c,S,C);return v(s.createElement("span",Object.assign({},r,{ref:m,style:Object.assign(Object.assign({},n),l==null?void 0:l.style),className:O,onClick:i})))}),y=a(98719);const A=t=>(0,y.Z)(t,(m,e)=>{let{textColor:n,lightBorderColor:c,lightColor:g,darkColor:d}=e;return{[`${t.componentCls}${t.componentCls}-${m}`]:{color:n,background:g,borderColor:c,"&-inverse":{color:t.colorTextLightSolid,background:d,borderColor:d},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}});var N=(0,V.bk)(["Tag","preset"],t=>{const m=Y(t);return A(m)},W);function x(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.slice(1)}const H=(t,m,e)=>{const n=x(e);return{[`${t.componentCls}${t.componentCls}-${m}`]:{color:t[`color${e}`],background:t[`color${n}Bg`],borderColor:t[`color${n}Border`],[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}};var ue=(0,V.bk)(["Tag","status"],t=>{const m=Y(t);return[H(m,"success","Success"),H(m,"processing","Info"),H(m,"error","Error"),H(m,"warning","Warning")]},W),J=function(t,m){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&m.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,n=Object.getOwnPropertySymbols(t);c<n.length;c++)m.indexOf(n[c])<0&&Object.prototype.propertyIsEnumerable.call(t,n[c])&&(e[n[c]]=t[n[c]]);return e};const te=s.forwardRef((t,m)=>{const{prefixCls:e,className:n,rootClassName:c,style:g,children:d,icon:h,color:r,onClose:o,bordered:l=!0,visible:i}=t,u=J(t,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:v,direction:S,tag:C}=s.useContext(U.E_),[O,E]=s.useState(!0),B=(0,R.Z)(u,["closeIcon","closable"]);s.useEffect(()=>{i!==void 0&&E(i)},[i]);const Z=(0,ne.o2)(r),z=(0,ne.yT)(r),P=Z||z,$=Object.assign(Object.assign({backgroundColor:r&&!P?r:void 0},C==null?void 0:C.style),g),b=v("tag",e),[M,le,T]=w(b),q=K()(b,C==null?void 0:C.className,{[`${b}-${r}`]:P,[`${b}-has-color`]:r&&!P,[`${b}-hidden`]:!O,[`${b}-rtl`]:S==="rtl",[`${b}-borderless`]:!l},n,c,le,T),L=I=>{I.stopPropagation(),o==null||o(I),!I.defaultPrevented&&E(!1)},[,he]=(0,F.Z)((0,F.w)(t),(0,F.w)(C),{closable:!1,closeIconRender:I=>{const Se=s.createElement("span",{className:`${b}-close-icon`,onClick:L},I);return(0,re.wm)(I,Se,_=>({onClick:pe=>{var Ce;(Ce=_==null?void 0:_.onClick)===null||Ce===void 0||Ce.call(_,pe),L(pe)},className:K()(_==null?void 0:_.className,`${b}-close-icon`)}))}}),me=typeof u.onClick=="function"||d&&d.type==="a",fe=h||null,ve=fe?s.createElement(s.Fragment,null,fe,d&&s.createElement("span",null,d)):d,f=s.createElement("span",Object.assign({},B,{ref:m,className:q,style:$}),ve,he,Z&&s.createElement(N,{key:"preset",prefixCls:b}),z&&s.createElement(ue,{key:"status",prefixCls:b}));return M(me?s.createElement(Q.Z,{component:"Tag"},f):f)});te.CheckableTag=p;var oe=te}}]);