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";e.i(495059);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(186762),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:p,direction:g,vertical:h=!1}=e,b=t.useRef(null),[y,$]=t.useState(o),v=e=>{let t=u(e),o=i.current?.querySelectorAll(`.${r}-item`)[t];return o?.offsetParent&&o},[k,C]=t.useState(null),[x,S]=t.useState(null);(0,s.default)(()=>{if(y!==o){let e=v(y),t=v(o),r=c(e,h),i=c(t,h);$(o),C(r),S(i),e&&t?f():p()}},[o]);let w=t.useMemo(()=>h?d(k?.top??0):"rtl"===g?d(-k?.right):d(k?.left),[h,g,k]),E=t.useMemo(()=>h?d(x?.top??0):"rtl"===g?d(-x?.right):d(x?.left),[h,g,x]);return k&&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),p()}},({className:e,style:i},o)=>{let l={...i,"--thumb-start-left":w,"--thumb-start-width":d(k?.width),"--thumb-active-left":E,"--thumb-active-width":d(x?.width),"--thumb-start-top":w,"--thumb-start-height":d(k?.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:p,onFocus:g,onBlur:h,onKeyDown:b,onKeyUp:y,onMouseDown:$,itemRender:v=e=>e})=>v(t.createElement("label",{className:(0,a.clsx)(r,{[`${e}-item-disabled`]:s}),style:i,onMouseDown:$},t.createElement("input",{name:f,className:`${e}-item-input`,type:"radio",disabled:s,checked:c,onChange:e=>{s||p(e,m)},onFocus:g,onBlur:h,onKeyDown:b,onKeyUp:y}),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:p,defaultValue:g,value:h,name:b,onChange:y,className:$="",style:v,styles:k,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)(g??R[0]?.value,h),[A,D]=t.useState(!1),P=(e,t)=>{j(t),y?.(t)},F=(0,o.default)(w,["children"]),[I,H]=t.useState(!1),[T,z]=t.useState(!1),B=()=>{z(!0)},X=()=>{z(!1)},O=()=>{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),y?.(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:p?void 0:0,"aria-orientation":d?"vertical":"horizontal",style:v},F,{className:(0,a.clsx)(s,{[`${s}-rtl`]:"rtl"===c,[`${s}-disabled`]:p,[`${s}-vertical`]:d},$),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:()=>{D(!0)},onMotionEnd:()=>{D(!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:k?.item,classNames:C,styles:k,checked:i===N,onChange:P,onFocus:B,onBlur:X,onKeyDown:Y,onKeyUp:W,onMouseDown:O,disabled:!!p||!!o}))})))});var p=e.i(572353),g=e.i(430898),h=e.i(497630),b=e.i(993175),y=e.i(625263),$=e.i(188304);e.i(290586);var v=e.i(774778),k=e.i(307441),C=e.i(352050),x=e.i(104616);function S(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}let w=e=>({background:e.itemSelectedBg,boxShadow:e.boxShadowTertiary}),E={overflow:"hidden",...k.textEllipsis};var M=(0,C.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,k.resetComponent)(e),display:"inline-block",padding:e.trackPadding,color:e.itemColor,background:e.trackBg,borderRadius:e.borderRadius,transition:`all ${o}`,...(0,k.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":{...w(e),color:e.itemSelectedColor},"&-focused":(0,k.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)}`,...E},"&-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`]:{...w(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}},...S(`&-disabled ${t}-item`,e),...S(`${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,x.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 R=t.forwardRef((e,r)=>{let i=(0,p.default)(),{prefixCls:o,className:n,rootClassName:l,block:s,options:c=[],size:d,style:u,vertical:m,orientation:v,shape:k="default",name:C=i,styles:x,classNames:S,...w}=e,{getPrefixCls:E,direction:R,className:N,style:j,classNames:A,styles:D}=(0,b.useComponentConfig)("segmented"),P={...e,options:c,size:d,shape:k},[F,I]=(0,g.useMergeSemantic)([A,S],[D,x],{props:P}),H=E("segmented",o),[T,z]=M(H),B=(0,y.default)(d),X=t.useMemo(()=>c.map(e=>{if("object"==typeof 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)(`${H}-item-icon`,F.icon),style:I.icon},r),i&&t.createElement("span",null,i))}}return e}),[c,H,F.icon,I.icon]),[,O]=(0,h.useOrientation)(v,m),W=(0,a.clsx)(n,l,N,F.root,{[`${H}-block`]:s,[`${H}-sm`]:"small"===B,[`${H}-lg`]:"large"===B,[`${H}-vertical`]:O,[`${H}-shape-${k}`]:"round"===k},T,z),L={...I.root,...j,...u};return t.createElement(f,{...w,name:C,className:W,style:L,classNames:F,styles:I,itemRender:(e,{item:r})=>{if(!r.tooltip)return e;let i="object"==typeof r.tooltip?r.tooltip:{title:r.tooltip};return t.createElement($.default,{...i},e)},options:X,ref:r,prefixCls:H,direction:R,vertical:O})});e.s(["default",0,R],685986),e.s(["Segmented",0,R],204275)},229068,e=>{"use strict";var t=e.i(461550);e.s(["Progress",()=>t.default])},343275,e=>{"use strict";e.i(957562);var t=e.i(617796),r=e.i(557584),i=e.i(379049),o=e.i(865372),n=e.i(854583),a=e.i(191788),l=e.i(730943),s=e.i(56742),c=e.i(683276),d=e.i(391398);let{noteOnce:u}=r.warning;e.s(["ModalForm",0,function({children:e,trigger:r,onOpenChange:m,modalProps:f,onFinish:p,submitTimeout:g,title:h,width:b,open:y,...$}){u(!$.footer||!f?.footer,"ModalForm 是一个 ProForm 的特殊布局,如果想自定义按钮,请使用 submit.render 自定义。");let v=(0,a.useContext)(i.ConfigProvider.ConfigContext),[,k]=(0,a.useState)([]),[C,x]=(0,a.useState)(!1),[S,w]=(0,t.useControlledState)(!1,y),E=(0,s.useRefFunction)(e=>{m?.(e)}),M=(0,a.useCallback)(e=>{w(t=>{let r="function"==typeof e?e(t):e;return queueMicrotask(()=>{E(r)}),r})},[E]),R=(0,a.useRef)(null),N=(0,a.useCallback)(e=>{null===R.current&&e&&k([]),R.current=e},[]),j=(0,a.useRef)(),A=(0,a.useCallback)(()=>{let e=$.form??$.formRef?.current??j.current;e&&f?.destroyOnHidden&&"function"==typeof e.resetFields&&e.resetFields()},[f?.destroyOnHidden,$.form,$.formRef]);(0,a.useImperativeHandle)($.formRef,()=>j.current,[j.current]),(0,a.useEffect)(()=>{y&&m?.(!0)},[y]);let D=(0,a.useMemo)(()=>r?a.default.cloneElement(r,{key:"trigger",...r.props,onClick:async e=>{M(!S),r.props?.onClick?.(e)}}):null,[M,r,S]),P=(0,a.useMemo)(()=>!1!==$.submitter&&(0,n.merge)({searchConfig:{submitText:f?.okText??v.locale?.Modal?.okText??"确认",resetText:f?.cancelText??v.locale?.Modal?.cancelText??"取消"},resetButtonProps:{preventDefault:!0,disabled:g&&C,onClick:e=>{M(!1),f?.onCancel?.(e)}}},$.submitter??{}),[v.locale?.Modal?.cancelText,v.locale?.Modal?.okText,f,$.submitter,M,C,g]),F=(0,a.useCallback)((e,t)=>(0,d.jsxs)(d.Fragment,{children:[e,R.current&&t?(0,d.jsx)(a.default.Fragment,{children:(0,l.createPortal)(t,R.current)},"submitter"):t]}),[]),I=(0,a.useCallback)(async e=>{let t=p?.(e);if(g&&t instanceof Promise||g){x(!0);let e=setTimeout(()=>x(!1),g);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},[p,M,g]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(o.Modal,{title:h,width:b||800,...f,open:S,onCancel:e=>{g&&C||(M(!1),f?.onCancel?.(e))},afterClose:()=>{f?.destroyOnHidden&&A(),S&&M(!1),f?.afterClose?.()},footer:!1!==$.submitter?(0,d.jsx)("div",{ref:N,style:{display:"flex",justifyContent:"flex-end"}}):null,children:(0,d.jsx)(c.BaseForm,{formComponentType:"ModalForm",layout:"vertical",...$,onInit:(e,t)=>{$.formRef&&($.formRef.current=t),$?.onInit?.(e,t),j.current=t},formRef:j,submitter:P,onFinish:async e=>await I(e),contentRender:F,children:e})}),D]})}])},461550,e=>{"use strict";e.i(495059);var t=e.i(191788);e.i(644038);var r=e.i(839904),i=e.i(202917),o=e.i(146025),n=e.i(876352),a=e.i(449995);e.i(957562);var l=e.i(191248),s=e.i(56206),c=e.i(430898),d=e.i(993175);let u={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,railColor:"#D9D9D9",railWidth:1,gapPosition:"bottom",loading:!1};var m=e.i(572353);let f=({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 g=t.forwardRef((e,r)=>{let{prefixCls:i,color:o,gradientId:n,radius:a,className:l,style:c,ptg:d,strokeLinecap:u,strokeWidth:m,size:g,gapDegree:h}=e,b=o&&"object"==typeof o,y=g/2,$=t.createElement("circle",{className:(0,s.clsx)(`${i}-circle-path`,l),r:a,cx:y,cy:y,stroke:b?"#FFF":void 0,strokeLinecap:u,strokeWidth:m,opacity:+(0!==d),style:c,ref:r});if(!b)return $;let v=`${n}-conic`,k=h?`${180+h/2}deg`:"0deg",C=p(o,(360-h)/360),x=p(o,1),S=`conic-gradient(from ${k}, ${C.join(", ")})`,w=`linear-gradient(to ${h?"bottom":"top"}, ${x.join(", ")})`;return t.createElement(t.Fragment,null,t.createElement("mask",{id:v},$),t.createElement("foreignObject",{x:0,y:0,width:g,height:g,mask:`url(#${v})`},t.createElement(f,{bg:w},t.createElement(f,{bg:S}))))}),h=(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 b(){return(b=Object.assign.bind()).apply(this,arguments)}function y(e){let t=e??[];return Array.isArray(t)?t:[t]}var $=e=>{let r,i,o,n,a,l,{id:c,prefixCls:d,classNames:f={},styles:p={},steps:$,strokeWidth:v,railWidth:k,gapDegree:C=0,gapPosition:x,railColor:S,strokeLinecap:w,style:E,className:M,strokeColor:R,percent:N,loading:j,...A}={...u,...e},D=(0,m.default)(c),P=`${D}-gradient`,F=50-v/2,I=2*Math.PI*F,H=C>0?90+C/2:-90,T=(360-C)/360*I,{count:z,gap:B}="object"==typeof $?$:{count:$,gap:2},X=y(N),O=y(R),W=O.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:D,loading:j}),_=h(I,T,0,100,H,C,x,S,L,v),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",b({className:(0,s.clsx)(`${d}-circle`,f.root,M),viewBox:"0 0 100 100",style:{...p.root,...E},id:c,role:"presentation"},A),!z&&t.createElement("circle",{className:(0,s.clsx)(`${d}-circle-rail`,f.rail),r:F,cx:50,cy:50,stroke:S,strokeLinecap:L,strokeWidth:k||v,style:{..._,...p.rail}}),z?(o=Math.round(z*(X[0]/100)),n=100/z,a=0,Array(z).fill(null).map((e,r)=>{let i=r<=o-1?O[0]:S,l=i&&"object"==typeof i?`url(#${P})`:void 0,c=h(I,T,a,n,H,C,x,i,"butt",v,B);return a+=(T-c.strokeDashoffset+B)*100/T,t.createElement("circle",{key:r,className:(0,s.clsx)(`${d}-circle-path`,f.track),r:F,cx:50,cy:50,stroke:l,strokeWidth:v,opacity:1,style:{...c,...p.track},ref:e=>{K[r]=e}})})):(l=0,X.map((e,r)=>{let i=O[r]||O[O.length-1],o=h(I,T,l,e,H,C,x,i,L,v);return l+=e,t.createElement(g,{key:r,color:i,ptg:e,radius:F,prefixCls:d,gradientId:P,className:f.track,style:{...o,...Y,...p.track},strokeLinecap:L,strokeWidth:v,gapDegree:C,ref:e=>{K[r]=e},size:100})}).reverse()),q)},v=e.i(188304);e.i(797652);var k=e.i(435187);function C(e){return!e||e<0?0:e>100?100:e}function x({success:e}){let t;return e&&"percent"in e&&(t=e.percent),t}let S=(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):"number"==typeof 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):"number"==typeof 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]:"number"==typeof e?[i,o]=[e,e]:Array.isArray(e)&&(i=e[0]??e[1]??120,o=e[0]??e[1]??120));return[i,o]},w=["root","body","indicator"];var E=e=>{let{prefixCls:r,classNames:i,styles:o,railColor:n,trailColor:a,strokeLinecap:c="round",gapPosition:u,gapPlacement:m,gapDegree:f,width:p=120,type:g,children:h,success:b,size:y=p,steps:E}=e,{direction:M}=(0,d.useComponentConfig)("progress"),[R,N]=S(y,"circle"),{strokeWidth:j}=e;void 0===j&&(j=Math.max(3/R*100,6));let A=t.useMemo(()=>f||0===f?f:"dashboard"===g?75:void 0,[f,g]),D=(({percent:e,success:t})=>{let r=C(x({success:t}));return[r,C(C(e)-r)]})(e),P=t.useMemo(()=>{let e=(m??u)||"dashboard"===g&&"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,u,g]),F="[object Object]"===Object.prototype.toString.call(e.strokeColor),I=(({success:e={},strokeColor:t})=>{let{strokeColor:r}=e;return[r||k.presetPrimaryColors.green,t||null]})({success:b,strokeColor:e.strokeColor}),H=(0,s.clsx)(`${r}-body`,{[`${r}-circle-gradient`]:F},i.body),T=t.createElement($,{steps:E,percent:E?D[1]:D,strokeWidth:j,railWidth:j,strokeColor:E?I[1]:I,strokeLinecap:c,railColor:n??a,prefixCls:r,gapDegree:A,gapPosition:P,classNames:(0,l.omit)(i,w),styles:(0,l.omit)(o,w)}),z=R<=20,B=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},B):B};e.i(290586);var M=e.i(456161),R=e.i(307441),N=e.i(352050),j=e.i(104616);let A="--progress-line-stroke-color";var D=(0,N.genStyleHooks)("Progress",e=>{let t=e.calc(e.marginXXS).div(2).equal(),r=(0,j.mergeToken)(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{...(0,R.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 M.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`})),P=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:p,percentPosition:g,success:h}=e,{align:b,type:y}=g,$="square"===u||"butt"===u?0:void 0,[v,w]=S(l??[-1,c||("small"===l?6:8)],"line",{strokeWidth:c}),E=`${r}-track`,M=d&&"string"!=typeof d?((e,t)=>{let{from:r=k.presetPrimaryColors.blue,to:i=k.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,[A]:r}}let a=`linear-gradient(${o}, ${r}, ${i})`;return{background:a,[A]:a}})(d,n):{[A]:d,background:d},R={width:`${C(a)}%`,height:w,borderRadius:$,...M},N=x(e),j={width:`${C(N)}%`,height:w,borderRadius:$,backgroundColor:h?.strokeColor};return t.createElement("div",{className:(0,s.clsx)(`${r}-body`,i.body,{[`${r}-body-layout-bottom`]:"center"===b&&"outer"===y}),style:{width:v>0?v:"100%",...o.body}},t.createElement("div",{className:(0,s.clsx)(`${r}-rail`,i.rail),style:{backgroundColor:(f??p)||void 0,borderRadius:$,height:w,...o.rail}},t.createElement("div",{className:(0,s.clsx)(E,i.track),style:{...R,...o.track}},"inner"===y&&m),void 0!==N&&t.createElement("div",{className:(0,s.clsx)(E,`${E}-success`,i.track),style:{...j,...o.track}})),"outer"===y&&m)},F=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:p}=e,g=a(l/100*n),[h,b]=S(o??["small"===o?2:14,c],"step",{steps:n,strokeWidth:c}),y=h/n,$=Array.from({length:n}),v=u??m;for(let e=0;e<n;e++){let o=Array.isArray(d)?d[e]:d;$[e]=t.createElement("div",{key:e,className:(0,s.clsx)(`${f}-steps-item`,{[`${f}-steps-item-active`]:e<=g-1},r.track),style:{backgroundColor:e<=g-1?o:v,width:y,height:b,...i.track}})}return t.createElement("div",{className:(0,s.clsx)(`${f}-steps-body`,r.body),style:i.body},$,p)};let I=["normal","exception","active","success"],H=t.forwardRef((e,u)=>{let m,{prefixCls:f,className:p,rootClassName:g,classNames:h,styles:b,steps:y,strokeColor:$,percent:v=0,size:k="medium",showInfo:w=!0,type:M="line",status:R,format:N,style:j,percentPosition:A={},...H}=e,{align:T="end",type:z="outer"}=A,B=Array.isArray($)?$[0]:$,X="string"==typeof $||Array.isArray($)?$:void 0,O=t.useMemo(()=>{if(B){let e="string"==typeof B?B:Object.values(B)[0];return new r.FastColor(e).isLight()}return!1},[$]),W=t.useMemo(()=>{let t=x(e);return Number.parseInt(void 0!==t?(t??0)?.toString():(v??0)?.toString(),10)},[v,e.success]),L=t.useMemo(()=>!I.includes(R)&&W>=100?"success":R||"normal",[R,W]),{getPrefixCls:Y,direction:q,className:_,style:K,classNames:G,styles:U}=(0,d.useComponentConfig)("progress"),V=Y("progress",f),[Q,Z]=D(V),J={...e,percent:v,type:M,size:k,showInfo:w,percentPosition:A},[ee,et]=(0,c.useMergeSemantic)([G,h],[U,b],{props:J}),er="line"===M,ei=er&&!y,eo=t.useMemo(()=>{let r;if(!w)return null;let l=x(e),c=N||(e=>`${e}%`),d=er&&O&&"inner"===z;return"inner"===z||N||"exception"!==L&&"success"!==L?r=c(C(v),C(l)):"exception"===L?r=er?t.createElement(n.default,null):t.createElement(a.default,null):"success"===L&&(r=er?t.createElement(i.default,null):t.createElement(o.default,null)),t.createElement("span",{className:(0,s.clsx)(`${V}-indicator`,{[`${V}-indicator-bright`]:d,[`${V}-indicator-${T}`]:ei,[`${V}-indicator-${z}`]:ei},ee.indicator),style:et.indicator,title:"string"==typeof r?r:void 0},r)},[w,v,W,L,M,V,N,er,O,z,T,ei,ee.indicator,et.indicator]),en={...e,classNames:ee,styles:et};"line"===M?m=y?t.createElement(F,{...en,strokeColor:X,prefixCls:V,steps:"object"==typeof y?y.count:y},eo):t.createElement(P,{...en,strokeColor:B,prefixCls:V,direction:q,percentPosition:{align:T,type:z}},eo):("circle"===M||"dashboard"===M)&&(m=t.createElement(E,{...en,strokeColor:B,prefixCls:V,progressStatus:L},eo));let ea=(0,s.clsx)(V,`${V}-status-${L}`,{[`${V}-${"dashboard"===M&&"circle"||M}`]:"line"!==M,[`${V}-inline-circle`]:"circle"===M&&S(k,"circle")[0]<=20,[`${V}-line`]:ei,[`${V}-line-align-${T}`]:ei,[`${V}-line-position-${z}`]:ei,[`${V}-steps`]:y,[`${V}-show-info`]:w,[`${V}-small`]:"small"===k,[`${V}-rtl`]:"rtl"===q},_,p,g,ee.root,Q,Z);return t.createElement("div",{ref:u,style:{...K,...et.root,...j},className:ea,role:"progressbar","aria-valuenow":W,"aria-valuemin":0,"aria-valuemax":100,...(0,l.omit)(H,["railColor","trailColor","strokeWidth","width","gapDegree","gapPosition","gapPlacement","strokeLinecap","success"])},m)});e.s(["default",0,H],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:p,fieldProps:g,picker:h,lightLabel:b,variant:y},$)=>{let v=(0,n.useIntl)(),[k,C]=(0,o.useState)(!1);if("read"===i){var x;let t=(x=g.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,...g},(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=v.getMessage("tableForm.selectPlaceholder","请选择")}=g,x=(0,l.parseValueToDay)(n);return(r=u?(0,s.jsx)(a.FieldLabel,{label:d,onClick:()=>{g?.onOpenChange?.(!0),C(!0)},style:x?{paddingInlineEnd:0}:void 0,disabled:o,value:x||k?(0,s.jsx)(t.DatePicker,{picker:h,showTime:p,format:c,ref:$,...g,value:x,onOpenChange:e=>{C(e),g?.onOpenChange?.(e)},open:k}):void 0,allowClear:!1,downIcon:!x&&!k&&void 0,variant:y,ref:b}):(0,s.jsx)(t.DatePicker,{picker:h,showTime:p,format:c,placeholder:m,variant:y,ref:$,...g,value:x}),f)?f(e,{mode:i,...g},r):r}return null});e.s(["default",0,c])}]);
|