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.
1 line
24 KiB
1 line
24 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[41901,36381],{52103:function(e,n,t){t.d(n,{Z:function(){return c}});var o=t(5891),r=t(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"},i=t(22589),l=function(e,n){return r.createElement(i.Z,(0,o.Z)({},e,{ref:n,icon:a}))};var c=r.forwardRef(l)},45532:function(e,n,t){t.d(n,{Z:function(){return c}});var o=t(5891),r=t(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"},i=t(22589),l=function(e,n){return r.createElement(i.Z,(0,o.Z)({},e,{ref:n,icon:a}))};var c=r.forwardRef(l)},36381:function(e,n,t){t.d(n,{Z:function(){return F}});var o=t(14988),r=t(92310),a=t.n(r),i=t(5891),l=t(26390),c=t(29043),s=t(80665),d=t(71366),p=t(85870),g=t(59301),u=t(19149),h=t(75440),m=t(80962),b=t(43167),f=t(20287),$=g.forwardRef((function(e,n){var t=e.prefixCls,o=e.forceRender,r=e.className,i=e.style,l=e.children,s=e.isActive,d=e.role,p=g.useState(s||o),u=(0,c.Z)(p,2),h=u[0],b=u[1];return g.useEffect((function(){(o||s)&&b(!0)}),[o,s]),h?g.createElement("div",{ref:n,className:a()("".concat(t,"-content"),(0,m.Z)((0,m.Z)({},"".concat(t,"-content-active"),s),"".concat(t,"-content-inactive"),!s),r),style:i,role:d},g.createElement("div",{className:"".concat(t,"-content-box")},l)):null}));$.displayName="PanelContent";var v=$,C=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],x=g.forwardRef((function(e,n){var t=e.showArrow,o=void 0===t||t,r=e.headerClass,l=e.isActive,c=e.onItemClick,s=e.forceRender,d=e.className,p=e.prefixCls,h=e.collapsible,$=e.accordion,x=e.panelKey,y=e.extra,k=e.header,S=e.expandIcon,I=e.openMotion,w=e.destroyInactivePanel,E=e.children,O=(0,u.Z)(e,C),M="disabled"===h,Z="header"===h,N="icon"===h,P=null!=y&&"boolean"!=typeof y,j=function(){null==c||c(x)},z="function"==typeof S?S(e):g.createElement("i",{className:"arrow"});z&&(z=g.createElement("div",{className:"".concat(p,"-expand-icon"),onClick:["header","icon"].includes(h)?j:void 0},z));var T=a()((0,m.Z)((0,m.Z)((0,m.Z)({},"".concat(p,"-item"),!0),"".concat(p,"-item-active"),l),"".concat(p,"-item-disabled"),M),d),H={className:a()(r,(0,m.Z)((0,m.Z)((0,m.Z)({},"".concat(p,"-header"),!0),"".concat(p,"-header-collapsible-only"),Z),"".concat(p,"-icon-collapsible-only"),N)),"aria-expanded":l,"aria-disabled":M,onKeyDown:function(e){"Enter"!==e.key&&e.keyCode!==f.Z.ENTER&&e.which!==f.Z.ENTER||j()}};return Z||N||(H.onClick=j,H.role=$?"tab":"button",H.tabIndex=M?-1:0),g.createElement("div",(0,i.Z)({},O,{ref:n,className:T}),g.createElement("div",H,o&&z,g.createElement("span",{className:"".concat(p,"-header-text"),onClick:"header"===h?j:void 0},k),P&&g.createElement("div",{className:"".concat(p,"-extra")},y)),g.createElement(b.default,(0,i.Z)({visible:l,leavedClassName:"".concat(p,"-content-hidden")},I,{forceRender:s,removeOnLeave:w}),(function(e,n){var t=e.className,o=e.style;return g.createElement(v,{ref:n,prefixCls:p,className:t,style:o,isActive:l,forceRender:s,role:$?"tabpanel":void 0},E)})))})),y=["children","label","key","collapsible","onItemClick","destroyInactivePanel"];var k=function(e,n,t){return Array.isArray(e)?function(e,n){var t=n.prefixCls,o=n.accordion,r=n.collapsible,a=n.destroyInactivePanel,l=n.onItemClick,c=n.activeKey,s=n.openMotion,d=n.expandIcon;return e.map((function(e,n){var p=e.children,h=e.label,m=e.key,b=e.collapsible,f=e.onItemClick,$=e.destroyInactivePanel,v=(0,u.Z)(e,y),C=String(null!=m?m:n),k=null!=b?b:r,S=null!=$?$:a,I=!1;return I=o?c[0]===C:c.indexOf(C)>-1,g.createElement(x,(0,i.Z)({},v,{prefixCls:t,key:C,panelKey:C,isActive:I,accordion:o,openMotion:s,expandIcon:d,header:h,collapsible:k,onItemClick:function(e){"disabled"!==k&&(l(e),null==f||f(e))},destroyInactivePanel:S}),p)}))}(e,t):(0,h.Z)(n).map((function(e,n){return function(e,n,t){if(!e)return null;var o=t.prefixCls,r=t.accordion,a=t.collapsible,i=t.destroyInactivePanel,l=t.onItemClick,c=t.activeKey,s=t.openMotion,d=t.expandIcon,p=e.key||String(n),u=e.props,h=u.header,m=u.headerClass,b=u.destroyInactivePanel,f=u.collapsible,$=u.onItemClick,v=!1;v=r?c[0]===p:c.indexOf(p)>-1;var C=null!=f?f:a,x={key:p,panelKey:p,header:h,headerClass:m,isActive:v,prefixCls:o,destroyInactivePanel:null!=b?b:i,openMotion:s,accordion:r,children:e.props.children,onItemClick:function(e){"disabled"!==C&&(l(e),null==$||$(e))},expandIcon:d,collapsible:C};return"string"==typeof e.type?e:(Object.keys(x).forEach((function(e){void 0===x[e]&&delete x[e]})),g.cloneElement(e,x))}(e,n,t)}))},S=t(47413);function I(e){var n=e;if(!Array.isArray(n)){var t=(0,s.Z)(n);n="number"===t||"string"===t?[n]:[]}return n.map((function(e){return String(e)}))}var w=g.forwardRef((function(e,n){var t=e.prefixCls,o=void 0===t?"rc-collapse":t,r=e.destroyInactivePanel,s=void 0!==r&&r,u=e.style,h=e.accordion,m=e.className,b=e.children,f=e.collapsible,$=e.openMotion,v=e.expandIcon,C=e.activeKey,x=e.defaultActiveKey,y=e.onChange,w=e.items,E=a()(o,m),O=(0,d.Z)([],{value:C,onChange:function(e){return null==y?void 0:y(e)},defaultValue:x,postState:I}),M=(0,c.Z)(O,2),Z=M[0],N=M[1];(0,p.ZP)(!b,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var P=k(w,b,{prefixCls:o,accordion:h,openMotion:$,expandIcon:v,collapsible:f,destroyInactivePanel:s,onItemClick:function(e){return N((function(){return h?Z[0]===e?[]:[e]:Z.indexOf(e)>-1?Z.filter((function(n){return n!==e})):[].concat((0,l.Z)(Z),[e])}))},activeKey:Z});return g.createElement("div",(0,i.Z)({ref:n,className:E,style:u,role:h?"tablist":void 0},(0,S.Z)(e,{aria:!0,data:!0})),P)})),E=Object.assign(w,{Panel:x}),O=E,M=(E.Panel,t(55405)),Z=t(62892),N=t(92343),P=t(36355),j=t(19716);var z=g.forwardRef(((e,n)=>{const{getPrefixCls:t}=g.useContext(P.E_),{prefixCls:o,className:r,showArrow:i=!0}=e,l=t("collapse",o),c=a()({[`${l}-no-arrow`]:!i},r);return g.createElement(O.Panel,Object.assign({ref:n},e,{prefixCls:l,className:c}))})),T=t(17313),H=t(8378),R=t(83116),B=t(37613);const A=e=>{const{componentCls:n,contentBg:t,padding:o,headerBg:r,headerPadding:a,collapseHeaderPaddingSM:i,collapseHeaderPaddingLG:l,collapsePanelBorderRadius:c,lineWidth:s,lineType:d,colorBorder:p,colorText:g,colorTextHeading:u,colorTextDisabled:h,fontSize:m,fontSizeLG:b,lineHeight:f,marginSM:$,paddingSM:v,paddingLG:C,paddingXS:x,motionDurationSlow:y,fontSizeIcon:k,contentPadding:S}=e,I=`${s}px ${d} ${p}`;return{[n]:Object.assign(Object.assign({},(0,T.Wf)(e)),{backgroundColor:r,border:I,borderBottom:0,borderRadius:`${c}px`,"&-rtl":{direction:"rtl"},[`& > ${n}-item`]:{borderBottom:I,"&:last-child":{[`\n &,\n & > ${n}-header`]:{borderRadius:`0 0 ${c}px ${c}px`}},[`> ${n}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:a,color:u,lineHeight:f,cursor:"pointer",transition:`all ${y}, visibility 0s`,[`> ${n}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${n}-expand-icon`]:{height:m*f,display:"flex",alignItems:"center",paddingInlineEnd:$},[`${n}-arrow`]:Object.assign(Object.assign({},(0,T.Ro)()),{fontSize:k,svg:{transition:`transform ${y}`}}),[`${n}-header-text`]:{marginInlineEnd:"auto"}},[`${n}-header-collapsible-only`]:{cursor:"default",[`${n}-header-text`]:{flex:"none",cursor:"pointer"}},[`${n}-icon-collapsible-only`]:{cursor:"default",[`${n}-expand-icon`]:{cursor:"pointer"}}},[`${n}-content`]:{color:g,backgroundColor:t,borderTop:I,[`& > ${n}-content-box`]:{padding:S},"&-hidden":{display:"none"}},"&-small":{[`> ${n}-item`]:{[`> ${n}-header`]:{padding:i,paddingInlineStart:x,[`> ${n}-expand-icon`]:{marginInlineStart:v-x}},[`> ${n}-content > ${n}-content-box`]:{padding:v}}},"&-large":{[`> ${n}-item`]:{fontSize:b,[`> ${n}-header`]:{padding:l,paddingInlineStart:o,[`> ${n}-expand-icon`]:{height:b*f,marginInlineStart:C-o}},[`> ${n}-content > ${n}-content-box`]:{padding:C}}},[`${n}-item:last-child`]:{[`> ${n}-content`]:{borderRadius:`0 0 ${c}px ${c}px`}},[`& ${n}-item-disabled > ${n}-header`]:{"\n &,\n & > .arrow\n ":{color:h,cursor:"not-allowed"}},[`&${n}-icon-position-end`]:{[`& > ${n}-item`]:{[`> ${n}-header`]:{[`${n}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:$}}}}})}},L=e=>{const{componentCls:n}=e;return{[`${n}-rtl`]:{[`> ${n}-item > ${n}-header ${n}-arrow svg`]:{transform:"rotate(180deg)"}}}},D=e=>{const{componentCls:n,headerBg:t,paddingXXS:o,colorBorder:r}=e;return{[`${n}-borderless`]:{backgroundColor:t,border:0,[`> ${n}-item`]:{borderBottom:`1px solid ${r}`},[`\n > ${n}-item:last-child,\n > ${n}-item:last-child ${n}-header\n `]:{borderRadius:0},[`> ${n}-item:last-child`]:{borderBottom:0},[`> ${n}-item > ${n}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${n}-item > ${n}-content > ${n}-content-box`]:{paddingTop:o}}}},W=e=>{const{componentCls:n,paddingSM:t}=e;return{[`${n}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${n}-item`]:{borderBottom:0,[`> ${n}-content`]:{backgroundColor:"transparent",border:0,[`> ${n}-content-box`]:{paddingBlock:t}}}}}};var X=(0,R.Z)("Collapse",(e=>{const n=(0,B.TS)(e,{collapseHeaderPaddingSM:`${e.paddingXS}px ${e.paddingSM}px`,collapseHeaderPaddingLG:`${e.padding}px ${e.paddingLG}px`,collapsePanelBorderRadius:e.borderRadiusLG});return[A(n),D(n),W(n),L(n),(0,H.Z)(n)]}),(e=>({headerPadding:`${e.paddingSM}px ${e.padding}px`,headerBg:e.colorFillAlter,contentPadding:`${e.padding}px 16px`,contentBg:e.colorBgContainer})));const K=g.forwardRef(((e,n)=>{const{getPrefixCls:t,direction:r,collapse:i}=g.useContext(P.E_),{prefixCls:l,className:c,rootClassName:s,style:d,bordered:p=!0,ghost:u,size:m,expandIconPosition:b="start",children:f,expandIcon:$}=e,v=(0,j.Z)((e=>{var n;return null!==(n=null!=m?m:e)&&void 0!==n?n:"middle"})),C=t("collapse",l),x=t(),[y,k]=X(C),S=g.useMemo((()=>"left"===b?"start":"right"===b?"end":b),[b]),I=a()(`${C}-icon-position-${S}`,{[`${C}-borderless`]:!p,[`${C}-rtl`]:"rtl"===r,[`${C}-ghost`]:!!u,[`${C}-${v}`]:"middle"!==v},null==i?void 0:i.className,c,s,k),w=Object.assign(Object.assign({},(0,Z.Z)(x)),{motionAppear:!1,leavedClassName:`${C}-content-hidden`}),E=g.useMemo((()=>f?(0,h.Z)(f).map(((e,n)=>{var t,o;if(null===(t=e.props)||void 0===t?void 0:t.disabled){const t=null!==(o=e.key)&&void 0!==o?o:String(n),{disabled:r,collapsible:a}=e.props,i=Object.assign(Object.assign({},(0,M.Z)(e.props,["disabled"])),{key:t,collapsible:null!=a?a:r?"disabled":void 0});return(0,N.Tm)(e,i)}return e})):null),[f]);return y(g.createElement(O,Object.assign({ref:n,openMotion:w},(0,M.Z)(e,["rootClassName"]),{expandIcon:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=$?$(e):g.createElement(o.Z,{rotate:e.isActive?90:void 0});return(0,N.Tm)(n,(()=>({className:a()(n.props.className,`${C}-arrow`)})))},prefixCls:C,className:I,style:Object.assign(Object.assign({},null==i?void 0:i.style),d)}),E))}));var F=Object.assign(K,{Panel:z})},78673:function(e,n,t){t.d(n,{Z:function(){return P}});var o=t(42141),r=t(92310),a=t.n(r),i=t(5891),l=t(80962),c=t(29043),s=t(19149),d=t(59301),p=t(71366),g=t(20287),u=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],h=d.forwardRef((function(e,n){var t,o=e.prefixCls,r=void 0===o?"rc-switch":o,h=e.className,m=e.checked,b=e.defaultChecked,f=e.disabled,$=e.loadingIcon,v=e.checkedChildren,C=e.unCheckedChildren,x=e.onClick,y=e.onChange,k=e.onKeyDown,S=(0,s.Z)(e,u),I=(0,p.Z)(!1,{value:m,defaultValue:b}),w=(0,c.Z)(I,2),E=w[0],O=w[1];function M(e,n){var t=E;return f||(O(t=e),null==y||y(t,n)),t}var Z=a()(r,h,(t={},(0,l.Z)(t,"".concat(r,"-checked"),E),(0,l.Z)(t,"".concat(r,"-disabled"),f),t));return d.createElement("button",(0,i.Z)({},S,{type:"button",role:"switch","aria-checked":E,disabled:f,className:Z,ref:n,onKeyDown:function(e){e.which===g.Z.LEFT?M(!1,e):e.which===g.Z.RIGHT&&M(!0,e),null==k||k(e)},onClick:function(e){var n=M(!E,e);null==x||x(n,e)}}),$,d.createElement("span",{className:"".concat(r,"-inner")},d.createElement("span",{className:"".concat(r,"-inner-checked")},v),d.createElement("span",{className:"".concat(r,"-inner-unchecked")},C)))}));h.displayName="Switch";var m=h,b=t(14088),f=t(36355),$=t(1684),v=t(19716),C=t(64993),x=t(17313),y=t(83116),k=t(37613);const S=e=>{const{componentCls:n,trackHeightSM:t,trackPadding:o,trackMinWidthSM:r,innerMinMarginSM:a,innerMaxMarginSM:i,handleSizeSM:l}=e,c=`${n}-inner`;return{[n]:{[`&${n}-small`]:{minWidth:r,height:t,lineHeight:`${t}px`,[`${n}-inner`]:{paddingInlineStart:i,paddingInlineEnd:a,[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${l+2*o}px - ${2*i}px)`,marginInlineEnd:`calc(100% - ${l+2*o}px + ${2*i}px)`},[`${c}-unchecked`]:{marginTop:-t,marginInlineStart:0,marginInlineEnd:0}},[`${n}-handle`]:{width:l,height:l},[`${n}-loading-icon`]:{top:(l-e.switchLoadingIconSize)/2,fontSize:e.switchLoadingIconSize},[`&${n}-checked`]:{[`${n}-inner`]:{paddingInlineStart:a,paddingInlineEnd:i,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${l+2*o}px + ${2*i}px)`,marginInlineEnd:`calc(-100% + ${l+2*o}px - ${2*i}px)`}},[`${n}-handle`]:{insetInlineStart:`calc(100% - ${l+o}px)`}},[`&:not(${n}-disabled):active`]:{[`&:not(${n}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:e.marginXXS/2,marginInlineEnd:-e.marginXXS/2}},[`&${n}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:-e.marginXXS/2,marginInlineEnd:e.marginXXS/2}}}}}}},I=e=>{const{componentCls:n,handleSize:t}=e;return{[n]:{[`${n}-loading-icon${e.iconCls}`]:{position:"relative",top:(t-e.fontSize)/2,color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${n}-checked ${n}-loading-icon`]:{color:e.switchColor}}}},w=e=>{const{componentCls:n,motion:t,trackPadding:o,handleBg:r,handleShadow:a,handleSize:i}=e,l=`${n}-handle`;return{[n]:{[l]:{position:"absolute",top:o,insetInlineStart:o,width:i,height:i,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:i/2,boxShadow:a,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${n}-checked ${l}`]:{insetInlineStart:`calc(100% - ${i+o}px)`},[`&:not(${n}-disabled):active`]:t?{[`${l}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${n}-checked ${l}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}:{}}}},E=e=>{const{componentCls:n,trackHeight:t,trackPadding:o,innerMinMargin:r,innerMaxMargin:a,handleSize:i}=e,l=`${n}-inner`;return{[n]:{[l]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:a,paddingInlineEnd:r,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"},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${i+2*o}px - ${2*a}px)`,marginInlineEnd:`calc(100% - ${i+2*o}px + ${2*a}px)`},[`${l}-unchecked`]:{marginTop:-t,marginInlineStart:0,marginInlineEnd:0}},[`&${n}-checked ${l}`]:{paddingInlineStart:r,paddingInlineEnd:a,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${i+2*o}px + ${2*a}px)`,marginInlineEnd:`calc(-100% + ${i+2*o}px - ${2*a}px)`}},[`&:not(${n}-disabled):active`]:{[`&:not(${n}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:2*o,marginInlineEnd:2*-o}},[`&${n}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:2*-o,marginInlineEnd:2*o}}}}}},O=e=>{const{componentCls:n,trackHeight:t,trackMinWidth:o}=e;return{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,x.Wf)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:o,height:t,lineHeight:`${t}px`,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,x.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"}})}};var M=(0,y.Z)("Switch",(e=>{const n=(0,k.TS)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:.75*e.fontSizeIcon,switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[O(n),E(n),w(n),I(n),S(n)]}),(e=>{const{fontSize:n,lineHeight:t,controlHeight:o,colorWhite:r}=e,a=n*t,i=o/2,l=a-4,c=i-4;return{trackHeight:a,trackHeightSM:i,trackMinWidth:2*l+8,trackMinWidthSM:2*c+4,trackPadding:2,handleBg:r,handleSize:l,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new C.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:l/2,innerMaxMargin:l+2+4,innerMinMarginSM:c/2,innerMaxMarginSM:c+2+4}})),Z=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]])}return t};const N=d.forwardRef(((e,n)=>{const{prefixCls:t,size:r,disabled:i,loading:l,className:c,rootClassName:s,style:p}=e,g=Z(e,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:u,direction:h,switch:C}=d.useContext(f.E_),x=d.useContext($.Z),y=(null!=i?i:x)||l,k=u("switch",t),S=d.createElement("div",{className:`${k}-handle`},l&&d.createElement(o.Z,{className:`${k}-loading-icon`})),[I,w]=M(k),E=(0,v.Z)(r),O=a()(null==C?void 0:C.className,{[`${k}-small`]:"small"===E,[`${k}-loading`]:l,[`${k}-rtl`]:"rtl"===h},c,s,w),N=Object.assign(Object.assign({},null==C?void 0:C.style),p);return I(d.createElement(b.Z,{component:"Switch"},d.createElement(m,Object.assign({},g,{prefixCls:k,className:O,style:N,disabled:y,ref:n,loadingIcon:S}))))}));N.__ANT_SWITCH=!0;var P=N},12563:function(e,n,t){t.d(n,{Z:function(){return w}});var o=t(59301),r=t(51638),a=t(92310),i=t.n(a),l=t(36785),c=t(47729),s=t(14088),d=t(36355),p=t(17313),g=t(37613),u=t(83116);const h=e=>{const{lineWidth:n,fontSizeIcon:t}=e,o=e.fontSizeSM,r=e.lineHeightSM*o+"px";return(0,g.TS)(e,{tagFontSize:o,tagLineHeight:r,tagIconSize:t-2*n,tagPaddingHorizontal:8,tagBorderlessBg:e.colorFillTertiary})},m=e=>({defaultBg:e.colorFillQuaternary,defaultColor:e.colorText});var b=(0,u.Z)("Tag",(e=>(e=>{const{paddingXXS:n,lineWidth:t,tagPaddingHorizontal:o,componentCls:r}=e,a=o-t,i=n-t;return{[r]:Object.assign(Object.assign({},(0,p.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:a,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${r}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${r}-close-icon`]:{marginInlineStart:i,color:e.colorTextDescription,fontSize:e.tagIconSize,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${r}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${r}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:a}}),[`${r}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}})(h(e))),m),f=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]])}return t};var $=e=>{const{prefixCls:n,style:t,className:r,checked:a,onChange:l,onClick:c}=e,s=f(e,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:p,tag:g}=o.useContext(d.E_),u=p("tag",n),[h,m]=b(u),$=i()(u,`${u}-checkable`,{[`${u}-checkable-checked`]:a},null==g?void 0:g.className,r,m);return h(o.createElement("span",Object.assign({},s,{style:Object.assign(Object.assign({},t),null==g?void 0:g.style),className:$,onClick:e=>{null==l||l(!a),null==c||c(e)}})))},v=t(45157);var C=(0,u.b)(["Tag","preset"],(e=>(e=>(0,v.Z)(e,((n,t)=>{let{textColor:o,lightBorderColor:r,lightColor:a,darkColor:i}=t;return{[`${e.componentCls}-${n}`]:{color:o,background:a,borderColor:r,"&-inverse":{color:e.colorTextLightSolid,background:i,borderColor:i},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}})))(h(e))),m);const x=(e,n,t)=>{const o="string"!=typeof(r=t)?r:r.charAt(0).toUpperCase()+r.slice(1);var r;return{[`${e.componentCls}-${n}`]:{color:e[`color${t}`],background:e[`color${o}Bg`],borderColor:e[`color${o}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}};var y=(0,u.b)(["Tag","status"],(e=>{const n=h(e);return[x(n,"success","Success"),x(n,"processing","Info"),x(n,"error","Error"),x(n,"warning","Warning")]}),m),k=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]])}return t};const S=(e,n)=>{const{prefixCls:t,className:a,rootClassName:p,style:g,children:u,icon:h,color:m,onClose:f,closeIcon:$,closable:v,bordered:x=!0}=e,S=k(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:I,direction:w,tag:E}=o.useContext(d.E_),[O,M]=o.useState(!0);o.useEffect((()=>{"visible"in S&&M(S.visible)}),[S.visible]);const Z=(0,l.o2)(m),N=(0,l.yT)(m),P=Z||N,j=Object.assign(Object.assign({backgroundColor:m&&!P?m:void 0},null==E?void 0:E.style),g),z=I("tag",t),[T,H]=b(z),R=i()(z,null==E?void 0:E.className,{[`${z}-${m}`]:P,[`${z}-has-color`]:m&&!P,[`${z}-hidden`]:!O,[`${z}-rtl`]:"rtl"===w,[`${z}-borderless`]:!x},a,p,H),B=e=>{e.stopPropagation(),null==f||f(e),e.defaultPrevented||M(!1)},[,A]=(0,c.Z)(v,$,(e=>null===e?o.createElement(r.Z,{className:`${z}-close-icon`,onClick:B}):o.createElement("span",{className:`${z}-close-icon`,onClick:B},e)),null,!1),L="function"==typeof S.onClick||u&&"a"===u.type,D=h||null,W=D?o.createElement(o.Fragment,null,D,u&&o.createElement("span",null,u)):u,X=o.createElement("span",Object.assign({},S,{ref:n,className:R,style:j}),W,A,Z&&o.createElement(C,{key:"preset",prefixCls:z}),N&&o.createElement(y,{key:"status",prefixCls:z}));return T(L?o.createElement(s.Z,{component:"Tag"},X):X)},I=o.forwardRef(S);I.CheckableTag=$;var w=I}}]); |