pixivflow 2.33.0 → 2.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +1 -1
- package/dist/version.js +1 -1
- package/dist/webui/package.json +1 -1
- package/dist/webui/routes/handlers/scheduler-handlers.d.ts +8 -0
- package/dist/webui/routes/handlers/scheduler-handlers.js +64 -0
- package/dist/webui/routes/scheduler.d.ts +3 -0
- package/dist/webui/routes/scheduler.js +8 -0
- package/dist/webui/server/server-routes.js +3 -0
- package/dist/webui/utils/error-codes.d.ts +1 -0
- package/dist/webui/utils/error-codes.js +2 -0
- package/package.json +1 -1
- package/webui-frontend/dist/assets/{CheckCircleOutlined-H3DnUyMO.js → CheckCircleOutlined-BS_TxY3k.js} +2 -2
- package/webui-frontend/dist/assets/{ClearOutlined-BpODq7I7.js → ClearOutlined-uIvWLBII.js} +2 -2
- package/webui-frontend/dist/assets/{CloseCircleOutlined-BFfS5iXd.js → CloseCircleOutlined-B45wvGw1.js} +2 -2
- package/webui-frontend/dist/assets/{Config-DRElCeDC.js → Config-UjgCA3Jq.js} +3 -3
- package/webui-frontend/dist/assets/Dashboard-hIW1nAN9.js +2 -0
- package/webui-frontend/dist/assets/{DeleteOutlined-BFmW1oWe.js → DeleteOutlined-ByQuZQbZ.js} +2 -2
- package/webui-frontend/dist/assets/Download-DdswOGH7.js +2 -0
- package/webui-frontend/dist/assets/{Files-nNoRY5tl.js → Files-DCMyqujj.js} +3 -3
- package/webui-frontend/dist/assets/{PictureOutlined-U51jGr2U.js → PictureOutlined-CSEKKDH9.js} +2 -2
- package/webui-frontend/dist/assets/{SortDescendingOutlined-CckVuL_b.js → SortDescendingOutlined-BS5Vnvjg.js} +2 -2
- package/webui-frontend/dist/assets/{useErrorHandler-BOvHue1w.js → Table-CvqrzZX2.js} +31 -31
- package/webui-frontend/dist/assets/ThunderboltOutlined-DhgtXoNM.js +2 -0
- package/webui-frontend/dist/assets/UrlDownload-BHF2qmgI.js +3 -0
- package/webui-frontend/dist/assets/{dateUtils-gQt2uAjS.js → dateUtils-CEt5gAeU.js} +2 -2
- package/webui-frontend/dist/assets/errorCodeTranslator-Xn_Z9qOh.js +2 -0
- package/webui-frontend/dist/assets/{index-CJln3zA7.js → index-6mtxs9yc.js} +3 -3
- package/webui-frontend/dist/assets/index-B4zZ11c-.js +20 -0
- package/webui-frontend/dist/assets/{index-CfHs6AUn.js → index-BlXTpFS3.js} +2 -2
- package/webui-frontend/dist/assets/index-BvgYmQcZ.js +2 -0
- package/webui-frontend/dist/assets/{index-B7yYDv10.js → index-C66Xw4Fs.js} +2 -2
- package/webui-frontend/dist/assets/index-Cg2Wi2pt.js +3 -0
- package/webui-frontend/dist/assets/{index-B2ns27ii.js → index-D4mbR-Vx.js} +2 -2
- package/webui-frontend/dist/assets/index-DV4iHo-9.js +19 -0
- package/webui-frontend/dist/assets/index-D_qUS2GR.js +2 -0
- package/webui-frontend/dist/assets/{index-DPigBPWX.js → index-DiwSYMD5.js} +2 -2
- package/webui-frontend/dist/assets/index-DpfbKoAX.js +2 -0
- package/webui-frontend/dist/assets/{index-DG6kGbYq.js → index-HJggy9SZ.js} +37 -37
- package/webui-frontend/dist/assets/{index-CDrp3NIf.js → index-NSEOZ6G5.js} +3 -3
- package/webui-frontend/dist/assets/index-ZRYuscJf.js +2 -0
- package/webui-frontend/dist/assets/index-eiyXJZci.js +22 -0
- package/webui-frontend/dist/assets/{index-_EG4kaKN.js → index-mHLzQpzS.js} +2 -2
- package/webui-frontend/dist/assets/row-CQQO4x82.js +2 -0
- package/webui-frontend/dist/assets/{useAuth-wCjAOx6S.js → useAuth-4erTEEjT.js} +4 -4
- package/webui-frontend/dist/assets/{useConfig-Ds7RpIL1.js → useConfig-BmhXnAiM.js} +2 -2
- package/webui-frontend/dist/assets/{useDownload-BlxvZNEm.js → useDownload-DhuPPKqw.js} +2 -2
- package/webui-frontend/dist/assets/useErrorHandler-Bcb3l7ju.js +2 -0
- package/webui-frontend/dist/index.html +1 -1
- package/webui-frontend/dist/assets/Dashboard-aqPMquSO.js +0 -2
- package/webui-frontend/dist/assets/Download-DCKDU51K.js +0 -2
- package/webui-frontend/dist/assets/ThunderboltOutlined-ulcCd7ui.js +0 -2
- package/webui-frontend/dist/assets/UrlDownload-Bzs0AZN0.js +0 -3
- package/webui-frontend/dist/assets/errorCodeTranslator-BqIackMm.js +0 -3
- package/webui-frontend/dist/assets/index-Bbsa44oT.js +0 -2
- package/webui-frontend/dist/assets/index-C2ANILg9.js +0 -19
- package/webui-frontend/dist/assets/index-CFtP5lqo.js +0 -22
- package/webui-frontend/dist/assets/index-CZhfhXvc.js +0 -2
- package/webui-frontend/dist/assets/index-DarObP-C.js +0 -2
- package/webui-frontend/dist/assets/row-_c51T55h.js +0 -20
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aZ as kt,x as je,A as ie,v as Ne,y as er,z as Ot,b3 as tr,a2 as B,r as a,n as W,p as tt,h as ge,_ as we,a4 as ce,o as _e,i as he,a7 as ze,a9 as Me,ag as rt,b7 as rr,ac as nt,E as It,G as zt,J as jt,K as Bt,H as Tt,L as At,t as ot,M as et,N as ut,P as Nt,k as Ee,ap as _t,m as ft,I as at,ca as nr,bE as Mt,ae as or,a3 as pt,al as ar,an as ir,Y as it,$ as lr,aN as sr,a6 as Ht,D as cr,aD as dr}from"./index-DG6kGbYq.js";var Pt=function(t){if(kt()&&window.document.documentElement){var n=Array.isArray(t)?t:[t],r=window.document.documentElement;return n.some(function(o){return o in r.style})}return!1},ur=function(t,n){if(!Pt(t))return!1;var r=document.createElement("div"),o=r.style[t];return r.style[t]=n,r.style[t]!==o};function gt(e,t){return!Array.isArray(e)&&t!==void 0?ur(e,t):Pt(e)}function lt(e){return je(e,{inputAffixPadding:e.paddingXXS})}const st=e=>{const{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:o,controlHeightSM:l,controlHeightLG:i,fontSizeLG:c,lineHeightLG:f,paddingSM:s,controlPaddingHorizontalSM:u,controlPaddingHorizontal:g,colorFillAlter:d,colorPrimaryHover:O,colorPrimary:C,controlOutlineWidth:x,controlOutline:_,colorErrorOutline:S,colorWarningOutline:E,colorBgContainer:V,inputFontSize:T,inputFontSizeLG:y,inputFontSizeSM:m}=e,p=T||n,U=m||p,H=y||c,R=Math.round((t-p*r)/2*10)/10-o,P=Math.round((l-U*r)/2*10)/10-o,k=Math.ceil((i-H*f)/2*10)/10-o;return{paddingBlock:Math.max(R,0),paddingBlockSM:Math.max(P,0),paddingBlockLG:Math.max(k,0),paddingInline:s-o,paddingInlineSM:u-o,paddingInlineLG:g-o,addonBg:d,activeBorderColor:C,hoverBorderColor:O,activeShadow:`0 0 0 ${x}px ${_}`,errorActiveShadow:`0 0 0 ${x}px ${S}`,warningActiveShadow:`0 0 0 ${x}px ${E}`,hoverBg:V,activeBg:V,inputFontSize:p,inputFontSizeLG:H,inputFontSizeSM:U}},fr=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),ct=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},fr(je(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),Dt=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),mt=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},Dt(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),pr=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Dt(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},ct(e))}),mt(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),mt(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),vt=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),gr=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},vt(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),vt(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},ct(e))}})}),mr=(e,t)=>{const{componentCls:n}=e;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}}},t)}},Lt=(e,t)=>{var n;return{background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(n=t?.inputColor)!==null&&n!==void 0?n:"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}},bt=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},Lt(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),vr=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Lt(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},ct(e))}),bt(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),bt(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),ht=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),br=e=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}}},ht(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),ht(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),Wt=(e,t)=>({background:e.colorBgContainer,borderWidth:`${ie(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.borderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),xt=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},Wt(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),hr=(e,t)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Wt(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),xt(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),xt(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),xr=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),Ft=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:o}=e;return{padding:`${ie(t)} ${ie(o)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},Vt=e=>({padding:`${ie(e.paddingBlockSM)} ${ie(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),Gt=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${ie(e.paddingBlock)} ${ie(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},xr(e.colorTextPlaceholder)),{"&-lg":Object.assign({},Ft(e)),"&-sm":Object.assign({},Vt(e)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),Sr=e=>{const{componentCls:t,antCls:n}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:Object.assign({},Ft(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},Vt(e)),[`&-lg ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${ie(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${ie(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${ie(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${ie(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}}},[`${n}-cascader-picker`]:{margin:`-9px ${ie(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:"block"},tr()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
1
|
+
import{aZ as kt,x as je,A as ie,v as Ne,y as er,z as Ot,b3 as tr,a2 as B,r as a,n as W,p as tt,h as ge,_ as we,a4 as ce,o as _e,i as he,a7 as ze,a9 as Me,ag as rt,b7 as rr,ac as nt,E as It,G as zt,J as jt,K as Bt,H as Tt,L as At,t as ot,M as et,N as ut,P as Nt,k as Ee,ap as _t,m as ft,I as at,cb as nr,bG as Mt,ae as or,a3 as pt,al as ar,an as ir,Y as it,$ as lr,aN as sr,a6 as Ht,D as cr,aD as dr}from"./index-HJggy9SZ.js";var Pt=function(t){if(kt()&&window.document.documentElement){var n=Array.isArray(t)?t:[t],r=window.document.documentElement;return n.some(function(o){return o in r.style})}return!1},ur=function(t,n){if(!Pt(t))return!1;var r=document.createElement("div"),o=r.style[t];return r.style[t]=n,r.style[t]!==o};function gt(e,t){return!Array.isArray(e)&&t!==void 0?ur(e,t):Pt(e)}function lt(e){return je(e,{inputAffixPadding:e.paddingXXS})}const st=e=>{const{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:o,controlHeightSM:l,controlHeightLG:i,fontSizeLG:c,lineHeightLG:f,paddingSM:s,controlPaddingHorizontalSM:u,controlPaddingHorizontal:g,colorFillAlter:d,colorPrimaryHover:O,colorPrimary:C,controlOutlineWidth:x,controlOutline:_,colorErrorOutline:S,colorWarningOutline:E,colorBgContainer:V,inputFontSize:T,inputFontSizeLG:y,inputFontSizeSM:m}=e,p=T||n,U=m||p,H=y||c,R=Math.round((t-p*r)/2*10)/10-o,P=Math.round((l-U*r)/2*10)/10-o,k=Math.ceil((i-H*f)/2*10)/10-o;return{paddingBlock:Math.max(R,0),paddingBlockSM:Math.max(P,0),paddingBlockLG:Math.max(k,0),paddingInline:s-o,paddingInlineSM:u-o,paddingInlineLG:g-o,addonBg:d,activeBorderColor:C,hoverBorderColor:O,activeShadow:`0 0 0 ${x}px ${_}`,errorActiveShadow:`0 0 0 ${x}px ${S}`,warningActiveShadow:`0 0 0 ${x}px ${E}`,hoverBg:V,activeBg:V,inputFontSize:p,inputFontSizeLG:H,inputFontSizeSM:U}},fr=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),ct=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},fr(je(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),Dt=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),mt=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},Dt(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),pr=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Dt(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},ct(e))}),mt(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),mt(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),vt=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),gr=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},vt(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),vt(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},ct(e))}})}),mr=(e,t)=>{const{componentCls:n}=e;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}}},t)}},Lt=(e,t)=>{var n;return{background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(n=t?.inputColor)!==null&&n!==void 0?n:"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}},bt=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},Lt(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),vr=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Lt(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},ct(e))}),bt(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),bt(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),ht=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),br=e=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}}},ht(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),ht(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),Wt=(e,t)=>({background:e.colorBgContainer,borderWidth:`${ie(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.borderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),xt=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},Wt(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),hr=(e,t)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Wt(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),xt(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),xt(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),xr=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),Ft=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:o}=e;return{padding:`${ie(t)} ${ie(o)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},Vt=e=>({padding:`${ie(e.paddingBlockSM)} ${ie(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),Gt=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${ie(e.paddingBlock)} ${ie(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},xr(e.colorTextPlaceholder)),{"&-lg":Object.assign({},Ft(e)),"&-sm":Object.assign({},Vt(e)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),Sr=e=>{const{componentCls:t,antCls:n}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:Object.assign({},Ft(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},Vt(e)),[`&-lg ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${ie(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${ie(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${ie(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${ie(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}}},[`${n}-cascader-picker`]:{margin:`-9px ${ie(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:"block"},tr()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
2
2
|
& > ${t}-affix-wrapper,
|
|
3
3
|
& > ${t}-number-affix-wrapper,
|
|
4
4
|
& > ${n}-picker-range
|
|
@@ -44,4 +44,4 @@ import{aZ as kt,x as je,A as ie,v as Ne,y as er,z as Ot,b3 as tr,a2 as B,r as a,
|
|
|
44
44
|
${t}-edit,
|
|
45
45
|
${t}-copy
|
|
46
46
|
`]:Object.assign(Object.assign({},Mt(e)),{marginInlineStart:e.marginXXS})}),an(e)),ln(e)),sn()),{"&-rtl":{direction:"rtl"}})}},dn=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),Zt=Ne("Typography",cn,dn),un=e=>{const{prefixCls:t,"aria-label":n,className:r,style:o,direction:l,maxLength:i,autoSize:c=!0,value:f,onSave:s,onCancel:u,onEnd:g,component:d,enterIcon:O=a.createElement(en,null)}=e,C=a.useRef(null),x=a.useRef(!1),_=a.useRef(null),[S,E]=a.useState(f);a.useEffect(()=>{E(f)},[f]),a.useEffect(()=>{var w;if(!((w=C.current)===null||w===void 0)&&w.resizableTextArea){const{textArea:I}=C.current.resizableTextArea;I.focus();const{length:b}=I.value;I.setSelectionRange(b,b)}},[]);const V=({target:w})=>{E(w.value.replace(/[\n\r]/g,""))},T=()=>{x.current=!0},y=()=>{x.current=!1},m=({keyCode:w})=>{x.current||(_.current=w)},p=()=>{s(S.trim())},U=({keyCode:w,ctrlKey:I,altKey:b,metaKey:A,shiftKey:h})=>{_.current!==w||x.current||I||b||A||h||(w===pt.ENTER?(p(),g?.()):w===pt.ESC&&u())},H=()=>{p()},[R,P,k]=Zt(t),$=W(t,`${t}-edit-content`,{[`${t}-rtl`]:l==="rtl",[`${t}-${d}`]:!!d},r,P,k);return R(a.createElement("div",{className:$,style:o},a.createElement(qr,{ref:C,maxLength:i,value:S,onChange:V,onKeyDown:m,onKeyUp:U,onCompositionStart:T,onCompositionEnd:y,onBlur:H,"aria-label":n,rows:1,autoSize:c}),O!==null?or(O,{className:`${t}-edit-content-confirm`}):null))};var Ke,yt;function fn(){return yt||(yt=1,Ke=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(o){e.addRange(o)}),t&&t.focus()}}),Ke}var qe,Ct;function pn(){if(Ct)return qe;Ct=1;var e=fn(),t={"text/plain":"Text","text/html":"Url",default:"Text"},n="Copy to clipboard: #{key}, Enter";function r(l){var i=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return l.replace(/#{\s*key\s*}/g,i)}function o(l,i){var c,f,s,u,g,d,O=!1;i||(i={}),c=i.debug||!1;try{s=e(),u=document.createRange(),g=document.getSelection(),d=document.createElement("span"),d.textContent=l,d.ariaHidden="true",d.style.all="unset",d.style.position="fixed",d.style.top=0,d.style.clip="rect(0, 0, 0, 0)",d.style.whiteSpace="pre",d.style.webkitUserSelect="text",d.style.MozUserSelect="text",d.style.msUserSelect="text",d.style.userSelect="text",d.addEventListener("copy",function(x){if(x.stopPropagation(),i.format)if(x.preventDefault(),typeof x.clipboardData>"u"){c&&console.warn("unable to use e.clipboardData"),c&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var _=t[i.format]||t.default;window.clipboardData.setData(_,l)}else x.clipboardData.clearData(),x.clipboardData.setData(i.format,l);i.onCopy&&(x.preventDefault(),i.onCopy(x.clipboardData))}),document.body.appendChild(d),u.selectNodeContents(d),g.addRange(u);var C=document.execCommand("copy");if(!C)throw new Error("copy command was unsuccessful");O=!0}catch(x){c&&console.error("unable to copy using execCommand: ",x),c&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(i.format||"text",l),i.onCopy&&i.onCopy(window.clipboardData),O=!0}catch(_){c&&console.error("unable to copy using clipboardData: ",_),c&&console.error("falling back to prompt"),f=r("message"in i?i.message:n),window.prompt(f,l)}}finally{g&&(typeof g.removeRange=="function"?g.removeRange(u):g.removeAllRanges()),d&&document.body.removeChild(d),s()}return O}return qe=o,qe}var gn=pn();const mn=ar(gn);var vn=function(e,t,n,r){function o(l){return l instanceof n?l:new n(function(i){i(l)})}return new(n||(n=Promise))(function(l,i){function c(u){try{s(r.next(u))}catch(g){i(g)}}function f(u){try{s(r.throw(u))}catch(g){i(g)}}function s(u){u.done?l(u.value):o(u.value).then(c,f)}s((r=r.apply(e,t||[])).next())})};const bn=({copyConfig:e,children:t})=>{const[n,r]=a.useState(!1),[o,l]=a.useState(!1),i=a.useRef(null),c=()=>{i.current&&clearTimeout(i.current)},f={};e.format&&(f.format=e.format),a.useEffect(()=>c,[]);const s=ir(u=>vn(void 0,void 0,void 0,function*(){var g;u?.preventDefault(),u?.stopPropagation(),l(!0);try{const d=typeof e.text=="function"?yield e.text():e.text;mn(d||Xr(t,!0).join("")||"",f),l(!1),r(!0),c(),i.current=setTimeout(()=>{r(!1)},3e3),(g=e.onCopy)===null||g===void 0||g.call(e,u)}catch(d){throw l(!1),d}}));return{copied:n,copyLoading:o,onClick:s}};function Xe(e,t){return a.useMemo(()=>{const n=!!e;return[n,Object.assign(Object.assign({},t),n&&typeof e=="object"?e:null)]},[e])}const hn=e=>{const t=a.useRef(void 0);return a.useEffect(()=>{t.current=e}),t.current},xn=(e,t,n)=>a.useMemo(()=>e===!0?{title:t??n}:a.isValidElement(e)?{title:e}:typeof e=="object"?Object.assign({title:t??n},e):{title:e},[e,t,n]);var Sn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const Jt=a.forwardRef((e,t)=>{const{prefixCls:n,component:r="article",className:o,rootClassName:l,setContentRef:i,children:c,direction:f,style:s}=e,u=Sn(e,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:g,direction:d,className:O,style:C}=nt("typography"),x=f??d,_=i?ot(t,i):t,S=g("typography",n),[E,V,T]=Zt(S),y=W(S,O,{[`${S}-rtl`]:x==="rtl"},o,l,V,T),m=Object.assign(Object.assign({},C),s);return E(a.createElement(r,Object.assign({className:y,style:m,ref:_},u),c))});var yn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},Cn=function(t,n){return a.createElement(at,we({},t,{ref:n,icon:yn}))},$n=a.forwardRef(Cn);function $t(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}function Ye(e,t,n){return e===!0||e===void 0?t:e||n&&t}function En(e){const t=document.createElement("em");e.appendChild(t);const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return e.removeChild(t),n.left>r.left||r.right>n.right||n.top>r.top||r.bottom>n.bottom}const dt=e=>["string","number"].includes(typeof e),wn=({prefixCls:e,copied:t,locale:n,iconOnly:r,tooltips:o,icon:l,tabIndex:i,onCopy:c,loading:f})=>{const s=$t(o),u=$t(l),{copied:g,copy:d}=n??{},O=t?g:d,C=Ye(s[t?1:0],O),x=typeof C=="string"?C:O;return a.createElement(it,{title:C},a.createElement("button",{type:"button",className:W(`${e}-copy`,{[`${e}-copy-success`]:t,[`${e}-copy-icon-only`]:r}),onClick:c,"aria-label":x,tabIndex:i},t?Ye(u[1],a.createElement(lr,null),!0):Ye(u[0],f?a.createElement(sr,null):a.createElement($n,null),!0)))},Be=a.forwardRef(({style:e,children:t},n)=>{const r=a.useRef(null);return a.useImperativeHandle(n,()=>({isExceed:()=>{const o=r.current;return o.scrollHeight>o.clientHeight},getHeight:()=>r.current.clientHeight})),a.createElement("span",{"aria-hidden":!0,ref:r,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},e)},t)}),Rn=e=>e.reduce((t,n)=>t+(dt(n)?String(n).length:1),0);function Et(e,t){let n=0;const r=[];for(let o=0;o<e.length;o+=1){if(n===t)return r;const l=e[o],c=dt(l)?String(l).length:1,f=n+c;if(f>t){const s=t-n;return r.push(String(l).slice(0,s)),r}r.push(l),n=f}return e}const Ze=0,Je=1,Qe=2,ke=3,wt=4,Te={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function On(e){const{enableMeasure:t,width:n,text:r,children:o,rows:l,expanded:i,miscDeps:c,onEllipsis:f}=e,s=a.useMemo(()=>Ht(r),[r]),u=a.useMemo(()=>Rn(s),[r]),g=a.useMemo(()=>o(s,!1),[r]),[d,O]=a.useState(null),C=a.useRef(null),x=a.useRef(null),_=a.useRef(null),S=a.useRef(null),E=a.useRef(null),[V,T]=a.useState(!1),[y,m]=a.useState(Ze),[p,U]=a.useState(0),[H,R]=a.useState(null);Ee(()=>{m(t&&n&&u?Je:Ze)},[n,r,l,t,s]),Ee(()=>{var w,I,b,A;if(y===Je){m(Qe);const h=x.current&&getComputedStyle(x.current).whiteSpace;R(h)}else if(y===Qe){const h=!!(!((w=_.current)===null||w===void 0)&&w.isExceed());m(h?ke:wt),O(h?[0,u]:null),T(h);const ee=((I=_.current)===null||I===void 0?void 0:I.getHeight())||0,J=l===1?0:((b=S.current)===null||b===void 0?void 0:b.getHeight())||0,te=((A=E.current)===null||A===void 0?void 0:A.getHeight())||0,F=Math.max(ee,J+te);U(F+1),f(h)}},[y]);const P=d?Math.ceil((d[0]+d[1])/2):0;Ee(()=>{var w;const[I,b]=d||[0,0];if(I!==b){const h=(((w=C.current)===null||w===void 0?void 0:w.getHeight())||0)>p;let ee=P;b-I===1&&(ee=h?I:b),O(h?[I,ee]:[ee,b])}},[d,P]);const k=a.useMemo(()=>{if(!t)return o(s,!1);if(y!==ke||!d||d[0]!==d[1]){const w=o(s,!1);return[wt,Ze].includes(y)?w:a.createElement("span",{style:Object.assign(Object.assign({},Te),{WebkitLineClamp:l})},w)}return o(i?s:Et(s,d[0]),V)},[i,y,d,s].concat(Me(c))),$={width:n,margin:0,padding:0,whiteSpace:H==="nowrap"?"normal":"inherit"};return a.createElement(a.Fragment,null,k,y===Qe&&a.createElement(a.Fragment,null,a.createElement(Be,{style:Object.assign(Object.assign(Object.assign({},$),Te),{WebkitLineClamp:l}),ref:_},g),a.createElement(Be,{style:Object.assign(Object.assign(Object.assign({},$),Te),{WebkitLineClamp:l-1}),ref:S},g),a.createElement(Be,{style:Object.assign(Object.assign(Object.assign({},$),Te),{WebkitLineClamp:1}),ref:E},o([],!0))),y===ke&&d&&d[0]!==d[1]&&a.createElement(Be,{style:Object.assign(Object.assign({},$),{top:400}),ref:C},o(Et(s,P),!0)),y===Je&&a.createElement("span",{style:{whiteSpace:"inherit"},ref:x}))}const In=({enableEllipsis:e,isEllipsis:t,children:n,tooltipProps:r})=>!r?.title||!e?n:a.createElement(it,Object.assign({open:t?void 0:!1},r),n);var zn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function jn({mark:e,code:t,underline:n,delete:r,strong:o,keyboard:l,italic:i},c){let f=c;function s(u,g){g&&(f=a.createElement(u,{},f))}return s("strong",o),s("u",n),s("del",r),s("code",t),s("mark",e),s("kbd",l),s("i",i),f}const Bn="...",Rt=["delete","mark","code","underline","strong","keyboard","italic"],He=a.forwardRef((e,t)=>{var n;const{prefixCls:r,className:o,style:l,type:i,disabled:c,children:f,ellipsis:s,editable:u,copyable:g,component:d,title:O}=e,C=zn(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:x,direction:_}=a.useContext(cr),[S]=dr("Text"),E=a.useRef(null),V=a.useRef(null),T=x("typography",r),y=rt(C,Rt),[m,p]=Xe(u),[U,H]=ze(!1,{value:p.editing}),{triggerType:R=["icon"]}=p,P=v=>{var N;v&&((N=p.onStart)===null||N===void 0||N.call(p)),H(v)},k=hn(U);Ee(()=>{var v;!U&&k&&((v=V.current)===null||v===void 0||v.focus())},[U]);const $=v=>{v?.preventDefault(),P(!0)},w=v=>{var N;(N=p.onChange)===null||N===void 0||N.call(p,v),P(!1)},I=()=>{var v;(v=p.onCancel)===null||v===void 0||v.call(p),P(!1)},[b,A]=Xe(g),{copied:h,copyLoading:ee,onClick:J}=bn({copyConfig:A,children:f}),[te,F]=a.useState(!1),[X,fe]=a.useState(!1),[de,Q]=a.useState(!1),[me,Y]=a.useState(!1),[le,Z]=a.useState(!0),[ne,q]=Xe(s,{expandable:!1,symbol:v=>v?S?.collapse:S?.expand}),[ae,ue]=ze(q.defaultExpanded||!1,{value:q.expanded}),K=ne&&(!ae||q.expandable==="collapsible"),{rows:z=1}=q,M=a.useMemo(()=>K&&(q.suffix!==void 0||q.onEllipsis||q.expandable||m||b),[K,q,m,b]);Ee(()=>{ne&&!M&&(F(gt("webkitLineClamp")),fe(gt("textOverflow")))},[M,ne]);const[D,se]=a.useState(K),Oe=a.useMemo(()=>M?!1:z===1?X:te,[M,X,te]);Ee(()=>{se(Oe&&K)},[Oe,K]);const Re=K&&(D?me:de),Ie=K&&z===1&&D,G=K&&z>1&&D,j=(v,N)=>{var Ce;ue(N.expanded),(Ce=q.onExpand)===null||Ce===void 0||Ce.call(q,v,N)},[re,$e]=a.useState(0),xe=({offsetWidth:v})=>{$e(v)},ve=v=>{var N;Q(v),de!==v&&((N=q.onEllipsis)===null||N===void 0||N.call(q,v))};a.useEffect(()=>{const v=E.current;if(ne&&D&&v){const N=En(v);me!==N&&Y(N)}},[ne,D,f,G,le,re]),a.useEffect(()=>{const v=E.current;if(typeof IntersectionObserver>"u"||!v||!D||!K)return;const N=new IntersectionObserver(()=>{Z(!!v.offsetParent)});return N.observe(v),()=>{N.disconnect()}},[D,K]);const be=xn(q.tooltip,p.text,f),Se=a.useMemo(()=>{if(!(!ne||D))return[p.text,f,O,be.title].find(dt)},[ne,D,O,be.title,Re]);if(U)return a.createElement(un,{value:(n=p.text)!==null&&n!==void 0?n:typeof f=="string"?f:"",onSave:w,onCancel:I,onEnd:p.onEnd,prefixCls:T,className:o,style:l,direction:_,component:d,maxLength:p.maxLength,autoSize:p.autoSize,enterIcon:p.enterIcon});const De=()=>{const{expandable:v,symbol:N}=q;return v?a.createElement("button",{type:"button",key:"expand",className:`${T}-${ae?"collapse":"expand"}`,onClick:Ce=>j(Ce,{expanded:!ae}),"aria-label":ae?S.collapse:S?.expand},typeof N=="function"?N(ae):N):null},Le=()=>{if(!m)return;const{icon:v,tooltip:N,tabIndex:Ce}=p,We=Ht(N)[0]||S?.edit,Qt=typeof We=="string"?We:"";return R.includes("icon")?a.createElement(it,{key:"edit",title:N===!1?"":We},a.createElement("button",{type:"button",ref:V,className:`${T}-edit`,onClick:$,"aria-label":Qt,tabIndex:Ce},v||a.createElement(Jr,{role:"button"}))):null},oe=()=>b?a.createElement(wn,Object.assign({key:"copy"},A,{prefixCls:T,copied:h,locale:S,onCopy:J,loading:ee,iconOnly:f==null})):null,L=v=>[v&&De(),Le(),oe()],ye=v=>[v&&!ae&&a.createElement("span",{"aria-hidden":!0,key:"ellipsis"},Bn),q.suffix,L(v)];return a.createElement(_t,{onResize:xe,disabled:!K},v=>a.createElement(In,{tooltipProps:be,enableEllipsis:K,isEllipsis:Re},a.createElement(Jt,Object.assign({className:W({[`${T}-${i}`]:i,[`${T}-disabled`]:c,[`${T}-ellipsis`]:ne,[`${T}-ellipsis-single-line`]:Ie,[`${T}-ellipsis-multiple-line`]:G},o),prefixCls:r,style:Object.assign(Object.assign({},l),{WebkitLineClamp:G?z:void 0}),component:d,ref:ot(v,E,t),direction:_,onClick:R.includes("text")?$:void 0,"aria-label":Se?.toString(),title:O},y),a.createElement(On,{enableMeasure:K&&!D,text:f,rows:z,width:re,onEllipsis:ve,expanded:ae,miscDeps:[h,ae,ee,m,b,S].concat(Me(Rt.map(N=>e[N])))},(N,Ce)=>jn(e,a.createElement(a.Fragment,null,N.length>0&&Ce&&!ae&&Se?a.createElement("span",{key:"show-content","aria-hidden":!0},N):N,ye(Ce)))))))});var Tn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const An=a.forwardRef((e,t)=>{const{ellipsis:n,rel:r,children:o,navigate:l}=e,i=Tn(e,["ellipsis","rel","children","navigate"]),c=Object.assign(Object.assign({},i),{rel:r===void 0&&i.target==="_blank"?"noopener noreferrer":r});return a.createElement(He,Object.assign({},c,{ref:t,ellipsis:!!n,component:"a"}),o)});var Nn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const _n=a.forwardRef((e,t)=>{const{children:n}=e,r=Nn(e,["children"]);return a.createElement(He,Object.assign({ref:t},r,{component:"div"}),n)});var Mn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const Hn=(e,t)=>{const{ellipsis:n,children:r}=e,o=Mn(e,["ellipsis","children"]),l=a.useMemo(()=>n&&typeof n=="object"?rt(n,["expandable","rows"]):n,[n]);return a.createElement(He,Object.assign({ref:t},o,{ellipsis:l,component:"span"}),r)},Pn=a.forwardRef(Hn);var Dn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const Ln=[1,2,3,4,5],Wn=a.forwardRef((e,t)=>{const{level:n=1,children:r}=e,o=Dn(e,["level","children"]),l=Ln.includes(n)?`h${n}`:"h1";return a.createElement(He,Object.assign({ref:t},o,{component:l}),r)}),Pe=Jt;Pe.Text=Pn;Pe.Link=An;Pe.Title=Wn;Pe.Paragraph=_n;export{qt as B,Vn as I,$n as R,Pe as T,lt as a,pr as b,vr as c,hr as d,mr as e,xr as f,Gt as g,Sr as h,st as i,gr as j,br as k,Jr as l,gt as m,Dt as n,ct as o,Vt as p,Ar as q,qr as r,Kt as t,Or as u};
|
|
47
|
-
//# sourceMappingURL=index-
|
|
47
|
+
//# sourceMappingURL=index-mHLzQpzS.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{v as P,x as W,A as k,r as f,D as A,n as L}from"./index-HJggy9SZ.js";import{r as v,u as X}from"./index-B4zZ11c-.js";const _=e=>{const{componentCls:n}=e;return{[n]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},H=e=>{const{componentCls:n}=e;return{[n]:{position:"relative",maxWidth:"100%",minHeight:1}}},J=(e,n)=>{const{prefixCls:l,componentCls:t,gridColumns:r}=e,o={};for(let s=r;s>=0;s--)s===0?(o[`${t}${n}-${s}`]={display:"none"},o[`${t}-push-${s}`]={insetInlineStart:"auto"},o[`${t}-pull-${s}`]={insetInlineEnd:"auto"},o[`${t}${n}-push-${s}`]={insetInlineStart:"auto"},o[`${t}${n}-pull-${s}`]={insetInlineEnd:"auto"},o[`${t}${n}-offset-${s}`]={marginInlineStart:0},o[`${t}${n}-order-${s}`]={order:0}):(o[`${t}${n}-${s}`]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:`0 0 ${s/r*100}%`,maxWidth:`${s/r*100}%`}],o[`${t}${n}-push-${s}`]={insetInlineStart:`${s/r*100}%`},o[`${t}${n}-pull-${s}`]={insetInlineEnd:`${s/r*100}%`},o[`${t}${n}-offset-${s}`]={marginInlineStart:`${s/r*100}%`},o[`${t}${n}-order-${s}`]={order:s});return o[`${t}${n}-flex`]={flex:`var(--${l}${n}-flex)`},o},E=(e,n)=>J(e,n),T=(e,n,l)=>({[`@media (min-width: ${k(n)})`]:Object.assign({},E(e,l))}),B=()=>({}),D=()=>({}),F=P("Grid",_,B),q=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin}),K=P("Grid",e=>{const n=W(e,{gridColumns:24}),l=q(n);return delete l.xs,[H(n),E(n,""),E(n,"-xs"),Object.keys(l).map(t=>T(n,l[t],`-${t}`)).reduce((t,r)=>Object.assign(Object.assign({},t),r),{})]},D),V=f.createContext({});var Q=function(e,n){var l={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(l[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r<t.length;r++)n.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(e,t[r])&&(l[t[r]]=e[t[r]]);return l};function R(e){return e==="auto"?"1 1 auto":typeof e=="number"?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}const U=["xs","sm","md","lg","xl","xxl"],te=f.forwardRef((e,n)=>{const{getPrefixCls:l,direction:t}=f.useContext(A),{gutter:r,wrap:o}=f.useContext(V),{prefixCls:s,span:u,order:y,offset:g,push:h,pull:S,className:M,children:x,flex:b,style:O}=e,d=Q(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),i=l("col",s),[I,G,$]=K(i),j={};let m={};U.forEach(c=>{let a={};const w=e[c];typeof w=="number"?a.span=w:typeof w=="object"&&(a=w||{}),delete d[c],m=Object.assign(Object.assign({},m),{[`${i}-${c}-${a.span}`]:a.span!==void 0,[`${i}-${c}-order-${a.order}`]:a.order||a.order===0,[`${i}-${c}-offset-${a.offset}`]:a.offset||a.offset===0,[`${i}-${c}-push-${a.push}`]:a.push||a.push===0,[`${i}-${c}-pull-${a.pull}`]:a.pull||a.pull===0,[`${i}-rtl`]:t==="rtl"}),a.flex&&(m[`${i}-${c}-flex`]=!0,j[`--${i}-${c}-flex`]=R(a.flex))});const C=L(i,{[`${i}-${u}`]:u!==void 0,[`${i}-order-${y}`]:y,[`${i}-offset-${g}`]:g,[`${i}-push-${h}`]:h,[`${i}-pull-${S}`]:S},M,m,G,$),p={};if(r?.[0]){const c=typeof r[0]=="number"?`${r[0]/2}px`:`calc(${r[0]} / 2)`;p.paddingLeft=c,p.paddingRight=c}return b&&(p.flex=R(b),o===!1&&!p.minWidth&&(p.minWidth=0)),I(f.createElement("div",Object.assign({},d,{style:Object.assign(Object.assign(Object.assign({},p),O),j),className:C,ref:n}),x))});function Y(e,n){const l=[void 0,void 0],t=Array.isArray(e)?e:[e,void 0],r=n||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0};return t.forEach((o,s)=>{if(typeof o=="object"&&o!==null)for(let u=0;u<v.length;u++){const y=v[u];if(r[y]&&o[y]!==void 0){l[s]=o[y];break}}else l[s]=o}),l}var Z=function(e,n){var l={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(l[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r<t.length;r++)n.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(e,t[r])&&(l[t[r]]=e[t[r]]);return l};function N(e,n){const[l,t]=f.useState(typeof e=="string"?e:""),r=()=>{if(typeof e=="string"&&t(e),typeof e=="object")for(let o=0;o<v.length;o++){const s=v[o];if(!n||!n[s])continue;const u=e[s];if(u!==void 0){t(u);return}}};return f.useEffect(()=>{r()},[JSON.stringify(e),n]),l}const ne=f.forwardRef((e,n)=>{const{prefixCls:l,justify:t,align:r,className:o,style:s,children:u,gutter:y=0,wrap:g}=e,h=Z(e,["prefixCls","justify","align","className","style","children","gutter","wrap"]),{getPrefixCls:S,direction:M}=f.useContext(A),x=X(!0,null),b=N(r,x),O=N(t,x),d=S("row",l),[i,I,G]=F(d),$=Y(y,x),j=L(d,{[`${d}-no-wrap`]:g===!1,[`${d}-${O}`]:O,[`${d}-${b}`]:b,[`${d}-rtl`]:M==="rtl"},o,I,G),m={};if($?.[0]){const a=typeof $[0]=="number"?`${$[0]/-2}px`:`calc(${$[0]} / -2)`;m.marginLeft=a,m.marginRight=a}const[C,p]=$;m.rowGap=p;const c=f.useMemo(()=>({gutter:[C,p],wrap:g}),[C,p,g]);return i(f.createElement(V.Provider,{value:c},f.createElement("div",Object.assign({},h,{className:j,style:Object.assign(Object.assign({},m),s),ref:n}),u)))});export{te as C,ne as R,q as g};
|
|
2
|
+
//# sourceMappingURL=row-CQQO4x82.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{r as o,v as He,aa as dt,
|
|
1
|
+
import{r as o,v as He,aa as dt,bM as qe,x as Xe,z as $e,A as ie,bN as Se,E as xe,af as Ne,a9 as Q,a5 as mt,n as X,bO as ft,K as gt,ac as pt,J as bt,bP as ht,bQ as yt,a$ as vt,bR as Ct,bS as Ke,bT as J,bU as $t,bV as St,a6 as xt,H as ue,m as Fe,bW as Et,t as wt,b2 as It,bw as Me,bX as Ot,k as Ge,I as Pt,_ as Ue,aD as jt,Y as Qe,bc as Nt,aN as Ft,b7 as Ye,b6 as Mt,b8 as Ze,ao as _t,ag as Je,bY as et,D as Ee,bZ as Rt,bo as kt,b_ as Tt,be as Lt,b$ as At,bu as Wt,ae as Dt,c0 as Vt,c1 as zt,i as Bt,aZ as Ht,p as le,a4 as _e,o as qt,c2 as Ce,aK as Xt,F as Kt,aS as Gt,$ as Ut,U as Qt,u as Yt,bK as Zt,a as Re,Q as ke}from"./index-HJggy9SZ.js";import{a as tt,g as rt,t as he,b as Jt}from"./index-Cg2Wi2pt.js";import{C as nt,R as er}from"./row-CQQO4x82.js";import{u as tr}from"./errorCodeTranslator-Xn_Z9qOh.js";function rr(e){return e==null?null:typeof e=="object"&&!o.isValidElement(e)?e:{title:e}}function de(e){const[t,r]=o.useState(e);return o.useEffect(()=>{const n=setTimeout(()=>{r(e)},e.length?0:10);return()=>{clearTimeout(n)}},[e]),t}const nr=e=>{const{componentCls:t}=e,r=`${t}-show-help`,n=`${t}-show-help-item`;return{[r]:{transition:`opacity ${e.motionDurationFast} ${e.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[n]:{overflow:"hidden",transition:`height ${e.motionDurationFast} ${e.motionEaseInOut},
|
|
2
2
|
opacity ${e.motionDurationFast} ${e.motionEaseInOut},
|
|
3
|
-
transform ${e.motionDurationFast} ${e.motionEaseInOut} !important`,[`&${n}-appear, &${n}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${n}-leave-active`]:{transform:"translateY(-5px)"}}}}},or=e=>({legend:{display:"block",width:"100%",marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${ie(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:"block",paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),
|
|
3
|
+
transform ${e.motionDurationFast} ${e.motionEaseInOut} !important`,[`&${n}-appear, &${n}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${n}-leave-active`]:{transform:"translateY(-5px)"}}}}},or=e=>({legend:{display:"block",width:"100%",marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${ie(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:"block",paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),Te=(e,t)=>{const{formItemCls:r}=e;return{[r]:{[`${r}-label > label`]:{height:t},[`${r}-control-input`]:{minHeight:t}}}},ar=e=>{const{componentCls:t}=e;return{[e.componentCls]:Object.assign(Object.assign(Object.assign({},$e(e)),or(e)),{[`${t}-text`]:{display:"inline-block",paddingInlineEnd:e.paddingSM},"&-small":Object.assign({},Te(e,e.controlHeightSM)),"&-large":Object.assign({},Te(e,e.controlHeightLG))})}},ir=e=>{const{formItemCls:t,iconCls:r,rootPrefixCls:n,antCls:a,labelRequiredMarkColor:s,labelColor:i,labelFontSize:l,labelHeight:u,labelColonMarginInlineStart:d,labelColonMarginInlineEnd:m,itemMarginBottom:f}=e;return{[t]:Object.assign(Object.assign({},$e(e)),{marginBottom:f,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
4
4
|
&-hidden${a}-row`]:{display:"none"},"&-has-warning":{[`${t}-split`]:{color:e.colorError}},"&-has-error":{[`${t}-split`]:{color:e.colorWarning}},[`${t}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:e.lineHeight,whiteSpace:"unset","> label":{verticalAlign:"middle",textWrap:"balance"}},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:u,color:i,fontSize:l,[`> ${r}`]:{fontSize:e.fontSize,verticalAlign:"top"},[`&${t}-required`]:{"&::before":{display:"inline-block",marginInlineEnd:e.marginXXS,color:s,fontSize:e.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"'},[`&${t}-required-mark-hidden, &${t}-required-mark-optional`]:{"&::before":{display:"none"}}},[`${t}-optional`]:{display:"inline-block",marginInlineStart:e.marginXXS,color:e.colorTextDescription,[`&${t}-required-mark-hidden`]:{display:"none"}},[`${t}-tooltip`]:{color:e.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:e.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:d,marginInlineEnd:m},[`&${t}-no-colon::after`]:{content:'"\\a0"'}}},[`${t}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${n}-col-'"]):not([class*="' ${n}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:e.controlHeight,"&-content":{flex:"auto",maxWidth:"100%",[`&:has(> ${a}-switch:only-child, > ${a}-rate:only-child)`]:{display:"flex",alignItems:"center"}}}},[t]:{"&-additional":{display:"flex",flexDirection:"column"},"&-explain, &-extra":{clear:"both",color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:e.controlHeightSM,transition:`color ${e.motionDurationMid} ${e.motionEaseOut}`},"&-explain":{"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning}}},[`&-with-help ${t}-explain`]:{height:"auto",opacity:1},[`${t}-feedback-icon`]:{fontSize:e.fontSize,textAlign:"center",visibility:"visible",animationName:qe,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:"none","&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}})}},ae=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),sr=e=>{const{antCls:t,formItemCls:r}=e;return{[`${r}-horizontal`]:{[`${r}-label`]:{flexGrow:0},[`${r}-control`]:{flex:"1 1 0",minWidth:0},[`${r}-label[class$='-24'], ${r}-label[class*='-24 ']`]:{[`& + ${r}-control`]:{minWidth:"unset"}},[`${t}-col-24${r}-label,
|
|
5
5
|
${t}-col-xl-24${r}-label`]:ae(e)}}},lr=e=>{const{componentCls:t,formItemCls:r,inlineItemMarginBottom:n}=e;return{[`${t}-inline`]:{display:"flex",flexWrap:"wrap",[`${r}-inline`]:{flex:"none",marginInlineEnd:e.margin,marginBottom:n,"&-row":{flexWrap:"nowrap"},[`> ${r}-label,
|
|
6
6
|
> ${r}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${r}-label`]:{flex:"none"},[`${t}-text`]:{display:"inline-block"},[`${r}-has-feedback`]:{display:"inline-block"}}}}},cr=e=>{const{componentCls:t,formItemCls:r,rootPrefixCls:n}=e;return{[`${r} ${r}-label`]:ae(e),[`${t}:not(${t}-inline)`]:{[r]:{flexWrap:"wrap",[`${r}-label, ${r}-control`]:{[`&:not([class*=" ${n}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},ur=e=>{const{componentCls:t,formItemCls:r,antCls:n}=e;return{[`${r}-vertical`]:{[`${r}-row`]:{flexDirection:"column"},[`${r}-label > label`]:{height:"auto"},[`${r}-control`]:{width:"100%"},[`${r}-label,
|
|
7
7
|
${n}-col-24${r}-label,
|
|
8
|
-
${n}-col-xl-24${r}-label`]:ae(e)},[`@media (max-width: ${ie(e.screenXSMax)})`]:[cr(e),{[t]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-xs-24${r}-label`]:ae(e)}}}],[`@media (max-width: ${ie(e.screenSMMax)})`]:{[t]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-sm-24${r}-label`]:ae(e)}}},[`@media (max-width: ${ie(e.screenMDMax)})`]:{[t]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-md-24${r}-label`]:ae(e)}}},[`@media (max-width: ${ie(e.screenLGMax)})`]:{[t]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-lg-24${r}-label`]:ae(e)}}}}},dr=e=>({labelRequiredMarkColor:e.colorError,labelColor:e.colorTextHeading,labelFontSize:e.fontSize,labelHeight:e.controlHeight,labelColonMarginInlineStart:e.marginXXS/2,labelColonMarginInlineEnd:e.marginXS,itemMarginBottom:e.marginLG,verticalLabelPadding:`0 0 ${e.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),ot=(e,t)=>Xe(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:t}),we=He("Form",(e,{rootPrefixCls:t})=>{const r=ot(e,t);return[ar(r),ir(r),nr(r),sr(r),lr(r),ur(r),dt(r),qe]},dr,{order:-1e3}),Te=[];function ye(e,t,r,n=0){return{key:typeof e=="string"?e:`${t}-${n}`,error:e,errorStatus:r}}const at=({help:e,helpStatus:t,errors:r=Te,warnings:n=Te,className:a,fieldId:s,onVisibleChanged:i})=>{const{prefixCls:l}=o.useContext(Se),u=`${l}-item-explain`,d=xe(l),[m,f,v]=we(l,d),E=o.useMemo(()=>Ne(l),[l]),$=de(r),C=de(n),b=o.useMemo(()=>e!=null?[ye(e,"help",t)]:[].concat(Q($.map((p,c)=>ye(p,"error","error",c))),Q(C.map((p,c)=>ye(p,"warning","warning",c)))),[e,t,$,C]),h=o.useMemo(()=>{const p={};return b.forEach(({key:c})=>{p[c]=(p[c]||0)+1}),b.map((c,S)=>Object.assign(Object.assign({},c),{key:p[c.key]>1?`${c.key}-fallback-${S}`:c.key}))},[b]),y={};return s&&(y.id=`${s}_help`),m(o.createElement(mt,{motionDeadline:E.motionDeadline,motionName:`${l}-show-help`,visible:!!h.length,onVisibleChanged:i},p=>{const{className:c,style:S}=p;return o.createElement("div",Object.assign({},y,{className:X(u,c,v,d,a,f),style:S}),o.createElement(ft,Object.assign({keys:h},Ne(l),{motionName:`${l}-show-help-item`,component:!1}),w=>{const{key:O,error:I,errorStatus:x,className:g,style:N}=w;return o.createElement("div",{key:O,className:X(g,{[`${u}-${x}`]:x}),style:N},I)}))}))};var mr=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const fr=(e,t)=>{const r=o.useContext(gt),{getPrefixCls:n,direction:a,requiredMark:s,colon:i,scrollToFirstError:l,className:u,style:d}=pt("form"),{prefixCls:m,className:f,rootClassName:v,size:E,disabled:$=r,form:C,colon:b,labelAlign:h,labelWrap:y,labelCol:p,wrapperCol:c,hideRequiredMark:S,layout:w="horizontal",scrollToFirstError:O,requiredMark:I,onFinishFailed:x,name:g,style:N,feedbackIcons:B,variant:W}=e,M=mr(e,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),_=bt(E),R=o.useContext(ht),z=o.useMemo(()=>I!==void 0?I:S?!1:s!==void 0?s:!0,[S,I,s]),D=b??i,P=n("form",m),k=xe(P),[F,H,q]=we(P,k),Y=X(P,`${P}-${w}`,{[`${P}-hide-required-mark`]:z===!1,[`${P}-rtl`]:a==="rtl",[`${P}-${_}`]:_},q,k,H,u,f,v),[G]=tt(C),{__INTERNAL__:K}=G;K.name=g;const j=o.useMemo(()=>({name:g,labelAlign:h,labelCol:p,labelWrap:y,wrapperCol:c,layout:w,colon:D,requiredMark:z,itemRef:K.itemRef,form:G,feedbackIcons:B}),[g,h,p,c,w,D,z,G,B]),A=o.useRef(null);o.useImperativeHandle(t,()=>{var T;return Object.assign(Object.assign({},G),{nativeElement:(T=A.current)===null||T===void 0?void 0:T.nativeElement})});const L=(T,Z)=>{if(T){let ee={block:"nearest"};typeof T=="object"&&(ee=Object.assign(Object.assign({},ee),T)),G.scrollToField(Z,ee)}},U=T=>{if(x?.(T),T.errorFields.length){const Z=T.errorFields[0].name;if(O!==void 0){L(O,Z);return}l!==void 0&&L(l,Z)}};return F(o.createElement(yt.Provider,{value:W},o.createElement(vt,{disabled:$},o.createElement(Ct.Provider,{value:_},o.createElement(Ke,{validateMessages:R},o.createElement(J.Provider,{value:j},o.createElement($t,{status:!0},o.createElement(St,Object.assign({id:g},M,{name:g,onFinishFailed:U,form:G,ref:A,style:Object.assign(Object.assign({},d),N),className:Y})))))))))},gr=o.forwardRef(fr);function pr(e){if(typeof e=="function")return e;const t=xt(e);return t.length<=1?t[0]:t}const it=()=>{const{status:e,errors:t=[],warnings:r=[]}=o.useContext(ue);return{status:e,errors:t,warnings:r}};it.Context=ue;function br(e){const[t,r]=o.useState(e),n=o.useRef(null),a=o.useRef([]),s=o.useRef(!1);o.useEffect(()=>(s.current=!1,()=>{s.current=!0,Fe.cancel(n.current),n.current=null}),[]);function i(l){s.current||(n.current===null&&(a.current=[],n.current=Fe(()=>{n.current=null,r(u=>{let d=u;return a.current.forEach(m=>{d=m(d)}),d})})),a.current.push(l))}return[t,i]}function hr(){const{itemRef:e}=o.useContext(J),t=o.useRef({});function r(n,a){const s=a&&typeof a=="object"&&Et(a),i=n.join("_");return(t.current.name!==i||t.current.originRef!==s)&&(t.current.name=i,t.current.originRef=s,t.current.ref=wt(e(n),s)),t.current.ref}return r}const yr=e=>{const{formItemCls:t}=e;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${t}-control`]:{display:"flex"}}}},vr=It(["Form","item-item"],(e,{rootPrefixCls:t})=>{const r=ot(e,t);return yr(r)});var Cr=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const $r=24,Sr=e=>{const{prefixCls:t,status:r,labelCol:n,wrapperCol:a,children:s,errors:i,warnings:l,_internalItemRender:u,extra:d,help:m,fieldId:f,marginBottom:v,onErrorVisibleChanged:E,label:$}=e,C=`${t}-item`,b=o.useContext(J),h=o.useMemo(()=>{let M=Object.assign({},a||b.wrapperCol||{});return $===null&&!n&&!a&&b.labelCol&&[void 0,"xs","sm","md","lg","xl","xxl"].forEach(R=>{const z=R?[R]:[],D=Me(b.labelCol,z),P=typeof D=="object"?D:{},k=Me(M,z),F=typeof k=="object"?k:{};"span"in P&&!("offset"in F)&&P.span<$r&&(M=Ot(M,[].concat(z,["offset"]),P.span))}),M},[a,b.wrapperCol,b.labelCol,$,n]),y=X(`${C}-control`,h.className),p=o.useMemo(()=>{const{labelCol:M,wrapperCol:_}=b;return Cr(b,["labelCol","wrapperCol"])},[b]),c=o.useRef(null),[S,w]=o.useState(0);Ge(()=>{d&&c.current?w(c.current.clientHeight):w(0)},[d]);const O=o.createElement("div",{className:`${C}-control-input`},o.createElement("div",{className:`${C}-control-input-content`},s)),I=o.useMemo(()=>({prefixCls:t,status:r}),[t,r]),x=v!==null||i.length||l.length?o.createElement(Se.Provider,{value:I},o.createElement(at,{fieldId:f,errors:i,warnings:l,help:m,helpStatus:r,className:`${C}-explain-connected`,onVisibleChanged:E})):null,g={};f&&(g.id=`${f}_extra`);const N=d?o.createElement("div",Object.assign({},g,{className:`${C}-extra`,ref:c}),d):null,B=x||N?o.createElement("div",{className:`${C}-additional`,style:v?{minHeight:v+S}:{}},x,N):null,W=u&&u.mark==="pro_table_render"&&u.render?u.render(e,{input:O,errorList:x,extra:N}):o.createElement(o.Fragment,null,O,B);return o.createElement(J.Provider,{value:p},o.createElement(nt,Object.assign({},h,{className:y}),W),o.createElement(vr,{prefixCls:t}))};var xr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{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"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},Er=function(t,r){return o.createElement(Pt,Ue({},t,{ref:r,icon:xr}))},wr=o.forwardRef(Er),Ir=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const Or=({prefixCls:e,label:t,htmlFor:r,labelCol:n,labelAlign:a,colon:s,required:i,requiredMark:l,tooltip:u,vertical:d})=>{var m;const[f]=jt("Form"),{labelAlign:v,labelCol:E,labelWrap:$,colon:C}=o.useContext(J);if(!t)return null;const b=n||E||{},h=a||v,y=`${e}-item-label`,p=X(y,h==="left"&&`${y}-left`,b.className,{[`${y}-wrap`]:!!$});let c=t;const S=s===!0||C!==!1&&s!==!1;S&&!d&&typeof t=="string"&&t.trim()&&(c=t.replace(/[:|:]\s*$/,""));const O=rr(u);if(O){const{icon:W=o.createElement(wr,null)}=O,M=Ir(O,["icon"]),_=o.createElement(Qe,Object.assign({},M),o.cloneElement(W,{className:`${e}-item-tooltip`,title:"",onClick:R=>{R.preventDefault()},tabIndex:null}));c=o.createElement(o.Fragment,null,c,_)}const I=l==="optional",x=typeof l=="function",g=l===!1;x?c=l(c,{required:!!i}):I&&!i&&(c=o.createElement(o.Fragment,null,c,o.createElement("span",{className:`${e}-item-optional`,title:""},f?.optional||((m=Nt.Form)===null||m===void 0?void 0:m.optional))));let N;g?N="hidden":(I||x)&&(N="optional");const B=X({[`${e}-item-required`]:i,[`${e}-item-required-mark-${N}`]:N,[`${e}-item-no-colon`]:!S});return o.createElement(nt,Object.assign({},b,{className:p}),o.createElement("label",{htmlFor:r,className:B,title:typeof t=="string"?t:""},c))},Pr={success:Ze,warning:Mt,error:Ye,validating:Ft};function st({children:e,errors:t,warnings:r,hasFeedback:n,validateStatus:a,prefixCls:s,meta:i,noStyle:l,name:u}){const d=`${s}-item`,{feedbackIcons:m}=o.useContext(J),f=rt(t,r,i,null,!!n,a),{isFormItemInput:v,status:E,hasFeedback:$,feedbackIcon:C,name:b}=o.useContext(ue),h=o.useMemo(()=>{var y;let p;if(n){const S=n!==!0&&n.icons||m,w=f&&((y=S?.({status:f,errors:t,warnings:r}))===null||y===void 0?void 0:y[f]),O=f?Pr[f]:null;p=w!==!1&&O?o.createElement("span",{className:X(`${d}-feedback-icon`,`${d}-feedback-icon-${f}`)},w||o.createElement(O,null)):null}const c={status:f||"",errors:t,warnings:r,hasFeedback:!!n,feedbackIcon:p,isFormItemInput:!0,name:u};return l&&(c.status=(f??E)||"",c.isFormItemInput=v,c.hasFeedback=!!(n??$),c.feedbackIcon=n!==void 0?c.feedbackIcon:C,c.name=u??b),c},[f,n,l,v,E]);return o.createElement(ue.Provider,{value:h},e)}var jr=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};function Nr(e){const{prefixCls:t,className:r,rootClassName:n,style:a,help:s,errors:i,warnings:l,validateStatus:u,meta:d,hasFeedback:m,hidden:f,children:v,fieldId:E,required:$,isRequired:C,onSubItemMetaChange:b,layout:h,name:y}=e,p=jr(e,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange","layout","name"]),c=`${t}-item`,{requiredMark:S,layout:w}=o.useContext(J),O=h||w,I=O==="vertical",x=o.useRef(null),g=de(i),N=de(l),B=s!=null,W=!!(B||i.length||l.length),M=!!x.current&&_t(x.current),[_,R]=o.useState(null);Ge(()=>{if(W&&x.current){const F=getComputedStyle(x.current);R(Number.parseInt(F.marginBottom,10))}},[W,M]);const z=F=>{F||R(null)},P=((F=!1)=>{const H=F?g:d.errors,q=F?N:d.warnings;return rt(H,q,d,"",!!m,u)})(),k=X(c,r,n,{[`${c}-with-help`]:B||g.length||N.length,[`${c}-has-feedback`]:P&&m,[`${c}-has-success`]:P==="success",[`${c}-has-warning`]:P==="warning",[`${c}-has-error`]:P==="error",[`${c}-is-validating`]:P==="validating",[`${c}-hidden`]:f,[`${c}-${O}`]:O});return o.createElement("div",{className:k,style:a,ref:x},o.createElement(tr,Object.assign({className:`${c}-row`},Je(p,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),o.createElement(Or,Object.assign({htmlFor:E},e,{requiredMark:S,required:$??C,prefixCls:t,vertical:I})),o.createElement(Sr,Object.assign({},e,d,{errors:g,warnings:N,prefixCls:t,status:P,help:s,marginBottom:_,onErrorVisibleChanged:z}),o.createElement(et.Provider,{value:b},o.createElement(st,{prefixCls:t,meta:d,errors:d.errors,warnings:d.warnings,hasFeedback:m,validateStatus:P,name:y},v)))),!!_&&o.createElement("div",{className:`${c}-margin-offset`,style:{marginBottom:-_}}))}const Fr="__SPLIT__";function Mr(e,t){const r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every(a=>{const s=e[a],i=t[a];return s===i||typeof s=="function"||typeof i=="function"})}const _r=o.memo(({children:e})=>e,(e,t)=>Mr(e.control,t.control)&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every((r,n)=>r===t.childProps[n]));function Ae(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Rr(e){const{name:t,noStyle:r,className:n,dependencies:a,prefixCls:s,shouldUpdate:i,rules:l,children:u,required:d,label:m,messageVariables:f,trigger:v="onChange",validateTrigger:E,hidden:$,help:C,layout:b}=e,{getPrefixCls:h}=o.useContext(Ee),{name:y}=o.useContext(J),p=pr(u),c=typeof p=="function",S=o.useContext(et),{validateTrigger:w}=o.useContext(Rt),O=E!==void 0?E:w,I=t!=null,x=h("form",s),g=xe(x),[N,B,W]=we(x,g);kt();const M=o.useContext(Lt),_=o.useRef(null),[R,z]=br({}),[D,P]=Tt(()=>Ae()),k=j=>{const A=M?.getKey(j.name);if(P(j.destroy?Ae():j,!0),r&&C!==!1&&S){let L=j.name;if(j.destroy)L=_.current||L;else if(A!==void 0){const[U,T]=A;L=[U].concat(Q(T)),_.current=L}S(j,L)}},F=(j,A)=>{z(L=>{const U=Object.assign({},L),Z=[].concat(Q(j.name.slice(0,-1)),Q(A)).join(Fr);return j.destroy?delete U[Z]:U[Z]=j,U})},[H,q]=o.useMemo(()=>{const j=Q(D.errors),A=Q(D.warnings);return Object.values(R).forEach(L=>{j.push.apply(j,Q(L.errors||[])),A.push.apply(A,Q(L.warnings||[]))}),[j,A]},[R,D.errors,D.warnings]),Y=hr();function G(j,A,L){return r&&!$?o.createElement(st,{prefixCls:x,hasFeedback:e.hasFeedback,validateStatus:e.validateStatus,meta:D,errors:H,warnings:q,noStyle:!0,name:t},j):o.createElement(Nr,Object.assign({key:"row"},e,{className:X(n,W,g,B),prefixCls:x,fieldId:A,isRequired:L,errors:H,warnings:q,meta:D,onSubItemMetaChange:F,layout:b,name:t}),j)}if(!I&&!c&&!a)return N(G(p));let K={};return typeof m=="string"?K.label=m:t&&(K.label=String(t)),f&&(K=Object.assign(Object.assign({},K),f)),N(o.createElement(At,Object.assign({},e,{messageVariables:K,trigger:v,validateTrigger:O,onMetaChange:k}),(j,A,L)=>{const U=he(t).length&&A?A.name:[],T=Jt(U,y),Z=d!==void 0?d:!!l?.some(V=>{if(V&&typeof V=="object"&&V.required&&!V.warningOnly)return!0;if(typeof V=="function"){const ne=V(L);return ne?.required&&!ne?.warningOnly}return!1}),ee=Object.assign({},j);let se=null;if(Array.isArray(p)&&I)se=p;else if(!(c&&(!(i||a)||I))){if(!(a&&!c&&!I))if(o.isValidElement(p)){const V=Object.assign(Object.assign({},p.props),ee);if(V.id||(V.id=T),C||H.length>0||q.length>0||e.extra){const oe=[];(C||H.length>0)&&oe.push(`${T}_help`),e.extra&&oe.push(`${T}_extra`),V["aria-describedby"]=oe.join(" ")}H.length>0&&(V["aria-invalid"]="true"),Z&&(V["aria-required"]="true"),Wt(p)&&(V.ref=Y(U,p)),new Set([].concat(Q(he(v)),Q(he(O)))).forEach(oe=>{V[oe]=(...Ie)=>{var Oe,Pe,pe,je,be;(pe=ee[oe])===null||pe===void 0||(Oe=pe).call.apply(Oe,[ee].concat(Ie)),(be=(je=p.props)[oe])===null||be===void 0||(Pe=be).call.apply(Pe,[je].concat(Ie))}});const ut=[V["aria-required"],V["aria-invalid"],V["aria-describedby"]];se=o.createElement(_r,{control:ee,update:p,childProps:ut},Dt(p,V))}else c&&(i||a)&&!I?se=p(L):se=p}return G(se,T,Z)}))}const lt=Rr;lt.useStatus=it;var kr=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const Lr=e=>{var{prefixCls:t,children:r}=e,n=kr(e,["prefixCls","children"]);const{getPrefixCls:a}=o.useContext(Ee),s=a("form",t),i=o.useMemo(()=>({prefixCls:s,status:"error"}),[s]);return o.createElement(Vt,Object.assign({},n),(l,u,d)=>o.createElement(Se.Provider,{value:i},r(l.map(m=>Object.assign(Object.assign({},m),{fieldKey:m.key})),u,{errors:d.errors,warnings:d.warnings})))};function Tr(){const{form:e}=o.useContext(J);return e}const re=gr;re.Item=lt;re.List=Lr;re.ErrorList=at;re.useForm=tt;re.useFormInstance=Tr;re.useWatch=zt;re.Provider=Ke;re.create=()=>{};var Ar={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Wr=function(){var t=o.useRef([]),r=o.useRef(null);return o.useEffect(function(){var n=Date.now(),a=!1;t.current.forEach(function(s){if(s){a=!0;var i=s.style;i.transitionDuration=".3s, .3s, .3s, .06s",r.current&&n-r.current<100&&(i.transitionDuration="0s, 0s")}}),a&&(r.current=Date.now())}),t.current},We=0,Dr=Ht();function Vr(){var e;return Dr?(e=We,We+=1):e="TEST_OR_SSR",e}const zr=(function(e){var t=o.useState(),r=Bt(t,2),n=r[0],a=r[1];return o.useEffect(function(){a("rc_progress_".concat(Vr()))},[]),e||n});var De=function(t){var r=t.bg,n=t.children;return o.createElement("div",{style:{width:"100%",height:"100%",background:r}},n)};function Ve(e,t){return Object.keys(e).map(function(r){var n=parseFloat(r),a="".concat(Math.floor(n*t),"%");return"".concat(e[r]," ").concat(a)})}var Br=o.forwardRef(function(e,t){var r=e.prefixCls,n=e.color,a=e.gradientId,s=e.radius,i=e.style,l=e.ptg,u=e.strokeLinecap,d=e.strokeWidth,m=e.size,f=e.gapDegree,v=n&&le(n)==="object",E=v?"#FFF":void 0,$=m/2,C=o.createElement("circle",{className:"".concat(r,"-circle-path"),r:s,cx:$,cy:$,stroke:E,strokeLinecap:u,strokeWidth:d,opacity:l===0?0:1,style:i,ref:t});if(!v)return C;var b="".concat(a,"-conic"),h=f?"".concat(180+f/2,"deg"):"0deg",y=Ve(n,(360-f)/360),p=Ve(n,1),c="conic-gradient(from ".concat(h,", ").concat(y.join(", "),")"),S="linear-gradient(to ".concat(f?"bottom":"top",", ").concat(p.join(", "),")");return o.createElement(o.Fragment,null,o.createElement("mask",{id:b},C),o.createElement("foreignObject",{x:0,y:0,width:m,height:m,mask:"url(#".concat(b,")")},o.createElement(De,{bg:S},o.createElement(De,{bg:c}))))}),ce=100,ve=function(t,r,n,a,s,i,l,u,d,m){var f=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,v=n/100*360*((360-i)/360),E=i===0?0:{bottom:0,top:180,left:90,right:-90}[l],$=(100-a)/100*r;d==="round"&&a!==100&&($+=m/2,$>=r&&($=r-.01));var C=ce/2;return{stroke:typeof u=="string"?u:void 0,strokeDasharray:"".concat(r,"px ").concat(t),strokeDashoffset:$+f,transform:"rotate(".concat(s+v+E,"deg)"),transformOrigin:"".concat(C,"px ").concat(C,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Hr=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function ze(e){var t=e??[];return Array.isArray(t)?t:[t]}var qr=function(t){var r=_e(_e({},Ar),t),n=r.id,a=r.prefixCls,s=r.steps,i=r.strokeWidth,l=r.trailWidth,u=r.gapDegree,d=u===void 0?0:u,m=r.gapPosition,f=r.trailColor,v=r.strokeLinecap,E=r.style,$=r.className,C=r.strokeColor,b=r.percent,h=qt(r,Hr),y=ce/2,p=zr(n),c="".concat(p,"-gradient"),S=y-i/2,w=Math.PI*2*S,O=d>0?90+d/2:-90,I=w*((360-d)/360),x=le(s)==="object"?s:{count:s,gap:2},g=x.count,N=x.gap,B=ze(b),W=ze(C),M=W.find(function(F){return F&&le(F)==="object"}),_=M&&le(M)==="object",R=_?"butt":v,z=ve(w,I,0,100,O,d,m,f,R,i),D=Wr(),P=function(){var H=0;return B.map(function(q,Y){var G=W[Y]||W[W.length-1],K=ve(w,I,H,q,O,d,m,G,R,i);return H+=q,o.createElement(Br,{key:Y,color:G,ptg:q,radius:S,prefixCls:a,gradientId:c,style:K,strokeLinecap:R,strokeWidth:i,gapDegree:d,ref:function(A){D[Y]=A},size:ce})}).reverse()},k=function(){var H=Math.round(g*(B[0]/100)),q=100/g,Y=0;return new Array(g).fill(null).map(function(G,K){var j=K<=H-1?W[0]:f,A=j&&le(j)==="object"?"url(#".concat(c,")"):void 0,L=ve(w,I,Y,q,O,d,m,j,"butt",i,N);return Y+=(I-L.strokeDashoffset+N)*100/I,o.createElement("circle",{key:K,className:"".concat(a,"-circle-path"),r:S,cx:y,cy:y,stroke:A,strokeWidth:i,opacity:1,style:L,ref:function(T){D[K]=T}})})};return o.createElement("svg",Ue({className:X("".concat(a,"-circle"),$),viewBox:"0 0 ".concat(ce," ").concat(ce),style:E,id:n,role:"presentation"},h),!g&&o.createElement("circle",{className:"".concat(a,"-circle-trail"),r:S,cx:y,cy:y,stroke:f,strokeLinecap:R,strokeWidth:l||i,style:z}),g?k():P())};function te(e){return!e||e<0?0:e>100?100:e}function me({success:e,successPercent:t}){let r=t;return e&&"progress"in e&&(r=e.progress),e&&"percent"in e&&(r=e.percent),r}const Xr=({percent:e,success:t,successPercent:r})=>{const n=te(me({success:t,successPercent:r}));return[n,te(te(e)-n)]},Kr=({success:e={},strokeColor:t})=>{const{strokeColor:r}=e;return[r||Ce.green,t||null]},ge=(e,t,r)=>{var n,a,s,i;let l=-1,u=-1;if(t==="step"){const d=r.steps,m=r.strokeWidth;typeof e=="string"||typeof e>"u"?(l=e==="small"?2:14,u=m??8):typeof e=="number"?[l,u]=[e,e]:[l=14,u=8]=Array.isArray(e)?e:[e.width,e.height],l*=d}else if(t==="line"){const d=r?.strokeWidth;typeof e=="string"||typeof e>"u"?u=d||(e==="small"?6:8):typeof e=="number"?[l,u]=[e,e]:[l=-1,u=8]=Array.isArray(e)?e:[e.width,e.height]}else(t==="circle"||t==="dashboard")&&(typeof e=="string"||typeof e>"u"?[l,u]=e==="small"?[60,60]:[120,120]:typeof e=="number"?[l,u]=[e,e]:Array.isArray(e)&&(l=(a=(n=e[0])!==null&&n!==void 0?n:e[1])!==null&&a!==void 0?a:120,u=(i=(s=e[0])!==null&&s!==void 0?s:e[1])!==null&&i!==void 0?i:120));return[l,u]},Gr=3,Ur=e=>Gr/e*100,Qr=e=>{const{prefixCls:t,trailColor:r=null,strokeLinecap:n="round",gapPosition:a,gapDegree:s,width:i=120,type:l,children:u,success:d,size:m=i,steps:f}=e,[v,E]=ge(m,"circle");let{strokeWidth:$}=e;$===void 0&&($=Math.max(Ur(v),6));const C={width:v,height:E,fontSize:v*.15+6},b=o.useMemo(()=>{if(s||s===0)return s;if(l==="dashboard")return 75},[s,l]),h=Xr(e),y=a||l==="dashboard"&&"bottom"||void 0,p=Object.prototype.toString.call(e.strokeColor)==="[object Object]",c=Kr({success:d,strokeColor:e.strokeColor}),S=X(`${t}-inner`,{[`${t}-circle-gradient`]:p}),w=o.createElement(qr,{steps:f,percent:f?h[1]:h,strokeWidth:$,trailWidth:$,strokeColor:f?c[1]:c,strokeLinecap:n,trailColor:r,prefixCls:t,gapDegree:b,gapPosition:y}),O=v<=20,I=o.createElement("div",{className:S,style:C},w,!O&&u);return O?o.createElement(Qe,{title:u},I):I},fe="--progress-line-stroke-color",ct="--progress-percent",Be=e=>{const t=e?"100%":"-100%";return new Xt(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},Yr=e=>{const{componentCls:t,iconCls:r}=e;return{[t]:Object.assign(Object.assign({},$e(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${fe})`]},height:"100%",width:`calc(1 / var(${ct}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[r]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${ie(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:Be(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:Be(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}},Zr=e=>{const{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{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}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}},Jr=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}},en=e=>{const{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}},tn=e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}),rn=He("Progress",e=>{const t=e.calc(e.marginXXS).div(2).equal(),r=Xe(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[Yr(r),Zr(r),Jr(r),en(r)]},tn);var nn=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const on=e=>{let t=[];return Object.keys(e).forEach(r=>{const n=Number.parseFloat(r.replace(/%/g,""));Number.isNaN(n)||t.push({key:n,value:e[r]})}),t=t.sort((r,n)=>r.key-n.key),t.map(({key:r,value:n})=>`${n} ${r}%`).join(", ")},an=(e,t)=>{const{from:r=Ce.blue,to:n=Ce.blue,direction:a=t==="rtl"?"to left":"to right"}=e,s=nn(e,["from","to","direction"]);if(Object.keys(s).length!==0){const l=on(s),u=`linear-gradient(${a}, ${l})`;return{background:u,[fe]:u}}const i=`linear-gradient(${a}, ${r}, ${n})`;return{background:i,[fe]:i}},sn=e=>{const{prefixCls:t,direction:r,percent:n,size:a,strokeWidth:s,strokeColor:i,strokeLinecap:l="round",children:u,trailColor:d=null,percentPosition:m,success:f}=e,{align:v,type:E}=m,$=i&&typeof i!="string"?an(i,r):{[fe]:i,background:i},C=l==="square"||l==="butt"?0:void 0,b=a??[-1,s||(a==="small"?6:8)],[h,y]=ge(b,"line",{strokeWidth:s}),p={backgroundColor:d||void 0,borderRadius:C},c=Object.assign(Object.assign({width:`${te(n)}%`,height:y,borderRadius:C},$),{[ct]:te(n)/100}),S=me(e),w={width:`${te(S)}%`,height:y,borderRadius:C,backgroundColor:f?.strokeColor},O={width:h<0?"100%":h},I=o.createElement("div",{className:`${t}-inner`,style:p},o.createElement("div",{className:X(`${t}-bg`,`${t}-bg-${E}`),style:c},E==="inner"&&u),S!==void 0&&o.createElement("div",{className:`${t}-success-bg`,style:w})),x=E==="outer"&&v==="start",g=E==="outer"&&v==="end";return E==="outer"&&v==="center"?o.createElement("div",{className:`${t}-layout-bottom`},I,u):o.createElement("div",{className:`${t}-outer`,style:O},x&&u,I,g&&u)},ln=e=>{const{size:t,steps:r,rounding:n=Math.round,percent:a=0,strokeWidth:s=8,strokeColor:i,trailColor:l=null,prefixCls:u,children:d}=e,m=n(r*(a/100)),v=t??[t==="small"?2:14,s],[E,$]=ge(v,"step",{steps:r,strokeWidth:s}),C=E/r,b=Array.from({length:r});for(let h=0;h<r;h++){const y=Array.isArray(i)?i[h]:i;b[h]=o.createElement("div",{key:h,className:X(`${u}-steps-item`,{[`${u}-steps-item-active`]:h<=m-1}),style:{backgroundColor:h<=m-1?y:l,width:C,height:$}})}return o.createElement("div",{className:`${u}-steps-outer`},b,d)};var cn=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const un=["normal","exception","active","success"],gn=o.forwardRef((e,t)=>{const{prefixCls:r,className:n,rootClassName:a,steps:s,strokeColor:i,percent:l=0,size:u="default",showInfo:d=!0,type:m="line",status:f,format:v,style:E,percentPosition:$={}}=e,C=cn(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:b="end",type:h="outer"}=$,y=Array.isArray(i)?i[0]:i,p=typeof i=="string"||Array.isArray(i)?i:void 0,c=o.useMemo(()=>{if(y){const P=typeof y=="string"?y:Object.values(y)[0];return new Kt(P).isLight()}return!1},[i]),S=o.useMemo(()=>{var P,k;const F=me(e);return Number.parseInt(F!==void 0?(P=F??0)===null||P===void 0?void 0:P.toString():(k=l??0)===null||k===void 0?void 0:k.toString(),10)},[l,e.success,e.successPercent]),w=o.useMemo(()=>!un.includes(f)&&S>=100?"success":f||"normal",[f,S]),{getPrefixCls:O,direction:I,progress:x}=o.useContext(Ee),g=O("progress",r),[N,B,W]=rn(g),M=m==="line",_=M&&!s,R=o.useMemo(()=>{if(!d)return null;const P=me(e);let k;const F=v||(q=>`${q}%`),H=M&&c&&h==="inner";return h==="inner"||v||w!=="exception"&&w!=="success"?k=F(te(l),te(P)):w==="exception"?k=M?o.createElement(Ye,null):o.createElement(Gt,null):w==="success"&&(k=M?o.createElement(Ze,null):o.createElement(Ut,null)),o.createElement("span",{className:X(`${g}-text`,{[`${g}-text-bright`]:H,[`${g}-text-${b}`]:_,[`${g}-text-${h}`]:_}),title:typeof k=="string"?k:void 0},k)},[d,l,S,w,m,g,v]);let z;m==="line"?z=s?o.createElement(ln,Object.assign({},e,{strokeColor:p,prefixCls:g,steps:typeof s=="object"?s.count:s}),R):o.createElement(sn,Object.assign({},e,{strokeColor:y,prefixCls:g,direction:I,percentPosition:{align:b,type:h}}),R):(m==="circle"||m==="dashboard")&&(z=o.createElement(Qr,Object.assign({},e,{strokeColor:y,prefixCls:g,progressStatus:w}),R));const D=X(g,`${g}-status-${w}`,{[`${g}-${m==="dashboard"&&"circle"||m}`]:m!=="line",[`${g}-inline-circle`]:m==="circle"&&ge(u,"circle")[0]<=20,[`${g}-line`]:_,[`${g}-line-align-${b}`]:_,[`${g}-line-position-${h}`]:_,[`${g}-steps`]:s,[`${g}-show-info`]:d,[`${g}-${u}`]:typeof u=="string",[`${g}-rtl`]:I==="rtl"},x?.className,n,a,B,W);return N(o.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},x?.style),E),className:D,role:"progressbar","aria-valuenow":S,"aria-valuemin":0,"aria-valuemax":100},Je(C,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),z))});function pn(){const e=Qt(),[t,r]=o.useState(!1),{data:n,isLoading:a,isError:s}=Yt({queryKey:ke.AUTH_STATUS,queryFn:()=>Re.getAuthStatus(),retry:!1,staleTime:0,refetchOnMount:!0,refetchOnWindowFocus:!1}),i=!s&&Zt(n),l=er({mutationFn:d=>Re.loginWithToken(d),onSuccess:()=>{e.invalidateQueries({queryKey:ke.AUTH_STATUS}),r(!1)},onError:()=>{r(!1)}});return{authenticated:i,isLoading:a,isError:s,data:n,loginWithTokenAsync:async d=>{r(!0);try{await l.mutateAsync(d)}finally{r(!1)}},isLoggingInWithToken:t}}export{re as F,gn as P,wr as R,pn as u};
|
|
9
|
-
//# sourceMappingURL=useAuth-
|
|
8
|
+
${n}-col-xl-24${r}-label`]:ae(e)},[`@media (max-width: ${ie(e.screenXSMax)})`]:[cr(e),{[t]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-xs-24${r}-label`]:ae(e)}}}],[`@media (max-width: ${ie(e.screenSMMax)})`]:{[t]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-sm-24${r}-label`]:ae(e)}}},[`@media (max-width: ${ie(e.screenMDMax)})`]:{[t]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-md-24${r}-label`]:ae(e)}}},[`@media (max-width: ${ie(e.screenLGMax)})`]:{[t]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-lg-24${r}-label`]:ae(e)}}}}},dr=e=>({labelRequiredMarkColor:e.colorError,labelColor:e.colorTextHeading,labelFontSize:e.fontSize,labelHeight:e.controlHeight,labelColonMarginInlineStart:e.marginXXS/2,labelColonMarginInlineEnd:e.marginXS,itemMarginBottom:e.marginLG,verticalLabelPadding:`0 0 ${e.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),ot=(e,t)=>Xe(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:t}),we=He("Form",(e,{rootPrefixCls:t})=>{const r=ot(e,t);return[ar(r),ir(r),nr(r),sr(r),lr(r),ur(r),dt(r),qe]},dr,{order:-1e3}),Le=[];function ye(e,t,r,n=0){return{key:typeof e=="string"?e:`${t}-${n}`,error:e,errorStatus:r}}const at=({help:e,helpStatus:t,errors:r=Le,warnings:n=Le,className:a,fieldId:s,onVisibleChanged:i})=>{const{prefixCls:l}=o.useContext(Se),u=`${l}-item-explain`,d=xe(l),[m,f,v]=we(l,d),E=o.useMemo(()=>Ne(l),[l]),$=de(r),C=de(n),b=o.useMemo(()=>e!=null?[ye(e,"help",t)]:[].concat(Q($.map((p,c)=>ye(p,"error","error",c))),Q(C.map((p,c)=>ye(p,"warning","warning",c)))),[e,t,$,C]),h=o.useMemo(()=>{const p={};return b.forEach(({key:c})=>{p[c]=(p[c]||0)+1}),b.map((c,S)=>Object.assign(Object.assign({},c),{key:p[c.key]>1?`${c.key}-fallback-${S}`:c.key}))},[b]),y={};return s&&(y.id=`${s}_help`),m(o.createElement(mt,{motionDeadline:E.motionDeadline,motionName:`${l}-show-help`,visible:!!h.length,onVisibleChanged:i},p=>{const{className:c,style:S}=p;return o.createElement("div",Object.assign({},y,{className:X(u,c,v,d,a,f),style:S}),o.createElement(ft,Object.assign({keys:h},Ne(l),{motionName:`${l}-show-help-item`,component:!1}),w=>{const{key:O,error:I,errorStatus:x,className:g,style:N}=w;return o.createElement("div",{key:O,className:X(g,{[`${u}-${x}`]:x}),style:N},I)}))}))};var mr=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const fr=(e,t)=>{const r=o.useContext(gt),{getPrefixCls:n,direction:a,requiredMark:s,colon:i,scrollToFirstError:l,className:u,style:d}=pt("form"),{prefixCls:m,className:f,rootClassName:v,size:E,disabled:$=r,form:C,colon:b,labelAlign:h,labelWrap:y,labelCol:p,wrapperCol:c,hideRequiredMark:S,layout:w="horizontal",scrollToFirstError:O,requiredMark:I,onFinishFailed:x,name:g,style:N,feedbackIcons:B,variant:W}=e,M=mr(e,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),_=bt(E),R=o.useContext(ht),z=o.useMemo(()=>I!==void 0?I:S?!1:s!==void 0?s:!0,[S,I,s]),D=b??i,P=n("form",m),k=xe(P),[F,H,q]=we(P,k),Y=X(P,`${P}-${w}`,{[`${P}-hide-required-mark`]:z===!1,[`${P}-rtl`]:a==="rtl",[`${P}-${_}`]:_},q,k,H,u,f,v),[G]=tt(C),{__INTERNAL__:K}=G;K.name=g;const j=o.useMemo(()=>({name:g,labelAlign:h,labelCol:p,labelWrap:y,wrapperCol:c,layout:w,colon:D,requiredMark:z,itemRef:K.itemRef,form:G,feedbackIcons:B}),[g,h,p,c,w,D,z,G,B]),A=o.useRef(null);o.useImperativeHandle(t,()=>{var L;return Object.assign(Object.assign({},G),{nativeElement:(L=A.current)===null||L===void 0?void 0:L.nativeElement})});const T=(L,Z)=>{if(L){let ee={block:"nearest"};typeof L=="object"&&(ee=Object.assign(Object.assign({},ee),L)),G.scrollToField(Z,ee)}},U=L=>{if(x?.(L),L.errorFields.length){const Z=L.errorFields[0].name;if(O!==void 0){T(O,Z);return}l!==void 0&&T(l,Z)}};return F(o.createElement(yt.Provider,{value:W},o.createElement(vt,{disabled:$},o.createElement(Ct.Provider,{value:_},o.createElement(Ke,{validateMessages:R},o.createElement(J.Provider,{value:j},o.createElement($t,{status:!0},o.createElement(St,Object.assign({id:g},M,{name:g,onFinishFailed:U,form:G,ref:A,style:Object.assign(Object.assign({},d),N),className:Y})))))))))},gr=o.forwardRef(fr);function pr(e){if(typeof e=="function")return e;const t=xt(e);return t.length<=1?t[0]:t}const it=()=>{const{status:e,errors:t=[],warnings:r=[]}=o.useContext(ue);return{status:e,errors:t,warnings:r}};it.Context=ue;function br(e){const[t,r]=o.useState(e),n=o.useRef(null),a=o.useRef([]),s=o.useRef(!1);o.useEffect(()=>(s.current=!1,()=>{s.current=!0,Fe.cancel(n.current),n.current=null}),[]);function i(l){s.current||(n.current===null&&(a.current=[],n.current=Fe(()=>{n.current=null,r(u=>{let d=u;return a.current.forEach(m=>{d=m(d)}),d})})),a.current.push(l))}return[t,i]}function hr(){const{itemRef:e}=o.useContext(J),t=o.useRef({});function r(n,a){const s=a&&typeof a=="object"&&Et(a),i=n.join("_");return(t.current.name!==i||t.current.originRef!==s)&&(t.current.name=i,t.current.originRef=s,t.current.ref=wt(e(n),s)),t.current.ref}return r}const yr=e=>{const{formItemCls:t}=e;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${t}-control`]:{display:"flex"}}}},vr=It(["Form","item-item"],(e,{rootPrefixCls:t})=>{const r=ot(e,t);return yr(r)});var Cr=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const $r=24,Sr=e=>{const{prefixCls:t,status:r,labelCol:n,wrapperCol:a,children:s,errors:i,warnings:l,_internalItemRender:u,extra:d,help:m,fieldId:f,marginBottom:v,onErrorVisibleChanged:E,label:$}=e,C=`${t}-item`,b=o.useContext(J),h=o.useMemo(()=>{let M=Object.assign({},a||b.wrapperCol||{});return $===null&&!n&&!a&&b.labelCol&&[void 0,"xs","sm","md","lg","xl","xxl"].forEach(R=>{const z=R?[R]:[],D=Me(b.labelCol,z),P=typeof D=="object"?D:{},k=Me(M,z),F=typeof k=="object"?k:{};"span"in P&&!("offset"in F)&&P.span<$r&&(M=Ot(M,[].concat(z,["offset"]),P.span))}),M},[a,b.wrapperCol,b.labelCol,$,n]),y=X(`${C}-control`,h.className),p=o.useMemo(()=>{const{labelCol:M,wrapperCol:_}=b;return Cr(b,["labelCol","wrapperCol"])},[b]),c=o.useRef(null),[S,w]=o.useState(0);Ge(()=>{d&&c.current?w(c.current.clientHeight):w(0)},[d]);const O=o.createElement("div",{className:`${C}-control-input`},o.createElement("div",{className:`${C}-control-input-content`},s)),I=o.useMemo(()=>({prefixCls:t,status:r}),[t,r]),x=v!==null||i.length||l.length?o.createElement(Se.Provider,{value:I},o.createElement(at,{fieldId:f,errors:i,warnings:l,help:m,helpStatus:r,className:`${C}-explain-connected`,onVisibleChanged:E})):null,g={};f&&(g.id=`${f}_extra`);const N=d?o.createElement("div",Object.assign({},g,{className:`${C}-extra`,ref:c}),d):null,B=x||N?o.createElement("div",{className:`${C}-additional`,style:v?{minHeight:v+S}:{}},x,N):null,W=u&&u.mark==="pro_table_render"&&u.render?u.render(e,{input:O,errorList:x,extra:N}):o.createElement(o.Fragment,null,O,B);return o.createElement(J.Provider,{value:p},o.createElement(nt,Object.assign({},h,{className:y}),W),o.createElement(vr,{prefixCls:t}))};var xr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{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"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},Er=function(t,r){return o.createElement(Pt,Ue({},t,{ref:r,icon:xr}))},wr=o.forwardRef(Er),Ir=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const Or=({prefixCls:e,label:t,htmlFor:r,labelCol:n,labelAlign:a,colon:s,required:i,requiredMark:l,tooltip:u,vertical:d})=>{var m;const[f]=jt("Form"),{labelAlign:v,labelCol:E,labelWrap:$,colon:C}=o.useContext(J);if(!t)return null;const b=n||E||{},h=a||v,y=`${e}-item-label`,p=X(y,h==="left"&&`${y}-left`,b.className,{[`${y}-wrap`]:!!$});let c=t;const S=s===!0||C!==!1&&s!==!1;S&&!d&&typeof t=="string"&&t.trim()&&(c=t.replace(/[:|:]\s*$/,""));const O=rr(u);if(O){const{icon:W=o.createElement(wr,null)}=O,M=Ir(O,["icon"]),_=o.createElement(Qe,Object.assign({},M),o.cloneElement(W,{className:`${e}-item-tooltip`,title:"",onClick:R=>{R.preventDefault()},tabIndex:null}));c=o.createElement(o.Fragment,null,c,_)}const I=l==="optional",x=typeof l=="function",g=l===!1;x?c=l(c,{required:!!i}):I&&!i&&(c=o.createElement(o.Fragment,null,c,o.createElement("span",{className:`${e}-item-optional`,title:""},f?.optional||((m=Nt.Form)===null||m===void 0?void 0:m.optional))));let N;g?N="hidden":(I||x)&&(N="optional");const B=X({[`${e}-item-required`]:i,[`${e}-item-required-mark-${N}`]:N,[`${e}-item-no-colon`]:!S});return o.createElement(nt,Object.assign({},b,{className:p}),o.createElement("label",{htmlFor:r,className:B,title:typeof t=="string"?t:""},c))},Pr={success:Ze,warning:Mt,error:Ye,validating:Ft};function st({children:e,errors:t,warnings:r,hasFeedback:n,validateStatus:a,prefixCls:s,meta:i,noStyle:l,name:u}){const d=`${s}-item`,{feedbackIcons:m}=o.useContext(J),f=rt(t,r,i,null,!!n,a),{isFormItemInput:v,status:E,hasFeedback:$,feedbackIcon:C,name:b}=o.useContext(ue),h=o.useMemo(()=>{var y;let p;if(n){const S=n!==!0&&n.icons||m,w=f&&((y=S?.({status:f,errors:t,warnings:r}))===null||y===void 0?void 0:y[f]),O=f?Pr[f]:null;p=w!==!1&&O?o.createElement("span",{className:X(`${d}-feedback-icon`,`${d}-feedback-icon-${f}`)},w||o.createElement(O,null)):null}const c={status:f||"",errors:t,warnings:r,hasFeedback:!!n,feedbackIcon:p,isFormItemInput:!0,name:u};return l&&(c.status=(f??E)||"",c.isFormItemInput=v,c.hasFeedback=!!(n??$),c.feedbackIcon=n!==void 0?c.feedbackIcon:C,c.name=u??b),c},[f,n,l,v,E]);return o.createElement(ue.Provider,{value:h},e)}var jr=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};function Nr(e){const{prefixCls:t,className:r,rootClassName:n,style:a,help:s,errors:i,warnings:l,validateStatus:u,meta:d,hasFeedback:m,hidden:f,children:v,fieldId:E,required:$,isRequired:C,onSubItemMetaChange:b,layout:h,name:y}=e,p=jr(e,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange","layout","name"]),c=`${t}-item`,{requiredMark:S,layout:w}=o.useContext(J),O=h||w,I=O==="vertical",x=o.useRef(null),g=de(i),N=de(l),B=s!=null,W=!!(B||i.length||l.length),M=!!x.current&&_t(x.current),[_,R]=o.useState(null);Ge(()=>{if(W&&x.current){const F=getComputedStyle(x.current);R(Number.parseInt(F.marginBottom,10))}},[W,M]);const z=F=>{F||R(null)},P=((F=!1)=>{const H=F?g:d.errors,q=F?N:d.warnings;return rt(H,q,d,"",!!m,u)})(),k=X(c,r,n,{[`${c}-with-help`]:B||g.length||N.length,[`${c}-has-feedback`]:P&&m,[`${c}-has-success`]:P==="success",[`${c}-has-warning`]:P==="warning",[`${c}-has-error`]:P==="error",[`${c}-is-validating`]:P==="validating",[`${c}-hidden`]:f,[`${c}-${O}`]:O});return o.createElement("div",{className:k,style:a,ref:x},o.createElement(er,Object.assign({className:`${c}-row`},Je(p,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),o.createElement(Or,Object.assign({htmlFor:E},e,{requiredMark:S,required:$??C,prefixCls:t,vertical:I})),o.createElement(Sr,Object.assign({},e,d,{errors:g,warnings:N,prefixCls:t,status:P,help:s,marginBottom:_,onErrorVisibleChanged:z}),o.createElement(et.Provider,{value:b},o.createElement(st,{prefixCls:t,meta:d,errors:d.errors,warnings:d.warnings,hasFeedback:m,validateStatus:P,name:y},v)))),!!_&&o.createElement("div",{className:`${c}-margin-offset`,style:{marginBottom:-_}}))}const Fr="__SPLIT__";function Mr(e,t){const r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every(a=>{const s=e[a],i=t[a];return s===i||typeof s=="function"||typeof i=="function"})}const _r=o.memo(({children:e})=>e,(e,t)=>Mr(e.control,t.control)&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every((r,n)=>r===t.childProps[n]));function Ae(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Rr(e){const{name:t,noStyle:r,className:n,dependencies:a,prefixCls:s,shouldUpdate:i,rules:l,children:u,required:d,label:m,messageVariables:f,trigger:v="onChange",validateTrigger:E,hidden:$,help:C,layout:b}=e,{getPrefixCls:h}=o.useContext(Ee),{name:y}=o.useContext(J),p=pr(u),c=typeof p=="function",S=o.useContext(et),{validateTrigger:w}=o.useContext(Rt),O=E!==void 0?E:w,I=t!=null,x=h("form",s),g=xe(x),[N,B,W]=we(x,g);kt();const M=o.useContext(Tt),_=o.useRef(null),[R,z]=br({}),[D,P]=Lt(()=>Ae()),k=j=>{const A=M?.getKey(j.name);if(P(j.destroy?Ae():j,!0),r&&C!==!1&&S){let T=j.name;if(j.destroy)T=_.current||T;else if(A!==void 0){const[U,L]=A;T=[U].concat(Q(L)),_.current=T}S(j,T)}},F=(j,A)=>{z(T=>{const U=Object.assign({},T),Z=[].concat(Q(j.name.slice(0,-1)),Q(A)).join(Fr);return j.destroy?delete U[Z]:U[Z]=j,U})},[H,q]=o.useMemo(()=>{const j=Q(D.errors),A=Q(D.warnings);return Object.values(R).forEach(T=>{j.push.apply(j,Q(T.errors||[])),A.push.apply(A,Q(T.warnings||[]))}),[j,A]},[R,D.errors,D.warnings]),Y=hr();function G(j,A,T){return r&&!$?o.createElement(st,{prefixCls:x,hasFeedback:e.hasFeedback,validateStatus:e.validateStatus,meta:D,errors:H,warnings:q,noStyle:!0,name:t},j):o.createElement(Nr,Object.assign({key:"row"},e,{className:X(n,W,g,B),prefixCls:x,fieldId:A,isRequired:T,errors:H,warnings:q,meta:D,onSubItemMetaChange:F,layout:b,name:t}),j)}if(!I&&!c&&!a)return N(G(p));let K={};return typeof m=="string"?K.label=m:t&&(K.label=String(t)),f&&(K=Object.assign(Object.assign({},K),f)),N(o.createElement(At,Object.assign({},e,{messageVariables:K,trigger:v,validateTrigger:O,onMetaChange:k}),(j,A,T)=>{const U=he(t).length&&A?A.name:[],L=Jt(U,y),Z=d!==void 0?d:!!l?.some(V=>{if(V&&typeof V=="object"&&V.required&&!V.warningOnly)return!0;if(typeof V=="function"){const ne=V(T);return ne?.required&&!ne?.warningOnly}return!1}),ee=Object.assign({},j);let se=null;if(Array.isArray(p)&&I)se=p;else if(!(c&&(!(i||a)||I))){if(!(a&&!c&&!I))if(o.isValidElement(p)){const V=Object.assign(Object.assign({},p.props),ee);if(V.id||(V.id=L),C||H.length>0||q.length>0||e.extra){const oe=[];(C||H.length>0)&&oe.push(`${L}_help`),e.extra&&oe.push(`${L}_extra`),V["aria-describedby"]=oe.join(" ")}H.length>0&&(V["aria-invalid"]="true"),Z&&(V["aria-required"]="true"),Wt(p)&&(V.ref=Y(U,p)),new Set([].concat(Q(he(v)),Q(he(O)))).forEach(oe=>{V[oe]=(...Ie)=>{var Oe,Pe,pe,je,be;(pe=ee[oe])===null||pe===void 0||(Oe=pe).call.apply(Oe,[ee].concat(Ie)),(be=(je=p.props)[oe])===null||be===void 0||(Pe=be).call.apply(Pe,[je].concat(Ie))}});const ut=[V["aria-required"],V["aria-invalid"],V["aria-describedby"]];se=o.createElement(_r,{control:ee,update:p,childProps:ut},Dt(p,V))}else c&&(i||a)&&!I?se=p(T):se=p}return G(se,L,Z)}))}const lt=Rr;lt.useStatus=it;var kr=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const Tr=e=>{var{prefixCls:t,children:r}=e,n=kr(e,["prefixCls","children"]);const{getPrefixCls:a}=o.useContext(Ee),s=a("form",t),i=o.useMemo(()=>({prefixCls:s,status:"error"}),[s]);return o.createElement(Vt,Object.assign({},n),(l,u,d)=>o.createElement(Se.Provider,{value:i},r(l.map(m=>Object.assign(Object.assign({},m),{fieldKey:m.key})),u,{errors:d.errors,warnings:d.warnings})))};function Lr(){const{form:e}=o.useContext(J);return e}const re=gr;re.Item=lt;re.List=Tr;re.ErrorList=at;re.useForm=tt;re.useFormInstance=Lr;re.useWatch=zt;re.Provider=Ke;re.create=()=>{};var Ar={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Wr=function(){var t=o.useRef([]),r=o.useRef(null);return o.useEffect(function(){var n=Date.now(),a=!1;t.current.forEach(function(s){if(s){a=!0;var i=s.style;i.transitionDuration=".3s, .3s, .3s, .06s",r.current&&n-r.current<100&&(i.transitionDuration="0s, 0s")}}),a&&(r.current=Date.now())}),t.current},We=0,Dr=Ht();function Vr(){var e;return Dr?(e=We,We+=1):e="TEST_OR_SSR",e}const zr=(function(e){var t=o.useState(),r=Bt(t,2),n=r[0],a=r[1];return o.useEffect(function(){a("rc_progress_".concat(Vr()))},[]),e||n});var De=function(t){var r=t.bg,n=t.children;return o.createElement("div",{style:{width:"100%",height:"100%",background:r}},n)};function Ve(e,t){return Object.keys(e).map(function(r){var n=parseFloat(r),a="".concat(Math.floor(n*t),"%");return"".concat(e[r]," ").concat(a)})}var Br=o.forwardRef(function(e,t){var r=e.prefixCls,n=e.color,a=e.gradientId,s=e.radius,i=e.style,l=e.ptg,u=e.strokeLinecap,d=e.strokeWidth,m=e.size,f=e.gapDegree,v=n&&le(n)==="object",E=v?"#FFF":void 0,$=m/2,C=o.createElement("circle",{className:"".concat(r,"-circle-path"),r:s,cx:$,cy:$,stroke:E,strokeLinecap:u,strokeWidth:d,opacity:l===0?0:1,style:i,ref:t});if(!v)return C;var b="".concat(a,"-conic"),h=f?"".concat(180+f/2,"deg"):"0deg",y=Ve(n,(360-f)/360),p=Ve(n,1),c="conic-gradient(from ".concat(h,", ").concat(y.join(", "),")"),S="linear-gradient(to ".concat(f?"bottom":"top",", ").concat(p.join(", "),")");return o.createElement(o.Fragment,null,o.createElement("mask",{id:b},C),o.createElement("foreignObject",{x:0,y:0,width:m,height:m,mask:"url(#".concat(b,")")},o.createElement(De,{bg:S},o.createElement(De,{bg:c}))))}),ce=100,ve=function(t,r,n,a,s,i,l,u,d,m){var f=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,v=n/100*360*((360-i)/360),E=i===0?0:{bottom:0,top:180,left:90,right:-90}[l],$=(100-a)/100*r;d==="round"&&a!==100&&($+=m/2,$>=r&&($=r-.01));var C=ce/2;return{stroke:typeof u=="string"?u:void 0,strokeDasharray:"".concat(r,"px ").concat(t),strokeDashoffset:$+f,transform:"rotate(".concat(s+v+E,"deg)"),transformOrigin:"".concat(C,"px ").concat(C,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Hr=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function ze(e){var t=e??[];return Array.isArray(t)?t:[t]}var qr=function(t){var r=_e(_e({},Ar),t),n=r.id,a=r.prefixCls,s=r.steps,i=r.strokeWidth,l=r.trailWidth,u=r.gapDegree,d=u===void 0?0:u,m=r.gapPosition,f=r.trailColor,v=r.strokeLinecap,E=r.style,$=r.className,C=r.strokeColor,b=r.percent,h=qt(r,Hr),y=ce/2,p=zr(n),c="".concat(p,"-gradient"),S=y-i/2,w=Math.PI*2*S,O=d>0?90+d/2:-90,I=w*((360-d)/360),x=le(s)==="object"?s:{count:s,gap:2},g=x.count,N=x.gap,B=ze(b),W=ze(C),M=W.find(function(F){return F&&le(F)==="object"}),_=M&&le(M)==="object",R=_?"butt":v,z=ve(w,I,0,100,O,d,m,f,R,i),D=Wr(),P=function(){var H=0;return B.map(function(q,Y){var G=W[Y]||W[W.length-1],K=ve(w,I,H,q,O,d,m,G,R,i);return H+=q,o.createElement(Br,{key:Y,color:G,ptg:q,radius:S,prefixCls:a,gradientId:c,style:K,strokeLinecap:R,strokeWidth:i,gapDegree:d,ref:function(A){D[Y]=A},size:ce})}).reverse()},k=function(){var H=Math.round(g*(B[0]/100)),q=100/g,Y=0;return new Array(g).fill(null).map(function(G,K){var j=K<=H-1?W[0]:f,A=j&&le(j)==="object"?"url(#".concat(c,")"):void 0,T=ve(w,I,Y,q,O,d,m,j,"butt",i,N);return Y+=(I-T.strokeDashoffset+N)*100/I,o.createElement("circle",{key:K,className:"".concat(a,"-circle-path"),r:S,cx:y,cy:y,stroke:A,strokeWidth:i,opacity:1,style:T,ref:function(L){D[K]=L}})})};return o.createElement("svg",Ue({className:X("".concat(a,"-circle"),$),viewBox:"0 0 ".concat(ce," ").concat(ce),style:E,id:n,role:"presentation"},h),!g&&o.createElement("circle",{className:"".concat(a,"-circle-trail"),r:S,cx:y,cy:y,stroke:f,strokeLinecap:R,strokeWidth:l||i,style:z}),g?k():P())};function te(e){return!e||e<0?0:e>100?100:e}function me({success:e,successPercent:t}){let r=t;return e&&"progress"in e&&(r=e.progress),e&&"percent"in e&&(r=e.percent),r}const Xr=({percent:e,success:t,successPercent:r})=>{const n=te(me({success:t,successPercent:r}));return[n,te(te(e)-n)]},Kr=({success:e={},strokeColor:t})=>{const{strokeColor:r}=e;return[r||Ce.green,t||null]},ge=(e,t,r)=>{var n,a,s,i;let l=-1,u=-1;if(t==="step"){const d=r.steps,m=r.strokeWidth;typeof e=="string"||typeof e>"u"?(l=e==="small"?2:14,u=m??8):typeof e=="number"?[l,u]=[e,e]:[l=14,u=8]=Array.isArray(e)?e:[e.width,e.height],l*=d}else if(t==="line"){const d=r?.strokeWidth;typeof e=="string"||typeof e>"u"?u=d||(e==="small"?6:8):typeof e=="number"?[l,u]=[e,e]:[l=-1,u=8]=Array.isArray(e)?e:[e.width,e.height]}else(t==="circle"||t==="dashboard")&&(typeof e=="string"||typeof e>"u"?[l,u]=e==="small"?[60,60]:[120,120]:typeof e=="number"?[l,u]=[e,e]:Array.isArray(e)&&(l=(a=(n=e[0])!==null&&n!==void 0?n:e[1])!==null&&a!==void 0?a:120,u=(i=(s=e[0])!==null&&s!==void 0?s:e[1])!==null&&i!==void 0?i:120));return[l,u]},Gr=3,Ur=e=>Gr/e*100,Qr=e=>{const{prefixCls:t,trailColor:r=null,strokeLinecap:n="round",gapPosition:a,gapDegree:s,width:i=120,type:l,children:u,success:d,size:m=i,steps:f}=e,[v,E]=ge(m,"circle");let{strokeWidth:$}=e;$===void 0&&($=Math.max(Ur(v),6));const C={width:v,height:E,fontSize:v*.15+6},b=o.useMemo(()=>{if(s||s===0)return s;if(l==="dashboard")return 75},[s,l]),h=Xr(e),y=a||l==="dashboard"&&"bottom"||void 0,p=Object.prototype.toString.call(e.strokeColor)==="[object Object]",c=Kr({success:d,strokeColor:e.strokeColor}),S=X(`${t}-inner`,{[`${t}-circle-gradient`]:p}),w=o.createElement(qr,{steps:f,percent:f?h[1]:h,strokeWidth:$,trailWidth:$,strokeColor:f?c[1]:c,strokeLinecap:n,trailColor:r,prefixCls:t,gapDegree:b,gapPosition:y}),O=v<=20,I=o.createElement("div",{className:S,style:C},w,!O&&u);return O?o.createElement(Qe,{title:u},I):I},fe="--progress-line-stroke-color",ct="--progress-percent",Be=e=>{const t=e?"100%":"-100%";return new Xt(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},Yr=e=>{const{componentCls:t,iconCls:r}=e;return{[t]:Object.assign(Object.assign({},$e(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${fe})`]},height:"100%",width:`calc(1 / var(${ct}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[r]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${ie(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:Be(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:Be(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}},Zr=e=>{const{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{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}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}},Jr=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}},en=e=>{const{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}},tn=e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}),rn=He("Progress",e=>{const t=e.calc(e.marginXXS).div(2).equal(),r=Xe(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[Yr(r),Zr(r),Jr(r),en(r)]},tn);var nn=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const on=e=>{let t=[];return Object.keys(e).forEach(r=>{const n=Number.parseFloat(r.replace(/%/g,""));Number.isNaN(n)||t.push({key:n,value:e[r]})}),t=t.sort((r,n)=>r.key-n.key),t.map(({key:r,value:n})=>`${n} ${r}%`).join(", ")},an=(e,t)=>{const{from:r=Ce.blue,to:n=Ce.blue,direction:a=t==="rtl"?"to left":"to right"}=e,s=nn(e,["from","to","direction"]);if(Object.keys(s).length!==0){const l=on(s),u=`linear-gradient(${a}, ${l})`;return{background:u,[fe]:u}}const i=`linear-gradient(${a}, ${r}, ${n})`;return{background:i,[fe]:i}},sn=e=>{const{prefixCls:t,direction:r,percent:n,size:a,strokeWidth:s,strokeColor:i,strokeLinecap:l="round",children:u,trailColor:d=null,percentPosition:m,success:f}=e,{align:v,type:E}=m,$=i&&typeof i!="string"?an(i,r):{[fe]:i,background:i},C=l==="square"||l==="butt"?0:void 0,b=a??[-1,s||(a==="small"?6:8)],[h,y]=ge(b,"line",{strokeWidth:s}),p={backgroundColor:d||void 0,borderRadius:C},c=Object.assign(Object.assign({width:`${te(n)}%`,height:y,borderRadius:C},$),{[ct]:te(n)/100}),S=me(e),w={width:`${te(S)}%`,height:y,borderRadius:C,backgroundColor:f?.strokeColor},O={width:h<0?"100%":h},I=o.createElement("div",{className:`${t}-inner`,style:p},o.createElement("div",{className:X(`${t}-bg`,`${t}-bg-${E}`),style:c},E==="inner"&&u),S!==void 0&&o.createElement("div",{className:`${t}-success-bg`,style:w})),x=E==="outer"&&v==="start",g=E==="outer"&&v==="end";return E==="outer"&&v==="center"?o.createElement("div",{className:`${t}-layout-bottom`},I,u):o.createElement("div",{className:`${t}-outer`,style:O},x&&u,I,g&&u)},ln=e=>{const{size:t,steps:r,rounding:n=Math.round,percent:a=0,strokeWidth:s=8,strokeColor:i,trailColor:l=null,prefixCls:u,children:d}=e,m=n(r*(a/100)),v=t??[t==="small"?2:14,s],[E,$]=ge(v,"step",{steps:r,strokeWidth:s}),C=E/r,b=Array.from({length:r});for(let h=0;h<r;h++){const y=Array.isArray(i)?i[h]:i;b[h]=o.createElement("div",{key:h,className:X(`${u}-steps-item`,{[`${u}-steps-item-active`]:h<=m-1}),style:{backgroundColor:h<=m-1?y:l,width:C,height:$}})}return o.createElement("div",{className:`${u}-steps-outer`},b,d)};var cn=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const un=["normal","exception","active","success"],pn=o.forwardRef((e,t)=>{const{prefixCls:r,className:n,rootClassName:a,steps:s,strokeColor:i,percent:l=0,size:u="default",showInfo:d=!0,type:m="line",status:f,format:v,style:E,percentPosition:$={}}=e,C=cn(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:b="end",type:h="outer"}=$,y=Array.isArray(i)?i[0]:i,p=typeof i=="string"||Array.isArray(i)?i:void 0,c=o.useMemo(()=>{if(y){const P=typeof y=="string"?y:Object.values(y)[0];return new Kt(P).isLight()}return!1},[i]),S=o.useMemo(()=>{var P,k;const F=me(e);return Number.parseInt(F!==void 0?(P=F??0)===null||P===void 0?void 0:P.toString():(k=l??0)===null||k===void 0?void 0:k.toString(),10)},[l,e.success,e.successPercent]),w=o.useMemo(()=>!un.includes(f)&&S>=100?"success":f||"normal",[f,S]),{getPrefixCls:O,direction:I,progress:x}=o.useContext(Ee),g=O("progress",r),[N,B,W]=rn(g),M=m==="line",_=M&&!s,R=o.useMemo(()=>{if(!d)return null;const P=me(e);let k;const F=v||(q=>`${q}%`),H=M&&c&&h==="inner";return h==="inner"||v||w!=="exception"&&w!=="success"?k=F(te(l),te(P)):w==="exception"?k=M?o.createElement(Ye,null):o.createElement(Gt,null):w==="success"&&(k=M?o.createElement(Ze,null):o.createElement(Ut,null)),o.createElement("span",{className:X(`${g}-text`,{[`${g}-text-bright`]:H,[`${g}-text-${b}`]:_,[`${g}-text-${h}`]:_}),title:typeof k=="string"?k:void 0},k)},[d,l,S,w,m,g,v]);let z;m==="line"?z=s?o.createElement(ln,Object.assign({},e,{strokeColor:p,prefixCls:g,steps:typeof s=="object"?s.count:s}),R):o.createElement(sn,Object.assign({},e,{strokeColor:y,prefixCls:g,direction:I,percentPosition:{align:b,type:h}}),R):(m==="circle"||m==="dashboard")&&(z=o.createElement(Qr,Object.assign({},e,{strokeColor:y,prefixCls:g,progressStatus:w}),R));const D=X(g,`${g}-status-${w}`,{[`${g}-${m==="dashboard"&&"circle"||m}`]:m!=="line",[`${g}-inline-circle`]:m==="circle"&&ge(u,"circle")[0]<=20,[`${g}-line`]:_,[`${g}-line-align-${b}`]:_,[`${g}-line-position-${h}`]:_,[`${g}-steps`]:s,[`${g}-show-info`]:d,[`${g}-${u}`]:typeof u=="string",[`${g}-rtl`]:I==="rtl"},x?.className,n,a,B,W);return N(o.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},x?.style),E),className:D,role:"progressbar","aria-valuenow":S,"aria-valuemin":0,"aria-valuemax":100},Je(C,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),z))});function bn(){const e=Qt(),[t,r]=o.useState(!1),{data:n,isLoading:a,isError:s}=Yt({queryKey:ke.AUTH_STATUS,queryFn:()=>Re.getAuthStatus(),retry:!1,staleTime:0,refetchOnMount:!0,refetchOnWindowFocus:!1}),i=!s&&Zt(n),l=tr({mutationFn:d=>Re.loginWithToken(d),onSuccess:()=>{e.invalidateQueries({queryKey:ke.AUTH_STATUS}),r(!1)},onError:()=>{r(!1)}});return{authenticated:i,isLoading:a,isError:s,data:n,loginWithTokenAsync:async d=>{r(!0);try{await l.mutateAsync(d)}finally{r(!1)}},isLoggingInWithToken:t}}export{re as F,pn as P,wr as R,bn as u};
|
|
9
|
+
//# sourceMappingURL=useAuth-4erTEEjT.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a2 as h,i as Z,n as G,h as H,o as ee,a3 as U,_ as j,a4 as re,a5 as se,a6 as ne,a7 as le,w as ce,a8 as de,p as ue,a9 as ge,r as M,D as fe,v as me,x as ye,A as _,aa as Ce,z as pe,ab as ve,C as he,ac as be,J as Ie,ad as xe,ae as W,af as $e,ag as J,I as Se,a as I,U as Q,u as Y,Q as R}from"./index-
|
|
1
|
+
import{a2 as h,i as Z,n as G,h as H,o as ee,a3 as U,_ as j,a4 as re,a5 as se,a6 as ne,a7 as le,w as ce,a8 as de,p as ue,a9 as ge,r as M,D as fe,v as me,x as ye,A as _,aa as Ce,z as pe,ab as ve,C as he,ac as be,J as Ie,ad as xe,ae as W,af as $e,ag as J,I as Se,a as I,U as Q,u as Y,Q as R}from"./index-HJggy9SZ.js";import{u as B}from"./errorCodeTranslator-Xn_Z9qOh.js";import{u as V}from"./useErrorHandler-Bcb3l7ju.js";var ae=h.forwardRef(function(e,n){var a=e.prefixCls,t=e.forceRender,d=e.className,u=e.style,s=e.children,r=e.isActive,o=e.role,i=e.classNames,m=e.styles,g=h.useState(r||t),C=Z(g,2),c=C[0],f=C[1];return h.useEffect(function(){(t||r)&&f(!0)},[t,r]),c?h.createElement("div",{ref:n,className:G("".concat(a,"-content"),H(H({},"".concat(a,"-content-active"),r),"".concat(a,"-content-inactive"),!r),d),style:u,role:o},h.createElement("div",{className:G("".concat(a,"-content-box"),i?.body),style:m?.body},s)):null});ae.displayName="PanelContent";var we=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],te=h.forwardRef(function(e,n){var a=e.showArrow,t=a===void 0?!0:a,d=e.headerClass,u=e.isActive,s=e.onItemClick,r=e.forceRender,o=e.className,i=e.classNames,m=i===void 0?{}:i,g=e.styles,C=g===void 0?{}:g,c=e.prefixCls,f=e.collapsible,p=e.accordion,x=e.panelKey,y=e.extra,v=e.header,b=e.expandIcon,l=e.openMotion,w=e.destroyInactivePanel,$=e.children,A=ee(e,we),S=f==="disabled",P=y!=null&&typeof y!="boolean",N=H(H(H({onClick:function(){s?.(x)},onKeyDown:function(O){(O.key==="Enter"||O.keyCode===U.ENTER||O.which===U.ENTER)&&s?.(x)},role:p?"tab":"button"},"aria-expanded",u),"aria-disabled",S),"tabIndex",S?-1:0),k=typeof b=="function"?b(e):h.createElement("i",{className:"arrow"}),z=k&&h.createElement("div",j({className:"".concat(c,"-expand-icon")},["header","icon"].includes(f)?N:{}),k),T=G("".concat(c,"-item"),H(H({},"".concat(c,"-item-active"),u),"".concat(c,"-item-disabled"),S),o),D=G(d,"".concat(c,"-header"),H({},"".concat(c,"-collapsible-").concat(f),!!f),m.header),F=re({className:D,style:C.header},["header","icon"].includes(f)?{}:N);return h.createElement("div",j({},A,{ref:n,className:T}),h.createElement("div",F,t&&z,h.createElement("span",j({className:"".concat(c,"-header-text")},f==="header"?N:{}),v),P&&h.createElement("div",{className:"".concat(c,"-extra")},y)),h.createElement(se,j({visible:u,leavedClassName:"".concat(c,"-content-hidden")},l,{forceRender:r,removeOnLeave:w}),function(E,O){var L=E.className,q=E.style;return h.createElement(ae,{ref:O,prefixCls:c,className:L,classNames:m,style:q,styles:C,isActive:u,forceRender:r,role:p?"tabpanel":void 0},$)}))}),Pe=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Ne=function(n,a){var t=a.prefixCls,d=a.accordion,u=a.collapsible,s=a.destroyInactivePanel,r=a.onItemClick,o=a.activeKey,i=a.openMotion,m=a.expandIcon;return n.map(function(g,C){var c=g.children,f=g.label,p=g.key,x=g.collapsible,y=g.onItemClick,v=g.destroyInactivePanel,b=ee(g,Pe),l=String(p??C),w=x??u,$=v??s,A=function(N){w!=="disabled"&&(r(N),y?.(N))},S=!1;return d?S=o[0]===l:S=o.indexOf(l)>-1,h.createElement(te,j({},b,{prefixCls:t,key:l,panelKey:l,isActive:S,accordion:d,openMotion:i,expandIcon:m,header:f,collapsible:w,onItemClick:A,destroyInactivePanel:$}),c)})},Ae=function(n,a,t){if(!n)return null;var d=t.prefixCls,u=t.accordion,s=t.collapsible,r=t.destroyInactivePanel,o=t.onItemClick,i=t.activeKey,m=t.openMotion,g=t.expandIcon,C=n.key||String(a),c=n.props,f=c.header,p=c.headerClass,x=c.destroyInactivePanel,y=c.collapsible,v=c.onItemClick,b=!1;u?b=i[0]===C:b=i.indexOf(C)>-1;var l=y??s,w=function(S){l!=="disabled"&&(o(S),v?.(S))},$={key:C,panelKey:C,header:f,headerClass:p,isActive:b,prefixCls:d,destroyInactivePanel:x??r,openMotion:m,accordion:u,children:n.props.children,onItemClick:w,expandIcon:g,collapsible:l};return typeof n.type=="string"?n:(Object.keys($).forEach(function(A){typeof $[A]>"u"&&delete $[A]}),h.cloneElement(n,$))};function Fe(e,n,a){return Array.isArray(e)?Ne(e,a):ne(n).map(function(t,d){return Ae(t,d,a)})}function Ee(e){var n=e;if(!Array.isArray(n)){var a=ue(n);n=a==="number"||a==="string"?[n]:[]}return n.map(function(t){return String(t)})}var Oe=h.forwardRef(function(e,n){var a=e.prefixCls,t=a===void 0?"rc-collapse":a,d=e.destroyInactivePanel,u=d===void 0?!1:d,s=e.style,r=e.accordion,o=e.className,i=e.children,m=e.collapsible,g=e.openMotion,C=e.expandIcon,c=e.activeKey,f=e.defaultActiveKey,p=e.onChange,x=e.items,y=G(t,o),v=le([],{value:c,onChange:function(P){return p?.(P)},defaultValue:f,postState:Ee}),b=Z(v,2),l=b[0],w=b[1],$=function(P){return w(function(){if(r)return l[0]===P?[]:[P];var N=l.indexOf(P),k=N>-1;return k?l.filter(function(z){return z!==P}):[].concat(ge(l),[P])})};ce(!i,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var A=Fe(x,i,{prefixCls:t,accordion:r,openMotion:g,expandIcon:C,collapsible:m,destroyInactivePanel:u,onItemClick:$,activeKey:l});return h.createElement("div",j({ref:n,className:y,style:s,role:r?"tablist":void 0},de(e,{aria:!0,data:!0})),A)});const X=Object.assign(Oe,{Panel:te});X.Panel;const Me=M.forwardRef((e,n)=>{const{getPrefixCls:a}=M.useContext(fe),{prefixCls:t,className:d,showArrow:u=!0}=e,s=a("collapse",t),r=G({[`${s}-no-arrow`]:!u},d);return M.createElement(X.Panel,Object.assign({ref:n},e,{prefixCls:s,className:r}))}),Re=e=>{const{componentCls:n,contentBg:a,padding:t,headerBg:d,headerPadding:u,collapseHeaderPaddingSM:s,collapseHeaderPaddingLG:r,collapsePanelBorderRadius:o,lineWidth:i,lineType:m,colorBorder:g,colorText:C,colorTextHeading:c,colorTextDisabled:f,fontSizeLG:p,lineHeight:x,lineHeightLG:y,marginSM:v,paddingSM:b,paddingLG:l,paddingXS:w,motionDurationSlow:$,fontSizeIcon:A,contentPadding:S,fontHeight:P,fontHeightLG:N}=e,k=`${_(i)} ${m} ${g}`;return{[n]:Object.assign(Object.assign({},pe(e)),{backgroundColor:d,border:k,borderRadius:o,"&-rtl":{direction:"rtl"},[`& > ${n}-item`]:{borderBottom:k,"&:first-child":{[`
|
|
2
2
|
&,
|
|
3
3
|
& > ${n}-header`]:{borderRadius:`${_(o)} ${_(o)} 0 0`}},"&:last-child":{[`
|
|
4
4
|
&,
|
|
@@ -6,4 +6,4 @@ import{a2 as h,i as Z,n as G,h as H,o as ee,a3 as U,_ as j,a4 as re,a5 as se,a6
|
|
|
6
6
|
> ${n}-item:last-child,
|
|
7
7
|
> ${n}-item:last-child ${n}-header
|
|
8
8
|
`]:{borderRadius:0},[`> ${n}-item:last-child`]:{borderBottom:0},[`> ${n}-item > ${n}-content`]:{backgroundColor:d,borderTop:0},[`> ${n}-item > ${n}-content > ${n}-content-box`]:{padding:t}}}},ke=e=>{const{componentCls:n,paddingSM:a}=e;return{[`${n}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${n}-item`]:{borderBottom:0,[`> ${n}-content`]:{backgroundColor:"transparent",border:0,[`> ${n}-content-box`]:{paddingBlock:a}}}}}},He=e=>({headerPadding:`${e.paddingSM}px ${e.padding}px`,headerBg:e.colorFillAlter,contentPadding:`${e.padding}px 16px`,contentBg:e.colorBgContainer,borderlessContentPadding:`${e.paddingXXS}px 16px ${e.padding}px`,borderlessContentBg:"transparent"}),Be=me("Collapse",e=>{const n=ye(e,{collapseHeaderPaddingSM:`${_(e.paddingXS)} ${_(e.paddingSM)}`,collapseHeaderPaddingLG:`${_(e.padding)} ${_(e.paddingLG)}`,collapsePanelBorderRadius:e.borderRadiusLG});return[Re(n),Ke(n),ke(n),_e(n),Ce(n)]},He),Ge=M.forwardRef((e,n)=>{const{getPrefixCls:a,direction:t,expandIcon:d,className:u,style:s}=be("collapse"),{prefixCls:r,className:o,rootClassName:i,style:m,bordered:g=!0,ghost:C,size:c,expandIconPosition:f="start",children:p,destroyInactivePanel:x,destroyOnHidden:y,expandIcon:v}=e,b=Ie(F=>{var E;return(E=c??F)!==null&&E!==void 0?E:"middle"}),l=a("collapse",r),w=a(),[$,A,S]=Be(l),P=M.useMemo(()=>f==="left"?"start":f==="right"?"end":f,[f]),N=v??d,k=M.useCallback((F={})=>{const E=typeof N=="function"?N(F):M.createElement(xe,{rotate:F.isActive?t==="rtl"?-90:90:void 0,"aria-label":F.isActive?"expanded":"collapsed"});return W(E,()=>{var O;return{className:G((O=E.props)===null||O===void 0?void 0:O.className,`${l}-arrow`)}})},[N,l,t]),z=G(`${l}-icon-position-${P}`,{[`${l}-borderless`]:!g,[`${l}-rtl`]:t==="rtl",[`${l}-ghost`]:!!C,[`${l}-${b}`]:b!=="middle"},u,o,i,A,S),T=M.useMemo(()=>Object.assign(Object.assign({},$e(w)),{motionAppear:!1,leavedClassName:`${l}-content-hidden`}),[w,l]),D=M.useMemo(()=>p?ne(p).map((F,E)=>{var O,L;const q=F.props;if(q?.disabled){const ie=(O=F.key)!==null&&O!==void 0?O:String(E),oe=Object.assign(Object.assign({},J(F.props,["disabled"])),{key:ie,collapsible:(L=q.collapsible)!==null&&L!==void 0?L:"disabled"});return W(F,oe)}return F}):null,[p]);return $(M.createElement(X,Object.assign({ref:n,openMotion:T},J(e,["rootClassName"]),{expandIcon:k,prefixCls:l,className:z,style:Object.assign(Object.assign({},s),m),destroyInactivePanel:y??x}),D))}),De=Object.assign(Ge,{Panel:Me});var je={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{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"}},{tag:"path",attrs:{d:"M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z"}}]},name:"play-circle",theme:"outlined"},qe=function(n,a){return M.createElement(Se,j({},n,{ref:a,icon:je}))},Qe=M.forwardRef(qe);const K={async getConfig(){return(await I.getConfig()).data.data},async updateConfig(e){return(await I.updateConfig(e)).data.data},async validateConfig(e){return(await I.validateConfig(e)).data.data},async backupConfig(){return(await I.backupConfig()).data.data},async restoreConfig(e){return(await I.restoreConfig(e)).data.data},async getConfigHistory(){return(await I.getConfigHistory()).data.data},async saveConfigHistory(e,n,a){return{id:(await I.saveConfigHistory(e,n,a)).data.data.id,name:e,description:a??null,config:n,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),is_active:0}},async applyConfigHistory(e){await I.applyConfigHistory(e)},async deleteConfigHistory(e){await I.deleteConfigHistory(e)},async listConfigFiles(){return(await I.listConfigFiles()).data.data},async switchConfigFile(e){await I.switchConfigFile(e)},async importConfigFile(e,n){const t=(await I.importConfigFile(e,n)).data.data;return{filename:t.filename,path:t.path,pathRelative:t.pathRelative,modifiedTime:new Date().toISOString(),size:0,isActive:!1}},async deleteConfigFile(e){await I.deleteConfigFile(e)},async getConfigFileContent(e){return(await I.getConfigFileContent(e)).data.data},async updateConfigFileContent(e,n){await I.updateConfigFileContent(e,n)},async diagnoseConfig(){return(await I.diagnoseConfig()).data.data},async repairConfig(e=!0){return(await I.repairConfig(e)).data.data}};function Ye(){const e=Q(),{handleError:n}=V(),{data:a,isLoading:t,error:d,refetch:u}=Y({queryKey:R.CONFIG,queryFn:()=>K.getConfig()}),s=B({mutationFn:o=>K.updateConfig(o),onSuccess:()=>{e.invalidateQueries({queryKey:R.CONFIG})},onError:o=>n(o)}),r=B({mutationFn:o=>K.validateConfig(o),onError:o=>n(o)});return{config:a,isLoading:t,error:d,refetch:u,update:s.mutate,updateAsync:s.mutateAsync,isUpdating:s.isPending,validate:r.mutate,validateAsync:r.mutateAsync,isValidating:r.isPending,validationResult:r.data}}function Ve(){const e=Q(),{handleError:n}=V(),{data:a,isLoading:t,error:d,refetch:u}=Y({queryKey:R.CONFIG_FILES,queryFn:()=>K.listConfigFiles()}),s=B({mutationFn:i=>K.switchConfigFile(i),onSuccess:()=>{e.invalidateQueries({queryKey:R.CONFIG_FILES}),e.invalidateQueries({queryKey:R.CONFIG})},onError:i=>n(i)}),r=B({mutationFn:({config:i,name:m})=>K.importConfigFile(i,m),onSuccess:()=>{e.invalidateQueries({queryKey:R.CONFIG_FILES})},onError:i=>n(i)}),o=B({mutationFn:i=>K.deleteConfigFile(i),onSuccess:()=>{e.invalidateQueries({queryKey:R.CONFIG_FILES})},onError:i=>n(i)});return{configFiles:a||[],isLoading:t,error:d,refetch:u,switchFile:s.mutate,switchFileAsync:s.mutateAsync,isSwitching:s.isPending,importFile:r.mutate,importFileAsync:r.mutateAsync,isImporting:r.isPending,deleteFile:o.mutate,deleteFileAsync:o.mutateAsync,isDeleting:o.isPending}}function Xe(){const e=Q(),{handleError:n}=V(),{data:a,isLoading:t,error:d,refetch:u}=Y({queryKey:R.CONFIG_HISTORY,queryFn:()=>K.getConfigHistory()}),s=B({mutationFn:({name:i,config:m,description:g})=>K.saveConfigHistory(i,m,g),onSuccess:()=>{e.invalidateQueries({queryKey:R.CONFIG_HISTORY})},onError:i=>n(i)}),r=B({mutationFn:i=>K.applyConfigHistory(i),onSuccess:()=>{e.invalidateQueries({queryKey:R.CONFIG_HISTORY}),e.invalidateQueries({queryKey:R.CONFIG})},onError:i=>n(i)}),o=B({mutationFn:i=>K.deleteConfigHistory(i),onSuccess:()=>{e.invalidateQueries({queryKey:R.CONFIG_HISTORY})},onError:i=>n(i)});return{history:a||[],isLoading:t,error:d,refetch:u,save:s.mutate,saveAsync:s.mutateAsync,isSaving:s.isPending,apply:r.mutate,applyAsync:r.mutateAsync,isApplying:r.isPending,delete:o.mutate,deleteAsync:o.mutateAsync,isDeleting:o.isPending}}export{De as C,Qe as R,Ve as a,Xe as b,K as c,Ye as u};
|
|
9
|
-
//# sourceMappingURL=useConfig-
|
|
9
|
+
//# sourceMappingURL=useConfig-BmhXnAiM.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as A,I as v,_ as O,a as r,U as S,u as D,Q as o}from"./index-
|
|
2
|
-
//# sourceMappingURL=useDownload-
|
|
1
|
+
import{r as A,I as v,_ as O,a as r,U as S,u as D,Q as o}from"./index-HJggy9SZ.js";import{u as T}from"./errorCodeTranslator-Xn_Z9qOh.js";import{a as f,r as L}from"./socket-oqYz9cKb.js";import{u as g}from"./useErrorHandler-Bcb3l7ju.js";var E={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{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"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"},q=function(t,a){return A.createElement(v,O({},t,{ref:a,icon:E}))},I=A.forwardRef(q);const c={async startDownload(e,t,a){return(await r.startDownload(e,t,a)).data.data},async stopDownload(e){await r.stopDownload(e)},async getDownloadStatus(e){return(await r.getDownloadStatus(e)).data.data},async getTaskLogs(e,t){return(await r.getTaskLogs(e,t)).data.data},async getDownloadHistory(e){return(await r.getDownloadHistory(e)).data.data},async runAllDownloads(e){return(await r.runAllDownloads(e)).data.data},async randomDownload(e){return(await r.randomDownload(e)).data.data},async getIncompleteTasks(){return(await r.getIncompleteTasks()).data.data},async resumeDownload(e,t){return(await r.resumeDownload(e,t)).data.data},async deleteIncompleteTask(e){await r.deleteIncompleteTask(e)},async deleteAllIncompleteTasks(){return(await r.deleteAllIncompleteTasks()).data.data},async deleteTaskHistory(e){return(await r.deleteTaskHistory(e)).data.data},async deleteAllTaskHistory(){return(await r.deleteAllTaskHistory()).data.data}};function Q(){const e=S(),{handleError:t}=g(),a=T({mutationFn:({targetId:n,config:u,configPaths:l})=>c.startDownload(n,u,l),onSuccess:()=>{e.invalidateQueries({queryKey:o.DOWNLOAD_STATUS()})},onError:n=>t(n)}),s=T({mutationFn:n=>c.stopDownload(n),onSuccess:()=>{e.invalidateQueries({queryKey:o.DOWNLOAD_STATUS()})},onError:n=>t(n)});return{start:a.mutate,startAsync:a.mutateAsync,isStarting:a.isPending,stop:s.mutate,stopAsync:s.mutateAsync,isStopping:s.isPending}}function N(e,t){const a=S(),{data:s,isLoading:n,error:u,refetch:l}=D({queryKey:o.DOWNLOAD_STATUS(e),queryFn:()=>c.getDownloadStatus(e),refetchInterval:t});return A.useEffect(()=>{const d=f(),y=()=>a.getQueryData(o.DOWNLOAD_STATUS(void 0))?.activeTask?.status??null,i=(...m)=>{const p=m[0];if(!p||p.kind!=="snapshot")return;const w=y(),k=p.status.activeTask;a.setQueryData(o.DOWNLOAD_STATUS(void 0),p.status),w==="running"&&k===null&&!p.status.hasActiveTask&&(a.invalidateQueries({queryKey:["stats"]}),a.invalidateQueries({queryKey:o.DOWNLOAD_HISTORY()}),a.invalidateQueries({queryKey:o.INCOMPLETE_TASKS}))};return d.on("download",i),()=>{d.off("download",i),L()}},[a,e]),{status:s,isLoading:n,error:u,refetch:l,hasActiveTask:s?.hasActiveTask??!1,activeTask:s?.activeTask,allTasks:s?.allTasks??[]}}function M(e,t,a){const{data:s,isLoading:n,error:u,refetch:l}=D({queryKey:o.DOWNLOAD_LOGS(e),queryFn:()=>c.getTaskLogs(e,t),enabled:!!e,refetchInterval:e&&a?a:!1});return{logs:s?.logs??[],isLoading:n,error:u,refetch:l}}function H(e){const{data:t,isLoading:a,error:s,refetch:n}=D({queryKey:o.DOWNLOAD_HISTORY(e),queryFn:()=>c.getDownloadHistory(e)});return{items:t?.items??[],total:t?.total??0,page:t?.page??1,limit:t?.limit??20,isLoading:a,error:s,refetch:n}}function P(){const e=S(),{handleError:t}=g(),{data:a,isLoading:s,error:n,refetch:u}=D({queryKey:o.INCOMPLETE_TASKS,queryFn:()=>c.getIncompleteTasks()}),l=T({mutationFn:({tag:i,type:m})=>c.resumeDownload(i,m),onSuccess:()=>{e.invalidateQueries({queryKey:o.INCOMPLETE_TASKS}),e.invalidateQueries({queryKey:o.DOWNLOAD_STATUS()})},onError:i=>t(i)}),d=T({mutationFn:i=>c.deleteIncompleteTask(i),onSuccess:()=>{e.invalidateQueries({queryKey:o.INCOMPLETE_TASKS})},onError:i=>t(i)}),y=T({mutationFn:()=>c.deleteAllIncompleteTasks(),onSuccess:()=>{e.invalidateQueries({queryKey:o.INCOMPLETE_TASKS})},onError:i=>t(i)});return{tasks:a?.tasks??[],isLoading:s,error:n,refetch:u,resume:l.mutate,resumeAsync:l.mutateAsync,isResuming:l.isPending,delete:d.mutate,deleteAsync:d.mutateAsync,isDeleting:d.isPending,deleteAll:y.mutate,deleteAllAsync:y.mutateAsync,isDeletingAll:y.isPending}}export{I as R,N as a,M as b,P as c,c as d,H as e,Q as u};
|
|
2
|
+
//# sourceMappingURL=useDownload-DhuPPKqw.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as f,r as e,bj as m,V as b,s as n}from"./index-HJggy9SZ.js";import{t as g}from"./errorCodeTranslator-Xn_Z9qOh.js";function C(){const{t:o}=f(),t=e.useCallback((s,a)=>{if(a)return a;const r=g(s.code,o,s.params,s.message);return r||s.message||o("common.error.unknown")},[o]),c=e.useCallback((s,a)=>{const r=s instanceof m?s:b(s),d=t(r,a);return n.error(d),r},[t]),l=e.useCallback(s=>{n.success(s)},[]),u=e.useCallback(s=>{n.warning(s)},[]),i=e.useCallback(s=>{n.info(s)},[]);return{handleError:c,handleSuccess:l,handleWarning:u,handleInfo:i}}export{C as u};
|
|
2
|
+
//# sourceMappingURL=useErrorHandler-Bcb3l7ju.js.map
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>PixivFlow - WebUI</title>
|
|
8
|
-
<script type="module" crossorigin src="./assets/index-
|
|
8
|
+
<script type="module" crossorigin src="./assets/index-HJggy9SZ.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="./assets/index-DHwJxrFi.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as o,R as x,u as p,Q as f,b as S,r as g,s as c,j as s,S as j,B as y,c as w,d as v,e as R}from"./index-DG6kGbYq.js";import{R as u,C as i,a as d}from"./row-_c51T55h.js";import{S as h}from"./index-DarObP-C.js";import{R as m}from"./PictureOutlined-U51jGr2U.js";const b={async getStatsOverview(){return(await o.getStatsOverview()).data.data},async getDownloadStats(t){return(await o.getDownloadStats(t)).data.data},async getTagStats(t){return(await o.getTagStats(t)).data.data},async getAuthorStats(t){return(await o.getAuthorStats(t)).data.data}};function D(t=x.STATS_OVERVIEW){const{data:a,isLoading:e,error:r,refetch:l}=p({queryKey:f.STATS_OVERVIEW,queryFn:()=>b.getStatsOverview(),refetchInterval:t});return{stats:a,isLoading:e,error:r,refetch:l}}function C(){const{t}=S(),{stats:a,isLoading:e,refetch:r}=D(),l=g.useCallback(async()=>{c.loading({content:t("dashboard.refreshingStats"),key:"refresh-stats"});try{await r(),c.success({content:t("dashboard.statsRefreshed"),key:"refresh-stats",duration:2})}catch{c.error({content:t("dashboard.refreshStatsFailed"),key:"refresh-stats",duration:2})}},[r,t]);if(e)return s.jsx(j,{size:"large",style:{display:"block",textAlign:"center",marginTop:50}});const n=a||{totalDownloads:0,illustrations:0,novels:0,recentDownloads:0};return s.jsxs("div",{children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[s.jsx("h2",{style:{margin:0},children:t("dashboard.title")}),s.jsx(y,{icon:s.jsx(w,{}),onClick:l,loading:e,children:t("dashboard.refreshStats")})]}),s.jsxs(u,{gutter:16,style:{marginTop:24},children:[s.jsx(i,{span:8,children:s.jsx(d,{children:s.jsx(h,{title:t("dashboard.totalDownloads"),value:n.totalDownloads,prefix:s.jsx(v,{})})})}),s.jsx(i,{span:8,children:s.jsx(d,{children:s.jsx(h,{title:t("dashboard.illustrations"),value:n.illustrations,prefix:s.jsx(m,{})})})}),s.jsx(i,{span:8,children:s.jsx(d,{children:s.jsx(h,{title:t("dashboard.novels"),value:n.novels,prefix:s.jsx(R,{})})})})]}),s.jsx(u,{gutter:16,style:{marginTop:16},children:s.jsx(i,{span:24,children:s.jsx(d,{title:t("dashboard.recentDownloads"),children:s.jsx("p",{children:t("dashboard.recentDownloadsDesc",{count:n.recentDownloads})})})})})]})}export{C as default};
|
|
2
|
-
//# sourceMappingURL=Dashboard-aqPMquSO.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as g,I as G,_ as X,b as C,j as e,d as fe,W as y,Y as oe,B as k,c as Q,Z as D,U as je,S as ye,s as f,Q as U,X as K,a as ae,u as Te}from"./index-DG6kGbYq.js";import{R as W,d as se,u as ke,a as Ce,b as Ie,c as ve}from"./useDownload-BlxvZNEm.js";import{R as re,C as Se,u as De}from"./useConfig-Ds7RpIL1.js";import{a as O,R as be,C as H}from"./row-_c51T55h.js";import{S as B}from"./index-DarObP-C.js";import{R as Z}from"./CheckCircleOutlined-H3DnUyMO.js";import{R as J}from"./CloseCircleOutlined-BFfS5iXd.js";import{u as Re,P as Ae,F as E}from"./useAuth-wCjAOx6S.js";import{T as R}from"./index-_EG4kaKN.js";import{f as b}from"./dateUtils-gQt2uAjS.js";import{D as I}from"./index-Bbsa44oT.js";import{T as F}from"./index-CJln3zA7.js";import{M as Y}from"./index-CDrp3NIf.js";import{R as V}from"./DeleteOutlined-BFmW1oWe.js";import{F as de}from"./useErrorHandler-BOvHue1w.js";import{P as ne}from"./index-CfHs6AUn.js";import{R as $e}from"./ClearOutlined-BpODq7I7.js";import{e as v,t as S}from"./errorCodeTranslator-BqIackMm.js";import"./socket-oqYz9cKb.js";var Me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{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"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},Fe=function(p,m){return g.createElement(G,X({},p,{ref:m,icon:Me}))},q=g.forwardRef(Fe),ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M758.2 839.1C851.8 765.9 912 651.9 912 523.9 912 303 733.5 124.3 512.6 124 291.4 123.7 112 302.8 112 523.9c0 125.2 57.5 236.9 147.6 310.2 3.5 2.8 8.6 2.2 11.4-1.3l39.4-50.5c2.7-3.4 2.1-8.3-1.2-11.1-8.1-6.6-15.9-13.7-23.4-21.2a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-9.3 9.3-19.1 18-29.3 26L668.2 724a8 8 0 00-14.1 3l-39.6 162.2c-1.2 5 2.6 9.9 7.7 9.9l167 .8c6.7 0 10.5-7.7 6.3-12.9l-37.3-47.9z"}}]},name:"redo",theme:"outlined"},Oe=function(p,m){return g.createElement(G,X({},p,{ref:m,icon:ze}))},Le=g.forwardRef(Oe),Pe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{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-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z"}}]},name:"stop",theme:"outlined"},He=function(p,m){return g.createElement(G,X({},p,{ref:m,icon:Pe}))},z=g.forwardRef(He);const Be=({total:o,completed:p,failed:m,stopped:n})=>{const{t:l}=C();return e.jsx(O,{style:{marginBottom:16},children:e.jsxs(be,{gutter:16,children:[e.jsx(H,{span:6,children:e.jsx(B,{title:l("download.totalTasks"),value:o,prefix:e.jsx(fe,{})})}),e.jsx(H,{span:6,children:e.jsx(B,{title:l("download.completed"),value:p,valueStyle:{color:"#3f8600"},prefix:e.jsx(Z,{})})}),e.jsx(H,{span:6,children:e.jsx(B,{title:l("download.failed"),value:m,valueStyle:{color:"#cf1322"},prefix:e.jsx(J,{})})}),e.jsx(H,{span:6,children:e.jsx(B,{title:l("download.stopped"),value:n,valueStyle:{color:"#8c8c8c"},prefix:e.jsx(z,{})})})]})})},{Text:$}=R,Ee=({hasActiveTask:o,onStartClick:p,onRunAllClick:m,onStopClick:n,isStarting:l,isRunningAll:s,isStopping:d,storage:i,onRefreshConfig:u})=>{const{t}=C(),{authenticated:w}=Re(),r=!w,h=t("common.loginRequired"),a=i?.illustrationDirectory||(i?.downloadDirectory?`${i.downloadDirectory}/illustrations`:"./downloads/illustrations"),c=i?.novelDirectory||(i?.downloadDirectory?`${i.downloadDirectory}/novels`:"./downloads/novels");return e.jsxs(O,{title:e.jsxs(y,{children:[e.jsx(q,{}),e.jsx("span",{children:t("download.taskOperations")})]}),style:{marginBottom:16},children:[e.jsxs(y,{wrap:!0,children:[e.jsx(oe,{title:r?h:void 0,children:e.jsx(k,{type:"primary",size:"large",icon:e.jsx(re,{}),onClick:p,disabled:o||r,loading:l,children:t("download.startDownload")})}),e.jsx(oe,{title:r?h:void 0,children:e.jsx(k,{size:"large",icon:e.jsx(Q,{}),onClick:m,disabled:o||r,loading:s,children:t("download.downloadAll")})}),e.jsx(k,{danger:!0,size:"large",icon:e.jsx(z,{}),onClick:n,disabled:!o,loading:d,children:t("download.stopCurrent")})]}),o&&e.jsx(D,{message:t("download.hasActiveTask"),description:t("download.hasActiveTaskDesc"),type:"info",showIcon:!0,style:{marginTop:16}}),i&&e.jsx(D,{message:e.jsxs(y,{children:[e.jsx("span",{children:t("download.fileSavePath")}),u&&e.jsx(k,{type:"text",size:"small",icon:e.jsx(Q,{}),onClick:u,title:t("download.refreshPath")})]}),description:e.jsxs(y,{direction:"vertical",size:"small",style:{width:"100%"},children:[e.jsxs($,{children:[e.jsx($,{strong:!0,children:t("download.illustrationPath")}),a]}),e.jsxs($,{children:[e.jsx($,{strong:!0,children:t("download.novelPath")}),c]}),e.jsx($,{type:"secondary",style:{fontSize:"12px"},children:t("download.pathTip")})]}),type:"info",showIcon:!0,style:{marginTop:16}})]})},_e=({logs:o,isRunning:p=!1})=>{const{t:m}=C(),n=g.useRef(null);if(g.useEffect(()=>{n.current&&o.length>0&&n.current.scrollIntoView({behavior:"smooth"})},[o]),!o||o.length===0)return null;const l={error:"#ff4d4f",warn:"#faad14",info:"#1890ff",debug:"#8c8c8c"};return e.jsx("div",{style:{marginTop:16},children:e.jsx(Se,{items:[{key:"logs",label:e.jsxs(y,{children:[e.jsx(q,{}),e.jsxs("span",{children:[m("download.realtimeLogs")," (",o.length," ",m("download.entries"),")"]})]}),children:e.jsxs("div",{style:{maxHeight:"400px",overflowY:"auto",backgroundColor:"#1f1f1f",padding:"12px",borderRadius:"4px",fontFamily:"monospace",fontSize:"12px",lineHeight:"1.6"},children:[o.map((s,d)=>{const i=b(s.timestamp,{hour:"2-digit",minute:"2-digit",second:"2-digit"});return e.jsxs("div",{style:{marginBottom:"4px",color:l[s.level]||"#ffffff"},children:[e.jsxs("span",{style:{color:"#8c8c8c",marginRight:"8px"},children:["[",i,"]"]}),e.jsxs("span",{style:{color:l[s.level]||"#ffffff",marginRight:"8px",fontWeight:"bold"},children:["[",s.level.toUpperCase(),"]"]}),e.jsx("span",{children:s.message})]},d)}),e.jsx("div",{ref:n})]})}],defaultActiveKey:p?["logs"]:[]})})},{Text:N}=R,qe=({task:o,logs:p,onStop:m,isStopping:n})=>{const{t:l}=C(),s=i=>{const u={running:{color:"processing",icon:e.jsx(W,{}),text:l("download.statusRunning")},completed:{color:"success",icon:e.jsx(Z,{}),text:l("download.statusCompleted")},failed:{color:"error",icon:e.jsx(J,{}),text:l("download.statusFailed")},stopped:{color:"default",icon:e.jsx(z,{}),text:l("download.statusStopped")}},t=u[i]||u.running;return t?e.jsx(F,{color:t.color,icon:t.icon,children:t.text}):null},d=(i,u)=>{const t=new Date(i).getTime(),w=u?new Date(u).getTime():Date.now(),r=Math.floor((w-t)/1e3);if(r<60)return`${r} ${l("download.seconds")}`;if(r<3600){const h=Math.floor(r/60),a=r%60;return`${h} ${l("download.minutes")} ${a} ${l("download.seconds")}`}else{const h=Math.floor(r/3600),a=Math.floor(r%3600/60);return`${h} ${l("download.hours")} ${a} ${l("download.minutes")}`}};return e.jsxs(O,{title:e.jsxs(y,{children:[e.jsx(W,{}),e.jsx("span",{children:l("download.currentTask")})]}),style:{marginBottom:16},extra:e.jsx(k,{danger:!0,icon:e.jsx(z,{}),onClick:m,loading:n,children:l("download.stopTask")}),children:[e.jsxs(I,{column:2,bordered:!0,children:[e.jsx(I.Item,{label:l("download.taskId"),span:1,children:e.jsx(N,{code:!0,children:o.taskId})}),e.jsx(I.Item,{label:l("download.status"),span:1,children:s(o.status)}),e.jsx(I.Item,{label:l("download.startTime"),span:1,children:b(o.startTime)}),e.jsx(I.Item,{label:l("download.duration"),span:1,children:e.jsx(N,{strong:!0,children:d(new Date(o.startTime),o.endTime?new Date(o.endTime):void 0)})}),o.progress&&e.jsxs(I.Item,{label:l("download.progress"),span:2,children:[e.jsx(Ae,{percent:Math.round(o.progress.current/o.progress.total*100),status:o.status==="running"?"active":"success",format:()=>`${o.progress?.current||0} / ${o.progress?.total||0}`}),o.progress.message&&e.jsx(N,{type:"secondary",style:{display:"block",marginTop:8},children:o.progress.message})]}),o.endTime&&e.jsx(I.Item,{label:l("download.endTime"),span:2,children:b(o.endTime)}),o.error&&e.jsx(I.Item,{label:l("download.errorInfo"),span:2,children:e.jsx(D,{message:o.error,type:"error",showIcon:!0})})]}),p&&p.length>0&&e.jsx(_e,{logs:p,isRunning:o.status==="running"})]})},{Text:_}=R,Ke=({tasks:o,hasActiveTask:p,onRefresh:m,onResume:n,onDelete:l,onDeleteAll:s,isResuming:d,isDeleting:i,isDeletingAll:u})=>{const{t}=C();if(!o||o.length===0)return null;const w=[{title:t("download.tag"),dataIndex:"tag",key:"tag",width:150,render:r=>e.jsx(_,{strong:!0,children:r})},{title:t("download.type"),dataIndex:"type",key:"type",width:100,render:r=>e.jsx(F,{color:r==="illustration"?"blue":"purple",children:t(r==="illustration"?"download.typeIllustration":"download.typeNovel")})},{title:t("download.incompleteStatus"),dataIndex:"status",key:"status",width:120,render:r=>{const a={failed:{color:"error",text:t("download.statusFailed")},partial:{color:"warning",text:t("download.statusPartial")}}[r]||{color:"default",text:r};return e.jsx(F,{color:a.color,children:a.text})}},{title:t("download.errorMessage"),dataIndex:"message",key:"message",ellipsis:{showTitle:!1},width:300,render:r=>{if(!r)return e.jsx(_,{type:"secondary",children:"-"});const h=r.toLowerCase();let a=null;return h.includes("401")||h.includes("unauthorized")?a=t("download.error401"):h.includes("403")||h.includes("forbidden")?a=t("download.error403"):h.includes("timeout")||h.includes("timed out")?a=t("download.errorTimeout"):h.includes("failed after")&&(a=t("download.errorRetries")),e.jsxs("div",{children:[e.jsx(_,{type:"danger",ellipsis:{tooltip:r},children:r}),a&&e.jsx("div",{style:{marginTop:4},children:e.jsxs(_,{type:"secondary",style:{fontSize:"12px"},children:["💡 ",a]})})]})}},{title:t("download.executedAt"),dataIndex:"executedAt",key:"executedAt",width:180,render:r=>b(r)},{title:t("download.actions"),key:"action",width:150,fixed:"right",render:(r,h)=>e.jsxs(y,{children:[e.jsx(k,{type:"link",icon:e.jsx(Le,{}),onClick:()=>n(h.tag,h.type),disabled:p||d,loading:d,children:t("download.resumeDownload")}),e.jsx(k,{type:"link",danger:!0,icon:e.jsx(V,{}),onClick:()=>{Y.confirm({title:t("download.confirmDelete"),content:t("download.confirmDeleteDesc",{tag:h.tag,type:h.type==="illustration"?t("download.typeIllustration"):t("download.typeNovel")}),okText:t("common.delete"),okType:"danger",cancelText:t("common.cancel"),onOk:()=>l(h.id)})},disabled:i,loading:i,children:t("download.deleteTask")})]})}];return e.jsxs(O,{title:e.jsxs(y,{children:[e.jsx(q,{}),e.jsx("span",{children:t("download.incompleteTasks")})]}),style:{marginBottom:16},extra:e.jsxs(y,{children:[e.jsx(k,{size:"small",icon:e.jsx(Q,{}),onClick:m,children:t("download.refreshList")}),e.jsx(k,{size:"small",danger:!0,icon:e.jsx(V,{}),onClick:()=>{Y.confirm({title:t("download.confirmDeleteAll"),content:t("download.confirmDeleteAllDesc",{count:o.length}),okText:t("common.delete"),okType:"danger",cancelText:t("common.cancel"),onOk:s})},loading:u,disabled:u,children:t("download.deleteAll")})]}),children:[e.jsx(D,{message:t("download.incompleteTasksFound",{count:o.length}),description:t("download.incompleteTasksDesc"),type:"warning",showIcon:!0,style:{marginBottom:16}}),e.jsx(de,{columns:w,dataSource:o,rowKey:"id",pagination:{pageSize:10,showSizeChanger:!0,showTotal:r=>t("download.totalEntries",{total:r})},size:"small",scroll:{x:800}})]})},{Text:M}=R,Ne=({tasks:o,isLoading:p,calculateDuration:m})=>{const{t:n}=C(),l=je(),[s,d]=g.useState(null),[i,u]=g.useState(!1),t=async a=>{try{d(a),await se.deleteTaskHistory(a),f.success(n("download.deleteTaskHistorySuccess")),l.invalidateQueries({queryKey:U.DOWNLOAD_STATUS()})}catch(c){const x=c?.response?.data?.data?.message||c?.message||n("download.deleteTaskHistoryFailed");f.error(x)}finally{d(null)}},w=async()=>{try{u(!0);const a=await se.deleteAllTaskHistory();f.success(n("download.deleteAllTaskHistorySuccess",{count:a.deletedCount})),l.invalidateQueries({queryKey:U.DOWNLOAD_STATUS()})}catch(a){const c=a?.response?.data?.data?.message||a?.message||n("download.deleteAllTaskHistoryFailed");f.error(c)}finally{u(!1)}},r=a=>{const c={running:{color:"processing",icon:e.jsx(W,{}),text:n("download.statusRunning")},completed:{color:"success",icon:e.jsx(Z,{}),text:n("download.statusCompleted")},failed:{color:"error",icon:e.jsx(J,{}),text:n("download.statusFailed")},stopped:{color:"default",icon:e.jsx(z,{}),text:n("download.statusStopped")}},x=c[a]||c.running;return x?e.jsx(F,{color:x.color,icon:x.icon,children:x.text}):null},h=[{title:n("download.taskId"),dataIndex:"taskId",key:"taskId",width:120,render:a=>e.jsxs(M,{code:!0,children:[a.slice(0,8),"..."]})},{title:n("download.status"),dataIndex:"status",key:"status",width:100,render:a=>r(a)},{title:n("download.duration"),key:"duration",width:120,render:(a,c)=>m(new Date(c.startTime),c.endTime?new Date(c.endTime):void 0)},{title:n("download.startTime"),dataIndex:"startTime",key:"startTime",width:180,render:a=>b(a)},{title:n("download.endTime"),dataIndex:"endTime",key:"endTime",width:180,render:a=>b(a)},{title:n("download.errorInfo"),dataIndex:"error",key:"error",ellipsis:!0,render:a=>a?e.jsx(M,{type:"danger",ellipsis:{tooltip:a},children:a}):e.jsx(M,{type:"secondary",children:"-"})},{title:n("download.actions"),key:"actions",width:100,fixed:"right",render:(a,c)=>e.jsx(ne,{title:n("download.deleteTaskHistoryConfirm"),description:n("download.deleteTaskHistoryConfirmDesc",{taskId:c.taskId.slice(0,8)}),onConfirm:()=>t(c.taskId),okText:n("common.confirm"),cancelText:n("common.cancel"),okButtonProps:{danger:!0},children:e.jsx(k,{type:"link",danger:!0,size:"small",icon:e.jsx(V,{}),loading:s===c.taskId,disabled:c.status==="running",children:n("common.delete")})})}];return e.jsx(O,{title:e.jsxs(y,{children:[e.jsx(q,{}),e.jsx("span",{children:n("download.taskHistory")})]}),extra:o&&o.length>0?e.jsx(ne,{title:n("download.deleteAllTaskHistoryConfirm"),description:n("download.deleteAllTaskHistoryConfirmDesc",{count:o.length}),onConfirm:w,okText:n("common.confirm"),cancelText:n("common.cancel"),okButtonProps:{danger:!0},children:e.jsx(k,{danger:!0,size:"small",icon:e.jsx($e,{}),loading:i,children:n("download.deleteAll")})}):null,children:p?e.jsxs("div",{style:{textAlign:"center",padding:"40px 0"},children:[e.jsx(ye,{size:"large"}),e.jsx("div",{style:{marginTop:16},children:e.jsx(M,{type:"secondary",children:n("download.loadingHistory")})})]}):o&&o.length>0?e.jsx(de,{columns:h,dataSource:o,rowKey:"taskId",pagination:{pageSize:10,showSizeChanger:!0,showTotal:a=>n("download.taskRecords",{total:a}),pageSizeOptions:["10","20","50","100"]},size:"middle",scroll:{x:1e3}}):e.jsx("div",{style:{textAlign:"center",padding:"40px 0"},children:e.jsx(M,{type:"secondary",children:n("download.noHistory")})})})},{Text:le}=R,Qe=({open:o,onCancel:p,onFinish:m,isSubmitting:n,configFiles:l=[],targets:s=[]})=>{const{t:d}=C(),[i]=E.useForm(),u=()=>{i.resetFields(),p()};return e.jsxs(Y,{title:e.jsxs(y,{children:[e.jsx(re,{}),e.jsx("span",{children:d("download.startDownloadModal")})]}),open:o,onCancel:u,onOk:()=>i.submit(),confirmLoading:n,okText:d("common.start"),cancelText:d("common.cancel"),width:600,children:[e.jsx(D,{message:d("download.startDownloadTip"),description:d("download.startDownloadTipDesc"),type:"info",showIcon:!0,style:{marginBottom:24}}),e.jsxs(E,{form:i,onFinish:m,layout:"vertical",children:[e.jsx(E.Item,{name:"configPaths",label:d("download.selectConfigFiles"),tooltip:d("download.selectConfigFilesTooltip"),extra:d("download.selectConfigFilesExtra"),children:e.jsx(K,{mode:"multiple",placeholder:d("download.selectConfigFilesPlaceholder"),allowClear:!0,size:"large",showSearch:!0,filterOption:(t,w)=>w?.label?.toLowerCase().includes(t.toLowerCase())||!1,options:l.map(t=>({label:`${t.filename}${t.isActive?` (${d("config.activeConfig")})`:""}`,value:t.path}))})}),e.jsx(E.Item,{name:"targetId",label:d("download.selectTarget"),tooltip:d("download.selectTargetTooltip"),extra:d("download.selectTargetExtra"),children:e.jsx(K,{placeholder:d("download.selectTargetPlaceholder"),allowClear:!0,size:"large",showSearch:!0,filterOption:(t,w)=>{const r=w?.children;return(typeof r=="string"?r:String(r||"")).toLowerCase().includes(t.toLowerCase())},children:s.map((t,w)=>e.jsx(K.Option,{value:w.toString(),children:e.jsxs(y,{children:[e.jsx(F,{color:t.type==="illustration"?"blue":"purple",children:t.type==="illustration"?d("download.typeIllustration"):d("download.typeNovel")}),e.jsx(le,{strong:!0,children:t.tag||`Target ${w+1}`}),t.limit&&e.jsxs(le,{type:"secondary",children:["(",d("download.limit"),": ",t.limit," ",d("download.entries"),")"]})]})},w))})}),s.length===0&&e.jsx(D,{message:d("download.noTargetsFound"),description:d("download.noTargetsFoundDesc"),type:"warning",showIcon:!0})]})]})};function Ue(o,p,m,n,l){const{t:s}=C(),[d,i]=g.useState(!1),u=g.useCallback(async c=>{try{await o({targetId:c.targetId,configPaths:c.configPaths}),f.success(s("download.taskStarted")),i(!1)}catch(x){const{errorCode:j,message:T}=v(x);f.error(S(j,s,void 0,T||s("download.startFailed")))}},[o,s]),t=g.useCallback(async c=>{try{await p(c),f.success(s("download.taskStopped"))}catch(x){const{errorCode:j,message:T}=v(x);f.error(S(j,s,void 0,T||s("download.stopFailed")))}},[p,s]),w=g.useCallback(()=>{ae.runAllDownloads().then(()=>{f.success(s("download.allTargetsStarted"))}).catch(c=>{const{errorCode:x,message:j}=v(c);f.error(S(x,s,void 0,j||s("download.startFailed")))})},[s]),r=g.useCallback(async(c,x)=>{try{await m({tag:c,type:x}),f.success(s("download.taskResumedWithTag",{tag:c,type:s(x==="illustration"?"download.typeIllustration":"download.typeNovel")}))}catch(j){const{errorCode:T,message:A,params:L}=v(j);f.error(S(T,s,L,A||s("download.resumeFailed")))}},[m,s]),h=g.useCallback(async c=>{try{await n(c),f.success(s("download.incompleteTaskDeleted"))}catch(x){const{errorCode:j,message:T,params:A}=v(x);f.error(S(j,s,A,T||s("download.deleteFailed")))}},[n,s]),a=g.useCallback(async()=>{try{const x=(await l())?.deletedCount||0;x===0?f.info(s("download.noIncompleteTasks")):f.success(s("download.allIncompleteTasksDeleted",{count:x}))}catch(c){const{errorCode:x,message:j,params:T}=v(c);x?f.error(S(x,s,T,j||s("download.deleteAllFailed"))):f.error(j||s("download.deleteAllFailed")),console.error("Delete all incomplete tasks error:",c)}},[l,s]);return{showStartModal:d,setShowStartModal:i,handleStart:u,handleStop:t,handleRunAll:w,handleResume:r,handleDelete:h,handleDeleteAll:a}}function We(o){const{t:p}=C(),m=g.useMemo(()=>{const l=o||[],s=l.filter(u=>u.status==="completed").length,d=l.filter(u=>u.status==="failed").length,i=l.filter(u=>u.status==="stopped").length;return{total:l.length,completed:s,failed:d,stopped:i}},[o]),n=g.useCallback((l,s)=>{const d=new Date(l).getTime(),i=s?new Date(s).getTime():Date.now(),u=Math.floor((i-d)/1e3);if(u<60)return`${u} ${p("download.seconds")}`;if(u<3600){const t=Math.floor(u/60),w=u%60;return`${t} ${p("download.minutes")} ${w} ${p("download.seconds")}`}else{const t=Math.floor(u/3600),w=Math.floor(u%3600/60);return`${t} ${p("download.hours")} ${w} ${p("download.minutes")}`}},[p]);return{taskStats:m,calculateDuration:n}}const{Title:Ye,Paragraph:Ve}=R;function xt(){const{t:o}=C(),{startAsync:p,isStarting:m,stopAsync:n,isStopping:l}=ke(),{isLoading:s,hasActiveTask:d,activeTask:i,allTasks:u}=Ce(void 0,2e3),t=i?.taskId,{logs:w}=Ie(t,void 0,2e3),{tasks:r,refetch:h,resumeAsync:a,deleteAsync:c,deleteAllAsync:x,isResuming:j,isDeleting:T,isDeletingAll:A}=ve(),{config:L,refetch:ie}=De(),{data:ce}=Te({queryKey:U.CONFIG_FILES,queryFn:()=>ae.listConfigFiles()}),{showStartModal:ue,setShowStartModal:ee,handleStart:pe,handleStop:te,handleRunAll:me,handleResume:he,handleDelete:xe,handleDeleteAll:we}=Ue(p,n,a,c,x),{taskStats:P,calculateDuration:ge}=We(u);return e.jsxs("div",{children:[e.jsx(Ye,{level:2,children:o("download.title")}),e.jsx(Ve,{type:"secondary",style:{marginBottom:24},children:o("download.description")}),e.jsx(Be,{total:P.total,completed:P.completed,failed:P.failed,stopped:P.stopped}),e.jsx(Ee,{hasActiveTask:d,onStartClick:()=>ee(!0),onRunAllClick:me,onStopClick:()=>i?.taskId&&te(i.taskId),isStarting:m,isRunningAll:!1,isStopping:l,storage:L?.storage,onRefreshConfig:ie}),i&&e.jsx(qe,{task:i,logs:w,onStop:()=>i.taskId&&te(i.taskId),isStopping:l}),r&&r.length>0&&e.jsx(Ke,{tasks:r,hasActiveTask:d,onRefresh:h,onResume:he,onDelete:xe,onDeleteAll:we,isResuming:j,isDeleting:T,isDeletingAll:A}),e.jsx(Ne,{tasks:u||[],isLoading:s,calculateDuration:ge}),e.jsx(Qe,{open:ue,onCancel:()=>ee(!1),onFinish:pe,isSubmitting:m,configFiles:ce?.data?.data||[],targets:L?.targets||[]})]})}export{xt as default};
|
|
2
|
-
//# sourceMappingURL=Download-DCKDU51K.js.map
|