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.
4 lines
28 KiB
4 lines
28 KiB
(globalThis.utooChunk_ant_design_pro||(globalThis.utooChunk_ant_design_pro=[])).push(["object"==typeof document?document.currentScript:void 0,204275,685986,e=>{"use strict";var t=e.i(191788),r=e.i(75907),i=e.i(56926),o=e.i(77682),n=e.i(851581),a=e.i(56206),l=e.i(922105),s=e.i(351212);let c=(e,t)=>{if(!e)return null;let r={left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth,top:e.offsetTop,bottom:e.parentElement.clientHeight-e.clientHeight-e.offsetTop,height:e.clientHeight};return t?{left:0,right:0,width:0,top:r.top,bottom:r.bottom,height:r.height}:{left:r.left,right:r.right,width:r.width,top:0,bottom:0,height:0}},d=e=>void 0!==e?`${e}px`:void 0;function u(e){let{prefixCls:r,containerRef:i,value:o,getValueIndex:u,motionName:m,onMotionStart:f,onMotionEnd:g,direction:p,vertical:h=!1}=e,b=t.useRef(null),[$,y]=t.useState(o),k=e=>{let t=u(e),o=i.current?.querySelectorAll(`.${r}-item`)[t];return o?.offsetParent&&o},[v,C]=t.useState(null),[x,S]=t.useState(null);(0,s.default)(()=>{if($!==o){let e=k($),t=k(o),r=c(e,h),i=c(t,h);y(o),C(r),S(i),e&&t?f():g()}},[o]);let w=t.useMemo(()=>h?d(v?.top??0):"rtl"===p?d(-v?.right):d(v?.left),[h,p,v]),E=t.useMemo(()=>h?d(x?.top??0):"rtl"===p?d(-x?.right):d(x?.left),[h,p,x]);return v&&x?t.createElement(l.default,{visible:!0,motionName:m,motionAppear:!0,onAppearStart:()=>h?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"},onAppearActive:()=>h?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"},onVisibleChanged:()=>{C(null),S(null),g()}},({className:e,style:i},o)=>{let l={...i,"--thumb-start-left":w,"--thumb-start-width":d(v?.width),"--thumb-active-left":E,"--thumb-active-width":d(x?.width),"--thumb-start-top":w,"--thumb-start-height":d(v?.height),"--thumb-active-top":E,"--thumb-active-height":d(x?.height)},s={ref:(0,n.composeRef)(b,o),style:l,className:(0,a.clsx)(`${r}-thumb`,e)};return t.createElement("div",s)}):null}let m=({prefixCls:e,className:r,style:i,styles:o,classNames:n,data:l,disabled:s,checked:c,label:d,title:u,value:m,name:f,onChange:g,onFocus:p,onBlur:h,onKeyDown:b,onKeyUp:$,onMouseDown:y,itemRender:k=e=>e})=>k(t.createElement("label",{className:(0,a.clsx)(r,{[`${e}-item-disabled`]:s}),style:i,onMouseDown:y},t.createElement("input",{name:f,className:`${e}-item-input`,type:"radio",disabled:s,checked:c,onChange:e=>{s||g(e,m)},onFocus:p,onBlur:h,onKeyDown:b,onKeyUp:$}),t.createElement("div",{className:(0,a.clsx)(`${e}-item-label`,n?.label),title:u,style:o?.label},d)),{item:l}),f=t.forwardRef((e,l)=>{let{prefixCls:s="rc-segmented",direction:c,vertical:d,options:f=[],disabled:g,defaultValue:p,value:h,name:b,onChange:$,className:y="",style:k,styles:v,classNames:C,motionName:x="thumb-motion",itemRender:S,...w}=e,E=t.useRef(null),M=t.useMemo(()=>(0,n.composeRef)(E,l),[E,l]),R=t.useMemo(()=>f.map(e=>{if("object"==typeof e&&null!==e){let t=void 0!==e.title?e.title:"object"!=typeof e.label?e.label?.toString():void 0;return{...e,title:t}}return{label:e?.toString(),title:e?.toString(),value:e}}),[f]),[N,j]=(0,i.default)(p??R[0]?.value,h),[A,P]=t.useState(!1),D=(e,t)=>{j(t),$?.(t)},F=(0,o.default)(w,["children"]),[I,H]=t.useState(!1),[T,z]=t.useState(!1),O=()=>{z(!0)},B=()=>{z(!1)},X=()=>{H(!1)},W=e=>{"Tab"===e.key&&H(!0)},L=e=>{let t=R.findIndex(e=>e.value===N),r=R.length,i=R[(t+e+r)%r];i&&(j(i.value),$?.(i.value))},Y=e=>{switch(e.key){case"ArrowLeft":case"ArrowUp":L(-1);break;case"ArrowRight":case"ArrowDown":L(1)}};return t.createElement("div",(0,r.default)({role:"radiogroup","aria-label":"segmented control",tabIndex:g?void 0:0,"aria-orientation":d?"vertical":"horizontal",style:k},F,{className:(0,a.clsx)(s,{[`${s}-rtl`]:"rtl"===c,[`${s}-disabled`]:g,[`${s}-vertical`]:d},y),ref:M}),t.createElement("div",{className:`${s}-group`},t.createElement(u,{vertical:d,prefixCls:s,value:N,containerRef:E,motionName:`${s}-${x}`,direction:c,getValueIndex:e=>R.findIndex(t=>t.value===e),onMotionStart:()=>{P(!0)},onMotionEnd:()=>{P(!1)}}),R.map(e=>{let{value:i,disabled:o}=e;return t.createElement(m,(0,r.default)({},e,{name:b,data:e,itemRender:S,key:i,prefixCls:s,className:(0,a.clsx)(e.className,`${s}-item`,C?.item,{[`${s}-item-selected`]:i===N&&!A,[`${s}-item-focused`]:T&&I&&i===N}),style:v?.item,classNames:C,styles:v,checked:i===N,onChange:D,onFocus:O,onBlur:B,onKeyDown:Y,onKeyUp:W,onMouseDown:X,disabled:!!g||!!o}))})))});var g=e.i(572353),p=e.i(430898),h=e.i(497630),b=e.i(934854),$=e.i(993175),y=e.i(625263),k=e.i(188304),v=e.i(980646),C=e.i(307441),x=e.i(352050),S=e.i(108314);function w(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}let E=e=>({background:e.itemSelectedBg,boxShadow:e.boxShadowTertiary}),M={overflow:"hidden",...C.textEllipsis};var R=(0,x.genStyleHooks)("Segmented",e=>{let{lineWidth:t,calc:r}=e;return(e=>{let{componentCls:t,motionDurationSlow:r,motionEaseInOut:i,motionDurationMid:o}=e,n=e.calc(e.controlHeight).sub(e.calc(e.trackPadding).mul(2)).equal(),a=e.calc(e.controlHeightLG).sub(e.calc(e.trackPadding).mul(2)).equal(),l=e.calc(e.controlHeightSM).sub(e.calc(e.trackPadding).mul(2)).equal();return{[t]:{...(0,C.resetComponent)(e),display:"inline-block",padding:e.trackPadding,color:e.itemColor,background:e.trackBg,borderRadius:e.borderRadius,transition:`all ${o}`,...(0,C.genFocusStyle)(e),[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-vertical`]:{[`${t}-group`]:{flexDirection:"column"},[`${t}-thumb`]:{width:"100%",height:0,padding:`0 ${(0,v.unit)(e.paddingXXS)}`}},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${o}`,borderRadius:e.borderRadiusSM,transform:"translateZ(0)","&-selected":{...E(e),color:e.itemSelectedColor},"&-focused":(0,C.genFocusOutline)(e),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",opacity:0,pointerEvents:"none",transition:["opacity","background-color"].map(e=>`${e} ${o}`).join(", ")},[`&:not(${t}-item-selected):not(${t}-item-disabled)`]:{"&:hover, &:active":{color:e.itemHoverColor},"&:hover::after":{opacity:1,backgroundColor:e.itemHoverBg},"&:active::after":{opacity:1,backgroundColor:e.itemActiveBg}},"&-label":{minHeight:n,lineHeight:(0,v.unit)(n),padding:`0 ${(0,v.unit)(e.segmentedPaddingHorizontal)}`,...M},"&-icon + *":{marginInlineStart:e.calc(e.marginSM).div(2).equal()},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:{...E(e),position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${(0,v.unit)(e.paddingXXS)} 0`,borderRadius:e.borderRadiusSM,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}},[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:a,lineHeight:(0,v.unit)(a),padding:`0 ${(0,v.unit)(e.segmentedPaddingHorizontal)}`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:l,lineHeight:(0,v.unit)(l),padding:`0 ${(0,v.unit)(e.segmentedPaddingHorizontalSM)}`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}},...w(`&-disabled ${t}-item`,e),...w(`${t}-item-disabled`,e),[`${t}-thumb-motion-appear-active`]:{willChange:"transform, width",transition:["transform","width"].map(e=>`${e} ${r} ${i}`).join(", ")},[`&${t}-shape-round`]:{borderRadius:9999,[`${t}-item, ${t}-thumb`]:{borderRadius:9999}}}}})((0,S.mergeToken)(e,{segmentedPaddingHorizontal:r(e.controlPaddingHorizontal).sub(t).equal(),segmentedPaddingHorizontalSM:r(e.controlPaddingHorizontalSM).sub(t).equal()}))},e=>{let{colorTextLabel:t,colorText:r,colorFillSecondary:i,colorBgElevated:o,colorFill:n,lineWidthBold:a,colorBgLayout:l}=e;return{trackPadding:a,trackBg:l,itemColor:t,itemHoverColor:r,itemHoverBg:i,itemSelectedBg:o,itemActiveBg:n,itemSelectedColor:r}});let N=t.forwardRef((e,r)=>{let i=(0,g.default)(),{prefixCls:o,className:n,rootClassName:l,block:s,options:c=[],size:d,style:u,vertical:m,orientation:v,shape:C="default",name:x=i,styles:S,classNames:w,...E}=e,{getPrefixCls:M,direction:N,className:j,style:A,classNames:P,styles:D}=(0,$.useComponentConfig)("segmented"),F={...e,options:c,size:d,shape:C},[I,H]=(0,p.useMergeSemantic)([P,w],[D,S],{props:F}),T=M("segmented",o),[z,O]=R(T),B=(0,y.default)(d),X=t.useMemo(()=>c.map(e=>{if((0,b.isPlainObject)(e)&&e?.icon){let{icon:r,label:i,...o}=e;return{...o,label:t.createElement(t.Fragment,null,t.createElement("span",{className:(0,a.clsx)(`${T}-item-icon`,I.icon),style:H.icon},r),i&&t.createElement("span",null,i))}}return e}),[c,T,I.icon,H.icon]),[,W]=(0,h.useOrientation)(v,m),L=(0,a.clsx)(n,l,j,I.root,{[`${T}-block`]:s,[`${T}-sm`]:"small"===B,[`${T}-lg`]:"large"===B,[`${T}-vertical`]:W,[`${T}-shape-${C}`]:"round"===C},z,O),Y={...H.root,...A,...u};return t.createElement(f,{...E,name:x,className:L,style:Y,classNames:I,styles:H,itemRender:(e,{item:r})=>{if(!r.tooltip)return e;let i=(0,b.isPlainObject)(r.tooltip)?r.tooltip:{title:r.tooltip};return t.createElement(k.default,{...i},e)},options:X,ref:r,prefixCls:T,direction:N,vertical:W})});e.s(["default",()=>N],685986),e.s(["Segmented",()=>N],204275)},229068,e=>{"use strict";var t=e.i(461550);e.s(["Progress",()=>t.default])},343275,e=>{"use strict";var t=e.i(151304),r=e.i(379049),i=e.i(865372),o=e.i(854583),n=e.i(191788),a=e.i(730943),l=e.i(56742),s=e.i(683276),c=e.i(391398);let{noteOnce:d}=t.warning;e.s(["ModalForm",0,function({children:e,trigger:u,onOpenChange:m,modalProps:f,onFinish:g,submitTimeout:p,title:h,width:b,open:$,...y}){d(!y.footer||!f?.footer,"ModalForm 是一个 ProForm 的特殊布局,如果想自定义按钮,请使用 submit.render 自定义。");let k=(0,n.useContext)(r.ConfigProvider.ConfigContext),[,v]=(0,n.useState)([]),[C,x]=(0,n.useState)(!1),[S,w]=(0,t.useControlledState)(!1,$),E=(0,l.useRefFunction)(e=>{m?.(e)}),M=(0,n.useCallback)(e=>{w(t=>{let r="function"==typeof e?e(t):e;return queueMicrotask(()=>{E(r)}),r})},[E]),R=(0,n.useRef)(null),N=(0,n.useCallback)(e=>{null===R.current&&e&&v([]),R.current=e},[]),j=(0,n.useRef)(),A=(0,n.useCallback)(()=>{let e=y.form??y.formRef?.current??j.current;e&&f?.destroyOnHidden&&"function"==typeof e.resetFields&&e.resetFields()},[f?.destroyOnHidden,y.form,y.formRef]);(0,n.useImperativeHandle)(y.formRef,()=>j.current,[j.current]),(0,n.useEffect)(()=>{$&&m?.(!0)},[$]);let P=(0,n.useMemo)(()=>u?n.default.cloneElement(u,{key:"trigger",...u.props,onClick:async e=>{M(!S),u.props?.onClick?.(e)}}):null,[M,u,S]),D=(0,n.useMemo)(()=>!1!==y.submitter&&(0,o.merge)({searchConfig:{submitText:f?.okText??k.locale?.Modal?.okText??"确认",resetText:f?.cancelText??k.locale?.Modal?.cancelText??"取消"},resetButtonProps:{preventDefault:!0,disabled:p&&C,onClick:e=>{M(!1),f?.onCancel?.(e)}}},y.submitter??{}),[k.locale?.Modal?.cancelText,k.locale?.Modal?.okText,f,y.submitter,M,C,p]),F=(0,n.useCallback)((e,t)=>(0,c.jsxs)(c.Fragment,{children:[e,R.current&&t?(0,c.jsx)(n.default.Fragment,{children:(0,a.createPortal)(t,R.current)},"submitter"):t]}),[]),I=(0,n.useCallback)(async e=>{let t=g?.(e);if(p&&t instanceof Promise||p){x(!0);let e=setTimeout(()=>x(!1),p);try{let r=await t;return clearTimeout(e),x(!1),r&&M(!1),r}catch(t){throw clearTimeout(e),x(!1),t}}let r=await t;return r&&M(!1),r},[g,M,p]);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(i.Modal,{title:h,width:b||800,...f,open:S,onCancel:e=>{p&&C||(M(!1),f?.onCancel?.(e))},afterClose:()=>{f?.destroyOnHidden&&A(),S&&M(!1),f?.afterClose?.()},footer:!1!==y.submitter?(0,c.jsx)("div",{ref:N,style:{display:"flex",justifyContent:"flex-end"}}):null,children:(0,c.jsx)(s.BaseForm,{formComponentType:"ModalForm",layout:"vertical",...y,onInit:(e,t)=>{y.formRef&&(y.formRef.current=t),y?.onInit?.(e,t),j.current=t},formRef:j,submitter:D,onFinish:async e=>await I(e),contentRender:F,children:e})}),P]})}])},461550,528704,e=>{"use strict";var t=e.i(191788),r=e.i(218589),i=e.i(202917),o=e.i(146025),n=e.i(876352),a=e.i(449995),l=e.i(151304),s=e.i(56206),c=e.i(430898),d=e.i(934854),u=e.i(993175);let m={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,railColor:"#D9D9D9",railWidth:1,gapPosition:"bottom",loading:!1};var f=e.i(572353);let g=({bg:e,children:r})=>t.createElement("div",{style:{width:"100%",height:"100%",background:e}},r);function p(e,t){return Object.keys(e).map(r=>{let i=parseFloat(r),o=`${Math.floor(i*t)}%`;return`${e[r]} ${o}`})}let h=t.forwardRef((e,r)=>{let{prefixCls:i,color:o,gradientId:n,radius:a,className:l,style:c,ptg:d,strokeLinecap:u,strokeWidth:m,size:f,gapDegree:h}=e,b=o&&"object"==typeof o,$=f/2,y=t.createElement("circle",{className:(0,s.clsx)(`${i}-circle-path`,l),r:a,cx:$,cy:$,stroke:b?"#FFF":void 0,strokeLinecap:u,strokeWidth:m,opacity:+(0!==d),style:c,ref:r});if(!b)return y;let k=`${n}-conic`,v=h?`${180+h/2}deg`:"0deg",C=p(o,(360-h)/360),x=p(o,1),S=`conic-gradient(from ${v}, ${C.join(", ")})`,w=`linear-gradient(to ${h?"bottom":"top"}, ${x.join(", ")})`;return t.createElement(t.Fragment,null,t.createElement("mask",{id:k},y),t.createElement("foreignObject",{x:0,y:0,width:f,height:f,mask:`url(#${k})`},t.createElement(g,{bg:w},t.createElement(g,{bg:S}))))}),b=(e,t,r,i,o,n,a,l,s,c,d=0)=>{let u=(100-i)/100*t;return"round"===s&&100!==i&&(u+=c/2)>=t&&(u=t-.01),{stroke:"string"==typeof l?l:void 0,strokeDasharray:`${t}px ${e}`,strokeDashoffset:u+d,transform:`rotate(${o+r/100*360*((360-n)/360)+(0===n?0:({bottom:0,top:180,left:90,right:-90})[a])}deg)`,transformOrigin:"50px 50px",transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}};function $(){return($=Object.assign.bind()).apply(this,arguments)}function y(e){let t=e??[];return Array.isArray(t)?t:[t]}var k=e=>{let r,i,o,n,a,l,{id:c,prefixCls:d,classNames:u={},styles:g={},steps:p,strokeWidth:k,railWidth:v,gapDegree:C=0,gapPosition:x,railColor:S,strokeLinecap:w,style:E,className:M,strokeColor:R,percent:N,loading:j,...A}={...m,...e},P=(0,f.default)(c),D=`${P}-gradient`,F=50-k/2,I=2*Math.PI*F,H=C>0?90+C/2:-90,T=(360-C)/360*I,{count:z,gap:O}="object"==typeof p?p:{count:p,gap:2},B=y(N),X=y(R),W=X.find(e=>e&&"object"==typeof e),L=W&&"object"==typeof W?"butt":w,{indeterminateStyleProps:Y,indeterminateStyleAnimation:q}=(({id:e,loading:r})=>{if(!r)return{indeterminateStyleProps:{},indeterminateStyleAnimation:null};let i=`${e}-indeterminate-animate`;return{indeterminateStyleProps:{transform:"rotate(0deg)",animation:`${i} 1s linear infinite`},indeterminateStyleAnimation:t.default.createElement("style",null,`@keyframes ${i} {
|
|
0% { transform: rotate(0deg); }
|
|
100% { transform: rotate(360deg); }
|
|
}`)}})({id:P,loading:j}),_=b(I,T,0,100,H,C,x,S,L,k),K=(r=(0,t.useRef)([]),i=(0,t.useRef)(null),(0,t.useEffect)(()=>{let e=Date.now(),t=!1;r.current.forEach(r=>{if(!r)return;t=!0;let o=r.style;o.transitionDuration=".3s, .3s, .3s, .06s",i.current&&e-i.current<100&&(o.transitionDuration="0s, 0s")}),t&&(i.current=Date.now())}),r.current);return t.createElement("svg",$({className:(0,s.clsx)(`${d}-circle`,u.root,M),viewBox:"0 0 100 100",style:{...g.root,...E},id:c,role:"presentation"},A),!z&&t.createElement("circle",{className:(0,s.clsx)(`${d}-circle-rail`,u.rail),r:F,cx:50,cy:50,stroke:S,strokeLinecap:L,strokeWidth:v||k,style:{..._,...g.rail}}),z?(o=Math.round(z*(B[0]/100)),n=100/z,a=0,Array(z).fill(null).map((e,r)=>{let i=r<=o-1?X[0]:S,l=i&&"object"==typeof i?`url(#${D})`:void 0,c=b(I,T,a,n,H,C,x,i,"butt",k,O);return a+=(T-c.strokeDashoffset+O)*100/T,t.createElement("circle",{key:r,className:(0,s.clsx)(`${d}-circle-path`,u.track),r:F,cx:50,cy:50,stroke:l,strokeWidth:k,opacity:1,style:{...c,...g.track},ref:e=>{K[r]=e}})})):(l=0,B.map((e,r)=>{let i=X[r]||X[X.length-1],o=b(I,T,l,e,H,C,x,i,L,k);return l+=e,t.createElement(h,{key:r,color:i,ptg:e,radius:F,prefixCls:d,gradientId:D,className:u.track,style:{...o,...Y,...g.track},strokeLinecap:L,strokeWidth:k,gapDegree:C,ref:e=>{K[r]=e},size:100})}).reverse()),q)};e.s([],528704),e.i(528704);var v=e.i(188304),C=e.i(671557);function x(e){return!e||e<0?0:e>100?100:e}function S({success:e}){let t;return e&&"percent"in e&&(t=e.percent),t}let w=(e,t,r)=>{let i=-1,o=-1;if("step"===t){let t=r.steps,n=r.strokeWidth;"string"==typeof e||void 0===e?(i="small"===e?2:14,o=n??8):(0,d.isNumber)(e)?[i,o]=[e,e]:[i=14,o=8]=Array.isArray(e)?e:[e.width,e.height],i*=t}else if("line"===t){let t=r?.strokeWidth;"string"==typeof e||void 0===e?o=t||("small"===e?6:8):(0,d.isNumber)(e)?[i,o]=[e,e]:[i=-1,o=8]=Array.isArray(e)?e:[e.width,e.height]}else("circle"===t||"dashboard"===t)&&("string"==typeof e||void 0===e?[i,o]="small"===e?[60,60]:[120,120]:(0,d.isNumber)(e)?[i,o]=[e,e]:Array.isArray(e)&&(i=e[0]??e[1]??120,o=e[0]??e[1]??120));return[i,o]},E=["root","body","indicator"];var M=e=>{let{prefixCls:r,classNames:i,styles:o,railColor:n,trailColor:a,strokeLinecap:c="round",gapPosition:d,gapPlacement:m,gapDegree:f,width:g=120,type:p,children:h,success:b,size:$=g,steps:y}=e,{direction:M}=(0,u.useComponentConfig)("progress"),[R,N]=w($,"circle"),{strokeWidth:j}=e;void 0===j&&(j=Math.max(3/R*100,6));let A=t.useMemo(()=>f||0===f?f:"dashboard"===p?75:void 0,[f,p]),P=(({percent:e,success:t})=>{let r=x(S({success:t}));return[r,x(x(e)-r)]})(e),D=t.useMemo(()=>{let e=(m??d)||"dashboard"===p&&"bottom"||void 0,t="rtl"===M;switch(e){case"start":return t?"right":"left";case"end":return t?"left":"right";default:return e}},[M,m,d,p]),F="[object Object]"===Object.prototype.toString.call(e.strokeColor),I=(({success:e={},strokeColor:t})=>{let{strokeColor:r}=e;return[r||C.presetPrimaryColors.green,t||null]})({success:b,strokeColor:e.strokeColor}),H=(0,s.clsx)(`${r}-body`,{[`${r}-circle-gradient`]:F},i.body),T=t.createElement(k,{steps:y,percent:y?P[1]:P,strokeWidth:j,railWidth:j,strokeColor:y?I[1]:I,strokeLinecap:c,railColor:n??a,prefixCls:r,gapDegree:A,gapPosition:D,classNames:(0,l.omit)(i,E),styles:(0,l.omit)(o,E)}),z=R<=20,O=t.createElement("div",{className:H,style:{width:R,height:N,fontSize:.15*R+6,...o.body}},T,!z&&h);return z?t.createElement(v.default,{title:h},O):O},R=e.i(980646),N=e.i(307441),j=e.i(352050),A=e.i(108314);let P="--progress-line-stroke-color";var D=(0,j.genStyleHooks)("Progress",e=>{let t=e.calc(e.marginXXS).div(2).equal(),r=(0,A.mergeToken)(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{...(0,N.resetComponent)(e),display:"inline-flex","&-rtl":{direction:"rtl"},[`${t}-indicator`]:{color:e.colorText,lineHeight:1,whiteSpace:"nowrap",verticalAlign:"middle",wordBreak:"normal",[r]:{fontSize:e.fontSize}},[`&${t}-status-exception`]:{[`${t}-indicator`]:{color:e.colorError}},[`&${t}-status-success`]:{[`${t}-indicator`]:{color:e.colorSuccess}}}}})(r),(e=>{var t;let r,{componentCls:i}=e;return{[`${i}-line`]:{position:"relative",width:"100%",fontSize:e.fontSize,[`${i}-body`]:{display:"inline-flex",alignItems:"center",width:"100%",gap:e.marginXS},[`${i}-rail`]:{flex:"auto",background:e.remainingColor,borderRadius:e.lineBorderRadius,position:"relative",width:"100%",overflow:"hidden"},[`&${i}-status-active`]:{[`${i}-track:after`]:{content:'""',position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:"inherit",opacity:0,animationName:(r=t?"100%":"-100%",new R.Keyframes(`antProgress${t?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${r}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${r}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite"}},[`${i}-track`]:{position:"absolute",insetInlineStart:0,insetBlock:0,borderRadius:"inherit",background:e.defaultColor,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,minWidth:"max-content",display:"flex",alignItems:"center","&-success":{background:e.colorSuccess}},[`&${i}-status-exception`]:{[`${i}-track`]:{background:e.colorError}},[`&${i}-status-success`]:{[`${i}-track`]:{background:e.colorSuccess}},[`${i}-indicator-outer`]:{[`&${i}-indicator-start`]:{order:-1}},[`${i}-body-layout-bottom`]:{flexDirection:"column",alignItems:"center",gap:e.marginXXS},[`${i}-indicator${i}-indicator-inner`]:{color:e.colorWhite,paddingInline:e.paddingXXS,width:"100%",display:"flex",justifyContent:"center",[`&${i}-indicator-end`]:{justifyContent:"end"},[`&${i}-indicator-start`]:{justifyContent:"start"},[`&${i}-indicator-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[`${t}-circle`]:{[`${t}-circle-rail`]:{stroke:e.remainingColor},[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-body`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`${t}-indicator`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[r]:{fontSize:e.circleIconFontSize}},[`&${t}-status-exception`]:{[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}}},[`&${t}-status-success`]:{[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}})(r),(e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-body":{display:"flex",flexDirection:"row",alignItems:"center",gap:e.progressStepMarginInlineEnd,[`${t}-indicator`]:{marginInlineStart:e.marginXS}},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-indicator ${r}`]:{fontSize:e.fontSizeSM}}}})(r)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`})),F=e=>{let{prefixCls:r,classNames:i,styles:o,direction:n,percent:a,size:l,strokeWidth:c,strokeColor:d,strokeLinecap:u="round",children:m,railColor:f,trailColor:g,percentPosition:p,success:h}=e,{align:b,type:$}=p,y="square"===u||"butt"===u?0:void 0,[k,v]=w(l??[-1,c||("small"===l?6:8)],"line",{strokeWidth:c}),E=`${r}-track`,M=d&&"string"!=typeof d?((e,t)=>{let{from:r=C.presetPrimaryColors.blue,to:i=C.presetPrimaryColors.blue,direction:o="rtl"===t?"to left":"to right",...n}=e;if(0!==Object.keys(n).length){let e,t=(e=[],Object.keys(n).forEach(t=>{let r=Number.parseFloat(t.replace(/%/g,""));Number.isNaN(r)||e.push({key:r,value:n[t]})}),(e=e.sort((e,t)=>e.key-t.key)).map(({key:e,value:t})=>`${t} ${e}%`).join(", ")),r=`linear-gradient(${o}, ${t})`;return{background:r,[P]:r}}let a=`linear-gradient(${o}, ${r}, ${i})`;return{background:a,[P]:a}})(d,n):{[P]:d,background:d},R={width:`${x(a)}%`,height:v,borderRadius:y,...M},N=S(e),j={width:`${x(N)}%`,height:v,borderRadius:y,backgroundColor:h?.strokeColor};return t.createElement("div",{className:(0,s.clsx)(`${r}-body`,i.body,{[`${r}-body-layout-bottom`]:"center"===b&&"outer"===$}),style:{width:k>0?k:"100%",...o.body}},t.createElement("div",{className:(0,s.clsx)(`${r}-rail`,i.rail),style:{backgroundColor:(f??g)||void 0,borderRadius:y,height:v,...o.rail}},t.createElement("div",{className:(0,s.clsx)(E,i.track),style:{...R,...o.track}},"inner"===$&&m),void 0!==N&&t.createElement("div",{className:(0,s.clsx)(E,`${E}-success`,i.track),style:{...j,...o.track}})),"outer"===$&&m)},I=e=>{let{classNames:r,styles:i,size:o,steps:n,rounding:a=Math.round,percent:l=0,strokeWidth:c=8,strokeColor:d,railColor:u,trailColor:m,prefixCls:f,children:g}=e,p=a(l/100*n),[h,b]=w(o??["small"===o?2:14,c],"step",{steps:n,strokeWidth:c}),$=h/n,y=Array.from({length:n}),k=u??m;for(let e=0;e<n;e++){let o=Array.isArray(d)?d[e]:d;y[e]=t.createElement("div",{key:e,className:(0,s.clsx)(`${f}-steps-item`,{[`${f}-steps-item-active`]:e<=p-1},r.track),style:{backgroundColor:e<=p-1?o:k,width:$,height:b,...i.track}})}return t.createElement("div",{className:(0,s.clsx)(`${f}-steps-body`,r.body),style:i.body},y,g)};let H=["normal","exception","active","success"],T=t.forwardRef((e,m)=>{let f,{prefixCls:g,className:p,rootClassName:h,classNames:b,styles:$,steps:y,strokeColor:k,percent:v=0,size:C="medium",showInfo:E=!0,type:R="line",status:N,format:j,style:A,percentPosition:P={},...T}=e,{align:z="end",type:O="outer"}=P,B=Array.isArray(k)?k[0]:k,X="string"==typeof k||Array.isArray(k)?k:void 0,W=t.useMemo(()=>{if(B){let e="string"==typeof B?B:Object.values(B)[0];return new r.FastColor(e).isLight()}return!1},[k]),L=t.useMemo(()=>{let t=S(e);return Number.parseInt(void 0!==t?(t??0)?.toString():(v??0)?.toString(),10)},[v,e.success]),Y=t.useMemo(()=>!H.includes(N)&&L>=100?"success":N||"normal",[N,L]),{getPrefixCls:q,direction:_,className:K,style:G,classNames:U,styles:V}=(0,u.useComponentConfig)("progress"),Q=q("progress",g),[Z,J]=D(Q),ee={...e,percent:v,type:R,size:C,showInfo:E,percentPosition:P},[et,er]=(0,c.useMergeSemantic)([U,b],[V,$],{props:ee}),ei="line"===R,eo=ei&&!y,en=t.useMemo(()=>{let r;if(!E)return null;let l=S(e),c=j||(e=>`${e}%`),d=ei&&W&&"inner"===O;return"inner"===O||j||"exception"!==Y&&"success"!==Y?r=c(x(v),x(l)):"exception"===Y?r=ei?t.createElement(n.default,null):t.createElement(a.default,null):"success"===Y&&(r=ei?t.createElement(i.default,null):t.createElement(o.default,null)),t.createElement("span",{className:(0,s.clsx)(`${Q}-indicator`,{[`${Q}-indicator-bright`]:d,[`${Q}-indicator-${z}`]:eo,[`${Q}-indicator-${O}`]:eo},et.indicator),style:er.indicator,title:"string"==typeof r?r:void 0},r)},[E,v,L,Y,R,Q,j,ei,W,O,z,eo,et.indicator,er.indicator]),ea={...e,classNames:et,styles:er};"line"===R?f=y?t.createElement(I,{...ea,strokeColor:X,prefixCls:Q,steps:(0,d.isPlainObject)(y)?y.count:y},en):t.createElement(F,{...ea,strokeColor:B,prefixCls:Q,direction:_,percentPosition:{align:z,type:O}},en):("circle"===R||"dashboard"===R)&&(f=t.createElement(M,{...ea,strokeColor:B,prefixCls:Q,progressStatus:Y},en));let el=(0,s.clsx)(Q,`${Q}-status-${Y}`,{[`${Q}-${"dashboard"===R&&"circle"||R}`]:"line"!==R,[`${Q}-inline-circle`]:"circle"===R&&w(C,"circle")[0]<=20,[`${Q}-line`]:eo,[`${Q}-line-align-${z}`]:eo,[`${Q}-line-position-${O}`]:eo,[`${Q}-steps`]:y,[`${Q}-show-info`]:E,[`${Q}-small`]:"small"===C,[`${Q}-rtl`]:"rtl"===_},K,p,h,et.root,Z,J);return t.createElement("div",{ref:m,style:{...G,...er.root,...A},className:el,role:"progressbar","aria-valuenow":L,"aria-valuemin":0,"aria-valuemax":100,...(0,l.omit)(T,["railColor","trailColor","strokeWidth","width","gapDegree","gapPosition","gapPlacement","strokeLinecap","success"])},f)});e.s(["default",()=>T],461550)},638885,e=>{"use strict";var t=e.i(430077),r=e.i(494834),i=e.i(371713),o=e.i(191788),n=e.i(440656),a=e.i(79615),l=e.i(444455),s=e.i(391398);r.default.extend(i.default);var c=o.default.forwardRef(({text:e,mode:i,format:c="YYYY-MM-DD",label:d,light:u,render:m,formItemRender:f,showTime:g,fieldProps:p,picker:h,lightLabel:b,variant:$},y)=>{let k=(0,n.useIntl)(),[v,C]=(0,o.useState)(!1);if("read"===i){var x;let t=(x=p.format||c,e?"function"==typeof x?x((0,r.default)(e)):(0,r.default)(e).format((Array.isArray(x)?x[0]:x)||"YYYY-MM-DD"):"-");return m?m(e,{mode:i,...p},(0,s.jsx)(s.Fragment,{children:t})):(0,s.jsx)(s.Fragment,{children:t})}if("edit"===i||"update"===i){let r,{disabled:o,value:n,placeholder:m=k.getMessage("tableForm.selectPlaceholder","请选择")}=p,x=(0,l.parseValueToDay)(n);return(r=u?(0,s.jsx)(a.FieldLabel,{label:d,onClick:()=>{p?.onOpenChange?.(!0),C(!0)},style:x?{paddingInlineEnd:0}:void 0,disabled:o,value:x||v?(0,s.jsx)(t.DatePicker,{picker:h,showTime:g,format:c,ref:y,...p,value:x,onOpenChange:e=>{C(e),p?.onOpenChange?.(e)},open:v}):void 0,allowClear:!1,downIcon:!x&&!v&&void 0,variant:$,ref:b}):(0,s.jsx)(t.DatePicker,{picker:h,showTime:g,format:c,placeholder:m,variant:$,ref:y,...p,value:x}),f)?f(e,{mode:i,...p},r):r}return null});e.s(["default",()=>c])}]);
|